Ecobee Switch + not working correctly


#1

1) Give a description of the problem
When I run my simple Piston it does not seem to turn on/off the light switch correctly. Sometimes it will turn the switch ON if the Switch was on the OFF position for the first run… and Visa Verca

2) What is the expected behavior?
I am assuming it should turn the switch to the On/Off position using toggle

3) What is happening/not happening?
It sometimes toggles the first time but attempts after does not work.

**4) Post a Green Snapshot of the piston!


#2

I tend to avoid the 'Toggle' command whenever possible.
I try to code intentionally such as Turn on, or turn off.
This leaves no grey area, and no way to get out of sync.


#3

When I use the following script

I use Turn On / Turn Off Command. I am still running into the same scenario where it turns on the light switch but will not turn off the light switch.

When I run the piston i see it hittng the rules with trace but it does not switch the switch to off.

Note: I am using a virtual switch - when that turns on/off - it turns on/off the toggle switch. Eventually this virtual switch will turn on multiple switches.


#4

Try changing the line that says:
IF Switch 13's switch programmatically changes to off
-to-
IF Switch 13's switch changes to off

This is done in the popup by choosing:
temp

The reason behind this is, even though webCoRE has the ability to distinguish programmatic interactions from physical interactions, most device handlers do not report that. This is likely causing each execution to fall back on your else statement.


#5

I made the change but I am still seeing the same issue. When I run the piston the first time (switching the virtual switch on VIA smartthings My Home) - it executes correctly and turns on the light switch. However - when I turn off the Virtual Switch (VIA smartthings My Home) the switch does not turn off. With the trace I can see it execute the code. Please see screen shot below.

BTW thanks for all the help so far.

xK8WwMCzoDkDrcB1Jf27yjtZ9bqrs


#6

Just for clarification, I have never used a “virtual switch”…
I often use a “Simulated Switch” as seen in the IDE.

I suspect a virtual switch is not treated the same as a Simulated Switch, since a lot of errors I have seen lately were involving virtual switches.

To create a SimSwitch, I use a web browser to:

Then use this as a guide:

Side Note:
Sometimes I have to use a “Private Browsing Window” to be able to log into the IDE.

Once the device is added, ST will see it within a few seconds, but you will have to tell webCoRE that you have a new device. Let me know if you are unfamiliar with that process, and I will elaborate.

Once webCoRE can see the new SimSwitch, you should be able to switch to that device on line 15 above.


The only other input I have is, I often code in separate blocks like this:

IF SimSwitch changes to on
    Then turn on Kids room
END IF

IF SimSwitch changes to off
    Then turn of Kids room
END IF

Linking Garage to ST Home setup
#7

I double checked and my switch is a simulated switch.

I re-did my code:

I am still having the same issue. The trace is showing it going to the right if statement, Off goes to off if statement, on goes to on.

and I see it running the turn on and turn off command. But the physical switch (ecobee switch) is not changing state to off,


#8

Can you please turn Logging to “Full” and rerun both tests?
That last piston should be working.

Just to clarify, Switch 13 is your SimSwitch, and Switch 14 is your Ecobee Switch, correct?


#9

That is correct Switch 13 is the Sim Switch (named Theatre room all switch) and Switch 14 is the Ecobee Switch + (named Kids Room).

here are the logs… the first execution was to turn on the switch (successful) the second execution was to turn off the switch (failed), The switch is still on. Hopefully the logs make sense to you.

18/10/2018, 14:12:12 +621ms
+1ms ╔Received event [Theatre room all switch].switch = off with a delay of 44ms
+102ms ║RunTime Analysis CS > 12ms > PS > 77ms > PE > 12ms > CE
+104ms ║Runtime (37498 bytes) successfully initialized in 77ms (v0.3.108.20180906) (102ms)
+105ms ║╔Execution stage started
+116ms ║║Comparison (enum) off changes_to (string) off = true (1ms)
+118ms ║║Cancelling condition #2’s schedules…
+119ms ║║Condition #2 evaluated true (8ms)
+121ms ║║Cancelling condition #1’s schedules…
+122ms ║║Condition group #1 evaluated true (state changed) (10ms)
+125ms ║║Cancelling statement #5’s schedules…
+135ms ║║Skipped execution of physical command [Kids’ Room].off([]) because it would make no change to the device. (6ms)
+136ms ║║Executed [Kids’ Room].off (8ms)
+144ms ║║Comparison (enum) off changes_to (string) on = false (1ms)
+146ms ║║Cancelling condition #9’s schedules…
+147ms ║║Condition #9 evaluated false (7ms)
+148ms ║║Cancelling condition #8’s schedules…
+150ms ║║Condition group #8 evaluated false (state changed) (10ms)
+153ms ║╚Execution stage complete. (47ms)
+154ms ╚Event processed successfully (154ms)
18/10/2018, 14:11:47 +998ms
+2ms ╔Received event [Theatre room all switch].switch = on with a delay of 60ms
+172ms ║RunTime Analysis CS > 28ms > PS > 127ms > PE > 16ms > CE
+174ms ║Runtime (37503 bytes) successfully initialized in 127ms (v0.3.108.20180906) (171ms)
+175ms ║╔Execution stage started
+186ms ║║Comparison (enum) on changes_to (string) off = false (1ms)
+189ms ║║Cancelling condition #2’s schedules…
+190ms ║║Condition #2 evaluated false (7ms)
+191ms ║║Cancelling condition #1’s schedules…
+192ms ║║Condition group #1 evaluated false (state changed) (11ms)
+200ms ║║Comparison (enum) on changes_to (string) on = true (1ms)
+202ms ║║Cancelling condition #9’s schedules…
+204ms ║║Condition #9 evaluated true (7ms)
+205ms ║║Cancelling condition #8’s schedules…
+206ms ║║Condition group #8 evaluated true (state changed) (11ms)
+209ms ║║Cancelling statement #10’s schedules…
+1186ms ║║Executed physical command [Kids’ Room].on() (972ms)
+1187ms ║║Executed [Kids’ Room].on (975ms)
+1191ms ║╚Execution stage complete. (1016ms)
+1193ms ╚Event processed successfully (1193ms)


#10

Strange, it seems like Kids room was reporting as being off already, so the ‘off’ command was not sent.

Skipped execution of physical command [Kids’ Room].off([]) because it would make no change to the device

I think the best approach is to ignore this piston for a moment, and focus on why your Ecobee is not registering as off when it is off.


If you don’t want to do that, a workaround is to tell webCoRE to FORCE an off command, regardless of the current status. (Just be aware this setting affects the entire piston)

You can test this by editing the piston, and then clicking on the name in line 2. Then click the cog in the bottom right, and then disable “Command Optimizations”. Click save, and then save again. Clear your log, and then retest.

temp


#11

Your suggestion worked about forcing it!

For why it is registering off already do you have any clues on how I can troubleshoot this or is it something I need to talk to Ecobee about?


#12

When troubleshooting devices that seem finicky, I often:

  • Log into the IDE: https://account.smartthings.com/
  • Choose “My Devices” at the top
  • Click on the name of the device that is acting weird
  • On the next page, click on “List Events”

This should show everything that happened to that device in a timeline.
There are usually clues here that help identify issues.