Author Topic: Change polling rate via a scene or depending on house mode  (Read 199 times)

Offline kwieto

  • Full Member
  • ***
  • Posts: 191
  • Karma: +8/-5
Change polling rate via a scene or depending on house mode
« on: August 09, 2017, 08:55:41 am »
I want battery operated temp/humidity sensor to report readings to the controller depending on if the house is in Away/Vacation or Home/Night mode.
The Idea is that I need frequent readings when I am at home to control a fan which ventilates the room.
But polling it frequently drains batteries very fast. So I want to change polling depending on if I am in or out from the house.

Is it possible to do it via a scene? PLEG?

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 9741
  • Karma: +737/-136
    • RTS Services Plugins
Re: Change polling rate via a scene or depending on house mode
« Reply #1 on: August 09, 2017, 09:06:02 am »
I believe that there is a device action that you can call to initiate a poll on a device. In that case you can call this on your own schedule.

Sent from my SAMSUNG-SM-G935A using Tapatalk


Offline kwieto

  • Full Member
  • ***
  • Posts: 191
  • Karma: +8/-5
Re: Change polling rate via a scene or depending on house mode
« Reply #2 on: August 09, 2017, 09:46:02 am »
How to check that?
If I create a scene and see if I can set some action on this device, I don't see it on the list.
It is Everspring ST-814 Temp/Humidity sensor, if it helps

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 9741
  • Karma: +737/-136
    • RTS Services Plugins
Re: Change polling rate via a scene or depending on house mode
« Reply #3 on: August 09, 2017, 09:52:46 am »
You need to look in the advanced mode for a scene or PLEG for that device  ... it will not be available via the graphical interface.

Sent from my SAMSUNG-SM-G935A using Tapatalk


Offline rigpapa

  • Full Member
  • ***
  • Posts: 140
  • Karma: +21/-0
Re: Change polling rate via a scene or depending on house mode
« Reply #4 on: August 09, 2017, 11:39:36 am »
There two ways that might work for you that I can think of. The first is harder, the second is much easier and may be all you really need to achieve your goal.

To change the polling interval of the EverSpring ST814 or any other battery-operated device, you need to change the WakeupInterval and PollSettings state variables,
both of which are in the "urn:micasaverde-com:serviceId:ZWaveDevice1" service.

But that alone may not be enough, because many battery-operated devices don't return their detailed state information when polled, they rely on their own separate timing for these. If memory serves, the old Aeotec Multisensors behaved this way. To make that timing change, you need to change the "VariablesSet" state variable (same service ID as mentioned above). It is formatted as a "triplet" of comma-separated values:

  • The device's variable number;
  • The device's variable size/format (e.g. 1d for one-byte decimal, etc.);
  • The variable value to be set.

This triplet repeats for as many variables as you want to set, so on my ST814 I currently have "1,1d,99,2,1d,99,3,1d,99,4,1d,99,5,1d,99,6,2d,30,7,1d,0,8,1d,0".

The ST814 variable you are most-interested in for your purpose is 6 (two-byte), which contains the number of minutes between sensor-generated reports to your Vera (you can see in my setting above that it's 30 minutes: ...,6,2d,30,...).

You then need to force a reconfiguration of the device, which will be done at the next WakeupInterval for the device. This is done by using the "Reconfigure" action with service id urn:micasaverde-com:serviceId:HaDevice1.

With all of that said, the ST814 supports reports generated based on a delta in temperature or humidity in addition to a time interval, and that may provide a simpler permanent solution to your problem without code. The delta T/H feature is turned off by default. For temperature, it is controlled by variable 7 (one byte), and its value is delta degrees. Variable 8 is for humidity. Whenever the temperature changes by the set amount, the sensor generates a report. You could just set these in the "Device Options" of the Vera interface for the device (no Lua required), and you'll probably get much less frequent reports than you would by shortening the polling or report intervals, but still know exactly when the temperature/humidity reaches some level you're concerned about.
Author of Rachio, Deus Ex Machina II, SiteSensor, and Auto Virtual Thermostat plugins. Using Vera Plus (1.7.3232), Vera3 (1.7.855), 50 dimmers and 40 switches (mostly Leviton, some Linear and GE), a dozen sensors, a truckload of PLEG, and of course, my own plugins.

Offline kwieto

  • Full Member
  • ***
  • Posts: 191
  • Karma: +8/-5
Re: Change polling rate via a scene or depending on house mode
« Reply #5 on: August 10, 2017, 04:07:44 am »
The simplest solution is sometimes hardest to find :(

It is written in the manual, I can set the temperature delta within 1-70 degrees range and humidity between 5 and 70 %
Should be enough for my needs.

Thenks!