Announcement

Collapse
No announcement yet.

Using script to change polling interval?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Using script to change polling interval?

    Is there a way in Homeseer to change the polling interval for the HAI plugin via a script or an event?

    In my setup, Homeseer seems to lose connection to the thermostats fairly regularly, but changing the polling interval seems to immediately re-establish the polling connection. So I'd like to change the polling interval every few hours, from 120 seconds to 100 seconds, then immediately back to 120, to see if that maintains polling activity.

    Anyone know if this is possible?

    Thanks in advance.

    #2
    Found the answer to my own question in the HAI plugin documentation, and I wrote the following script to reset the polling interval every hour. Seems to work fine, though I've only had it running for 12 hours:
    Sub Main()
    'changes the thermostat polling interval to make sure polling is always enabled

    Set haiplugin = hs.plugin("HAI RC Thermostat")
    interval = haiplugin.PollInterval

    if interval = 120 then
    newinterval = 119
    else
    newinterval = 120
    end if


    haiplugin. PollInterval = newinterval

    hs.writelog "Thermostats", "Thermostat polling interval reset"
    end sub
    Hope this is helpful to others who are seeing their thermostat plugin stop polling.

    Comment

    Working...
    X