RogueProeliator wrote:That isn't what you wanted to do... you need to call that function. Is this in an embedded action? If so, try this:
All I did was copy/past the code into an action to execute a python script. I did it with the code you just posted and interesting results....
Since the TV was dead asleep. (TV off, Network adapter off). I executed the WOL action and it woke up the TV and turned it on.
I turned off the TV (TV off, Network adapter on). I executed the WOL action just to see if that would cause the TV to turn back on and nothing happened. So I guess if the TV is totally asleep and it receives the WOL packet, it will also turn on. I guess since there is no bad things that happen from sending a WOL command, I can just embed that into the "Turn Roku TV On" action.
RogueProeliator wrote:Try pinging the television... maybe it will respond if it is On but time out if the adapter, and thus presumably the TV, is Off.
That is exactly what happens when you ping the TV. There is, however, a 5-10 minute delay until the adapter falls asleep. I'm using another plugin that does just that... it pings the TV which gives me the results of the network adapter. So it will report as On if the TV is off but the adapter is still active. For my immediate goal (status of the kid's TVs being on or off), that will work. To fine tune this or add functionality elsewhere, I was wondering if there was a way to poll a ROKU device to see what it is currently doing (on/off, idle/homescreen, playing ____ on netflix, etc.).
One of my solutions was to use an extra insteon siren in the kids room (just for the shock factor) to trigger on if the TV turns on after designated hours. The siren would then turn off once the TV is turned off. In this example, a more immediate "off" signal would be preferred over listening to the alarm for 10 minutes after the TV has been shut off.
If kid TVs only have PLEX access, then I think I can do it that way through the PLEX plugin to see what's playing on what device (I think.... I still have a way to go with my PLEX configuration after moving PLEX to it's own QNAP server)