setProgramSetpoints only works for active program?

@storageanarchy for vis

I’m trying to set multiple program setpoints in webcore depending on outside temperature, but when i confirm via the ecobee app, it appears that only the active program is being updated? i can’t seem to find any errors in the logs. here’s the webcore piston:

here are the webcore logs:

1/11/2020, 5:59:59 PM +59ms
+1ms	+Received event [Home].time = 1605139200000 with a delay of -941ms
+103ms	¦RunTime Analysis CS > 25ms > PS > 40ms > PE > 38ms > CE
+107ms	¦Runtime (38728 bytes) successfully initialized in 40ms (v0.3.110.20191009) (105ms)
+108ms	¦+Execution stage started
+214ms	¦¦Comparison (dynamic) 74 is_less_than_or_equal_to (integer) 55 = false (2ms)
+217ms	¦¦Condition #3 evaluated false (93ms)
+218ms	¦¦Condition group #2 evaluated false (state did not change) (96ms)
+221ms	¦¦Cancelling statement #4's schedules...
+2207ms	¦¦Executed physical command [Thermostat 1].setProgramSetpoints([Sleep, 67, 69]) (1973ms)
+2208ms	¦¦Executed [Thermostat 1].setProgramSetpoints (1975ms)
+3937ms	¦¦Executed physical command [Thermostat 1].setProgramSetpoints([Home, 72, 75]) (1723ms)
+3938ms	¦¦Executed [Thermostat 1].setProgramSetpoints (1725ms)
+3940ms	¦+Execution stage complete. (3833ms)
+3942ms	¦Setting up scheduled job for Wed, Nov 11 2020 @ 7:00:00 PM CST (in 3597s)
+3971ms	+Event processed successfully (3971ms)

and here are the live logs:

ecobee suite mgr  6:00:08 PM: trace updateSensorData() - sensorCollector being updated with sensorData: [Away:on, Home:on, Sleep:on, activeClimates:[Away, Home, Sleep], programUpdated:2020-11-11 18:00:08, climatesUpdated:2020-11-11 18:00:08]
ecobee suite mgr  6:00:08 PM: trace updateSensorData() - sensor Bedroom is used in [Away, Home, Sleep]
ecobee suite mgr  6:00:08 PM: trace updateThermostatData() - Event data updated for thermostat Living Room (311014448992) = [[lastPoll:full @ 2020-11-11 18:00:08 CST], [programUpdated:2020-11-11 18:00:08], [climatesUpdated:2020-11-11 18:00:08]]
ecobee suite mgr  6:00:08 PM: trace Updates sent (267 / 1495ms)
ecobee suite mgr  6:00:08 PM: debug updateSensorData() - Sensor Living Room, sensorDNI == ecobee_suite-sensor_tstat-ei:0-Living Room
ecobee suite mgr  6:00:08 PM: info pollEcobeeAPICallback() - Parsing data for thermostat (311014448992)
ecobee suite mgr  6:00:08 PM: debug updateSensorData() - Sensor Bedroom, sensorDNI == ecobee_suite-sensor-rs:100-M4XX
ecobee suite mgr  6:00:08 PM: info Living Room -> scheduledClimateId: home, scheduledClimateName: Home, scheduledClimateOwner: system, scheduledClimateType: program, climatesList: [Away, Home, Sleep]
ecobee suite mgr  6:00:08 PM: trace updateThermostatData(Living Room 311014448992) - currentClimateRef: home, currentClimate: Home, currentClimateName: Home, currentClimateId: home, currentClimateOwner: system, currentClimateType: program, thermostatHold: null
ecobee sensor     6:00:08 PM: info Updated 6 objects (52ms)
ecobee sensor     6:00:08 PM: trace generateEvent(): parsing data [Away:on, Home:on, Sleep:on, activeClimates:[Away, Home, Sleep], climatesUpdated:2020-11-11 18:00:08, programUpdated:2020-11-11 18:00:08]
webcore routine   5:59:59 PM: info + Received event [Vavas].time = 1605139200000 with a delay of -941ms
webcore routine   6:00:03 PM: info + Event processed successfully (3971ms)
webcore routine   5:59:59 PM: trace ¦+ Execution stage started
webcore routine   5:59:59 PM: trace ¦ Runtime (38728 bytes) successfully initialized in 40ms (v0.3.110.20191009) (105ms)
ecobee thermostat 6:00:01 PM: debug generateEvent(): parsing data [[debugEventFromParent:setProgramSetpoints(Home) - heatingSetpoint: 72°F , coolingSetpoint: 75°F (info)]]
ecobee thermostat 6:00:01 PM: debug getDeviceId() returning 311014448992
ecobee suite mgr  6:00:01 PM: info setProgramSetpoints() for EcobeeTherm: Living Room (311014448992): Home, heatSP: 72, coolSP: 75)

thanks,
matt

You will need to wait for each adjustment to be sent and confirmed by the Ecobee Cloud - usually that will take 1 or 2 refresh cycles. Otherwise only the 1st one will work, because the in-memory Climates Map gets out of sync with what the Ecobee Cloud expects.

Just FYI:

  • the code has to update the individual schedule in the Map
  • then it sends the modified Map up to the cloud
  • the cloud will send down the updated map, confirming proper formatting in the change request

If we send the second update before the first one is updated by the cloud, it won’t match what the cloud thinks the Map should look like, and it will silently reject the update.

If you look into Smart Mode Helper and the Thermostat Device’s setThermostatSetpoint code, you’ll see the rather complex approach I took to implement changing setpoints. Your choice is to mimic this code, or to simply insert a delay between calls (I use 2 minutes & 30 seconds, but you might need more depending on your cycle time).

Also, FWIW, if you are going to be making these changes frequently, I suggest using a 1 minute cycle time (set in Ecobee Suite Manager).

Waiting 2.5m in between setpoint calls did the trick. You da man, thanks!

1 Like