Issue reading states of Z-Wave switches

Hey All,

Brand new to Home Assistant, so far super impressed with the flexibility and device support and I’ve just moving all my ZWave devices over from Wink. I have discovered one issue though - If any of my ZWave switches is toggled manually (i.e. someone physically pushes the switch to turn the lights on/off) the new state of the switch is not reflected in HomeAssistant. My other ZWave devices (Lock and Thermostat) push new states to HomeAssistant just fine.

I tried playing around with the polling_interval (currently set at 60000) and set the switches to ‘poll every time’ from the UI but that didn’t seem to make a difference. I’ve noticed the behaviour on two switches, one dimmer and one switch and haven’t moved any other deivces over to HomeAssistant yet. Any ideas on how I can get HomeAssistant to pull the current state of my switches?

You forgot to mention what make and model the switches are :wink:

Thanks for the reply, both are manufactured by Leviton, note 100% sure of the model as I threw away the packaging a while ago.

When I look at the info. populated via Z Wav I see this string: product_name: Unknown: type=1c02, id=0334 for both the dimmer and switch.

That looks (from a quick Google search) to be the Leviton DZS15.

This thread looks relevant. It looks like support has very recently been added to Open Z-Wave, so the next time HA updates the version of OZW it uses, you should get support.

That said, not all older Z-Wave devices send updates (something to do with patents ISTR). It may well be that yours is one of those.

Thanks for the info!

I know whenj I was using the switches with Wink the state of the switch would be updated in the Wink app, so I’m hoping it’ll be supported. Fingers crossed it’ll be in the next release!

Wink would poll these switches to get the state updated. They do not support status updates so even with this patch you likely need to turn on polling and set some parameters for these switches.

I have a bunch of them… Slowly replacing with HomeSeer’s.

Hmm, that is unfortunate. Any idea why the state doesn’t update even when I’m polling? Currently have the polling_interval set to 60000 and the switches set to poll ‘every time’

I have a similar problem with the switch state not being updated, but only with one of 3 GE/Jasco “12727 In-Wall Smart Switch (Toggle)” switches. Two of the three will transmit an update when they’re manually operated, but the third one does not. It otherwise seems to work just fine.

Is there some configuration option in the switch that might control this behavior?

Does the third have a companion switch hooked to it?

Just as an additional update to my polling issue; When I go to the ‘ZWave’ tab in the WebGUI and slect the node and press ‘refresh’ the switch is correctly polled and the proper state shows up on the main page, is there any way to automate this process? I would assume that the Z-Wave polling schedule would take care of this, would it not?

All three have companion switches connected. I noticed tonight that more than one switch seems to be unreliable like this. two of the switches were on, and the state wasn’t reflected in HASS. I suppose I’ll have to set up polling to capture the state of the switches.

Like @christheradioguy, I notice if I perform a “refresh” operation, the current state is updated.

Curiously, operating the companion switch doesn’t seem to update the state in HASS, at least not reliably from the limited testing I did. I suppose I will just have to arrange to poll these things to get a reliable reflection of their state… haven’t been successful with that yet.

I wonder if my problem with polling and refreshing the value is that I have “switches” and not “lights”?

From Z-Wave - Home Assistant

refresh_value (Optional): Enable refreshing of the node value. Only the light component uses this. Defaults to False.

For what it’s worth I managed to come up with a hacky solution to update the state of the switches. I added an entry to my crontab to run a CURL command to use the API to call the refresh_node command. Here’s the CURL command if anyone’s interested:

curl -X POST -H “Content-Type: application/json” -d ‘{“node_id”: “3”}’ https://localhost:8123/api/services/zwave/refresh_node -k

rise and repeat for each node. Seems to work for dimmers (lights) as well as switches.

1 Like

@christheradioguy, I did something similar to what you suggested, but inside of HASS. I created a script that does:

rescan_zwave:
  alias: Refresh zwave
  sequence:
    - alias: refresh zwave 6
      service: zwave.refresh_node
      data:
        node_id: 6
    - alias: refresh zwave 7
      service: zwave.refresh_node
      data:
        node_id: 7
    - alias: refresh zwave 8
      service: zwave.refresh_node
      data:
        node_id: 8

and then wrote an automation to call it every 5 minutes:

- alias: zwave refresher
  trigger:
    - platform: time
      minutes: "/5"
      seconds: 00
  action:
    - service: script.rescan_zwave

This seems crude, yet unsatisfying. There appears to be some sort of refresh capability inside of HASS, but I’ve not been able to make it work. I didn’t investigate if there was a way to do all of the zwave devices as I don’t want to bang on my zwave door lock since it’s battery powered. I’ve had no problem getting state change messages from it since day 1.

1 Like

Ack. These sorts of tricks are horrible! And will cause scalability issues as you grow your zwave networks.

I realize this, but not sure what other options I have… It’s kinda important to know the states of my switches and HomeAssistant doesn’t seem to read the state of the switch when set to poll via the ZWave options.

Ovbiously going forward I can ensure I buy 100% compatible ZWave switches, but not sure what I can do with my existing 3 switches.

Open to better solutions…

Same boat here, all my other ZWave devices (lock, thermostats) all update their state automatically. Just these damn switches and dimmers which are a pain.

Did you set polling_interval for these 3 switches? By default polling_interval is 0 so they won’t poll.

I don’t seem to be able to get polling to work. I tried setting this up on the zwave configuration tab, which results in stuff getting put in the config/zwave_device_config.yaml file like:

lock.schlage_be469nxcen_touchscreen_deadbolt_locked_2_0:
  ignored: false
  polling_intensity: 0
zwave.lr_inner_lights:
  ignored: false
  polling_intensity: 1
switch.lr_inner_lights_switch:
  ignored: false
  polling_intensity: 1
zwave.lr_center_lights:
  ignored: false
  polling_intensity: 1
zwave.lr_outer_lights:
  ignored: false
  polling_intensity: 1
switch.lr_center_lights_switch:
  ignored: false
  polling_intensity: 1
switch.lr_outer_lights_switch:
  ignored: false
  polling_intensity: 1

And I set

 polling_interval: 30000

in configuration.yaml, but didn’t see evidence of polling in OWZ_Log.txt. Then I did the script and automation to poke at it, and I see all the activity. I would like to think that the polling would be lighter weight than the “refresh_node” operation which seems to do multiple pokes the devices, at least based on what I see in the (ever growing!) OWZ_Log.txt file.

I tried adding a customize: section to the zwave: configuration as I saw suggested elsewhere here and putting the polling_intensity stuff in there, but that wasn’t accepted.