ericboehs / smartthings-roku-tv

MIT License
17 stars 19 forks source link

Device State cycles on and off while TV is on. #3

Open DietShasta opened 6 years ago

DietShasta commented 6 years ago

This issue is similar to issue #2 except instead of the state staying in the off state, it just cycles on and off while the tv is on.

I can see that when you query the device state you send an "off" event first (line 159). So every minute when the device handler refresh/polls the device, it will tell the switch it is "off" then when the query finds that it is "on", it changes the switch back to "on". The history in the ST app shows this cycle every minute.

I tried updating the device handler to not change the state unless it can't parse out "poweron" from the get request which works fine for the Roku TVs that stay online, but once the TVs go offline, the get requests no longer work, and nothing is sent to get parsed.

Thank you!