It looks like the driver exposes a poll()
/ refresh()
method but does not schedule its own refreshing.
I read through about half of the topic (200/400+ posts!) and from what I can tell it seems like the original device author expected SmartThings to periodically run the poll()
command. I vaguely recall that in the really early days, SmartThings automatically polled devices with the Polling
capability, but it was unreliable and ultimately has been deprecated.
The SmartThings Documentation for the Polling capability indicates the following:
Allows for the polling of devices that support it. Deprecated, devices should schedule their own polling using the scheduling API or use the Ping capability.
Device Self Polling
One approach would be for the device to implement a runEvery5Minutes(poll)
scheduling call. This would tell the driver to run poll every 5 minutes without needing anything external. (scheduling docs)
If you want to make this modification yourself, you can open the code for this DTH, find the updated()
method (around line 592) and add the runEvery5Minutes(poll)
line to the end of the method. It would end up looking something like:
def updated(){
log.debug( "Preferences Updated rebuilding IP Address, MAC address and Hex Network ID")
state.tv_poll_count = 0
ipaddress()
iphex()
refresh()
runEvery5Minutes(poll)
}
Then you’ll need to edit / save the device preferences so the updated()
method gets called.
Third Party Polling SmartApp
Alternatively, you can use a third party SmartApp to perform the polling. The Pollster SmartApp was created for this purpose… it should be noted that it was created in 2014 back when this was more of a need. You may have noted that official SmartThings device handlers are either purely event driven or implement their own built-in scheduling now.
Or the approach you are already taking with WebCoRE is fine - internally it runs on the SmartThings servers using their scheduling system.
Other Thoughts
If the rules are not triggered by the TV power status changing, but instead are conditioned upon the TV power status, you could adjust the rule so that it would poll the status before checking the condition (maybe adding a small delay between polling and checking the condition if needed).