Adjusting polling rate for Zwave device - zwavejs2mqtt

I have a GE/Jasco zwave device, which I have an air compressor hooked up to. I have an automation which shuts the air compressor off if it has been using more than 10 watts for X minutes. The problem is that the lowest resolution I can get is 5 minutes, which produces unreliable results.

This is the device in question: Z-Wave JS Config DB Browser
I’ve found the json file referenced in my zwavejs2mqtt configuration at: ./.config-db/devices/0x0063/ge_jasco_14285.json

I’ve tried simply changing 5 to 1 in the file mentioned above, but the change doesn’t get reflected in zwavejs2mqtt UI, or in HA. I’m assuming the json config file was loaded when the device was initially configured and doesn’t get re read?

So my question is what’s the right way to change the minimum polling rate from 5 to 1 (minutes)?
Thanks!

P.S. I’m a total HA newb, so I apologize if I’ve missed something basic. I am linux literate though, and comfortable in docker, and the OS in general.

The ge_jasco_14285.json is a file that ZWaveJS uses to reflect the actual configuration parameters used by the 14285. If a parameter in that file has a minimum setting of 5, then it is reflecting the minimum configured value that the device supports, which should be 5 (See 14285 ). In other words, if the device only supports a minimum of 5, then changing the json file’s parameter from 5 to 1 won’t have any affect.

I myself don’t know how to use HA to setup polling, using ZWaveJS2MQTT, you should be able use its GUI settings to setup a polling of the 14285’s power status directly.

Yeah, I absolutely understand that somewhere along the line, someone put a minimum of 5 into the spec. I’m doubtful that’s a true minimum though, because I can stab the “refresh” button over and over again every few seconds in the zwavejs2mqtt UI and it will update without issue. So maybe arguably 1 minute intervals over a 24/7/365 period isn’t a good idea for some unobvious reason, and may cause issues, but that’s a risk I’m willing to experiment with… if I can only figure out how :slight_smile:

The entire reason for HA in this case is to setup this Air compressor stuff that I’m doing. So my alternative is to find new hardware to do what I want, so I’d like to at least give this a shot before I spend more time and money on it.

I think the config parameter being discussed is “Energy Report Frequency”, right? If correct this means the 14285 will autonomously send a report of the power status, at most every 5 minutes, and thus its not really a polling interval, its a reporting interval. However a UI refresh is likely going to have the controller ask the device to provide the power status directly in real-time without regard to the Energy Report Frequency, and this is essentially what polling would do. So I think what you need is to get ZWaveJS2MQTT to poll the power status.

1 Like

You can use “Custom Configuration” in z2m to program any value you want (also in HA, but z2m is easier).

image

But don’t expect it to work if the device truly does not support those values.

You could create an automation and run it once a minute to poll.

Here an example that polls every 10 minutes


- id: "switch_3 poll switch state"
  alias: switch_3 poll switch state
  description: "Automation to periodically poll switches"
  trigger:
    - platform: time_pattern
      minutes: "/10"
    - platform: homeassistant
      event: start
  action:
    - service: zwave_js.refresh_value
      data:
        entity_id: switch.switch_3_switch

1 Like

Thank you @PeteRage - This is exactly what I needed. Not only did it help me move forward, but it helped me understand a little more about the architecture of how this stuff works. I also added a condition to only grab it once a minute if the switch is actually turned on, since there’s no need to store a bunch of 0’s when the switch is turned off.

- id: '1659030940312'
  alias: Air Compressor - Refresh Watts every minute
  description: ''
  trigger:
  - platform: time_pattern
    minutes: /1
  condition:
  - condition: device
    type: is_on
    device_id: a057205b657780e754d304cc3dfed9a1
    entity_id: switch.direct_wire_indoor_outdoor_smart_switch
    domain: switch
  action:
  - service: zwave_js.refresh_value
    data:
      entity_id: sensor.direct_wire_indoor_outdoor_smart_switch_electric_production_w
  mode: single
1 Like