Can't get sensor to act as binary

Hi all, I’ve seen others have had this issue too but wondering if anyone can help me find the answer.
My hardware is: RPi running hass.io, with AEOTEC Z-Stick plugged in. So far so good. Tried to sync my AEOTEC door sensor using ‘Add Node’ in the Z-wave config within hass.io GUI but clicking ‘Add Node’ didn’t seem to do anything, so I synced it in the normal way (pressing button on stick and on sensor. Both devices are showing in hass.io:

image

however, triggering the sensor yields no apparent activity in the GUI. When I check the OZW logs (in the GUI), I see this:

So, it seems to be sending through a ‘basic set’ instead of ‘binary set’.
I scroll up to Node Management, choose my sensor from the dropdown, choose ‘binary’ from the Config Parameters dropdown:

… and click ‘Set Config Parameter’.

Then update the logs, they show this:

Then I go back to ‘States’, nothing has changed. Trigger the sensor again, and it’s still coming through as ‘Basic’:

In Developer Tools / Info button (left menu at the bottom right), the following error also shows up:

2017-08-29 15:30:23 ERROR (MainThread) [homeassistant.core] Invalid service data for zwave.set_config_parameter: required key not provided @ data['value']. Got None

Could this mean that it’s the parameter value that’s wrong? I’ve found the troubleshooting page for this sensor:

… and it says:

So I’ve tried changing parameter 121 in the parameter value dropdown, tried making this ‘basic and binary’ or just ‘binary’ neither has yielded any useful change to the logs (as far as I can tell) when it comes to the result of triggering the sensor:

2017-08-29 16:21:22.077 Detail, Node003, Refreshed Value: old value=255, new value=0, type=byte
2017-08-29 16:21:22.077 Detail, Node003, Changes to this value are not verified
2017-08-29 16:21:22.077 Detail, Node003, Notification: ValueChanged
2017-08-29 16:21:24.653 Detail, Node003,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x03, 0x03, 0x20, 0x01, 0xff, 0x2c
2017-08-29 16:21:24.653 Detail, 
2017-08-29 16:21:24.653 Info, Node003, Received Basic set from node 3: level=255. Treating it as a Basic report.
2017-08-29 16:21:24.653 Detail, Node003, Refreshed Value: old value=0, new value=255, type=byte
2017-08-29 16:21:24.654 Detail, Node003, Changes to this value are not verified
2017-08-29 16:21:24.654 Detail, Node003, Notification: ValueChanged

In trying to troubleshoot, I’ve fired up Virtualbox on my (Win10) PC, run CentOS7, installed Docker and then ozcp (to try to edit the sensor and change it to binary through there), but the z-stick doesn’t show up in ozcp (maybe due to windows incompatibility, I’m not sure)

Any advice would be appreciated. Thanks!

You’ve checked that you don’t have a binary_sensor. node for it already?

Hi Tinkerer, thanks for your help.

I’m not 100% sure so will show you what I can see -

Here’s what I can see on the dashboard page of the GUI:

… and here’s what I can see on the Config / Z-wave page:

Cheers

You’ll want to restart HA, so that the entity names are correctly picked up (instead of it showing as zwave._). For what follows I’ll assume it comes up as zwave.aeotec_zw089, but you’ll need to check to see what it’s really called.

Once you’ve done that, look in your dev states tab (<>) for entities named binary_sensor.aeotec_zw089. You’ll also find many entities titled sensor.aeotec_zw089, to match the various things it can report.

Thanks Tinkerer,
A restart of Home Assistant strangely doesn’t fix the naming of the sensor, I’ve done so a few times over the past 24 hours (including powering off/on the RPi)
Looking in the dev states tab, here’s what I see for that sensor:

That’s the zwave details for the entity, which has zero to do with using it as a sensor. As I said, you need to be looking at the sensor. section, and the binary_sensor section, not the zwave. section. Look for ones where the old_entity_id ends in _4.

hmm ok, in that first column under ‘States’. the only sensor, or binary sensor, mentioned is this one:

It sounds like it hasn’t completed the update of the device, or the device itself is broken.

If you look at the manual for the device, it’ll tell you how to wake it. Battery powered devices can only be contacted when they’re awake, which they’ll do on a schedule (possibly only once a day), but you can manually wake them.

As soon as you wake it, in the Z-Wave control panel in HA (Configuration -> Z-Wave) use the Refresh Node option for that node (you may want to get that all prepared, so you just have to hit the Refresh Node button). Wait a minute then look at the Entities of this node drop down, just underneath.

great - thanks - I will try when I get home in a few hours.
This is the manual: https://aeotec.freshdesk.com/helpdesk/attachments/6009584697

It mentions holding the z-wave button for 6 seconds and releasing after 8, but I can’t tell whether this will wake the device or ‘abort waking’. But will give it a try.

Reading the manual, you’ve got 8 seconds after manually waking it before it goes back to sleep. You wake it by holding the button for 6 seconds.

That section is simply explaining that if it wakes itself, it stays awake for 10 minutes, except when it is either (2) told to go to sleep, or (1) you trigger a manual wake.

OK, making progress!
I woke the sensor and clicked Refresh Node, now I see this under Entities of this Node:

… and in the ‘dev state’ section I have:

image

and also:

image

then I’ve restarted HA, and now the device name is showing up properly:
image

When I manually trigger the sensor and check the logs, it still shows up as a Basic report:

Over to you, thanks again!

The only thing that matters is that binary_sensor.sensor node. That’ll change when the door opens and closes.

oh ok, great! Where can I see that change? So far I’ve been triggering the sensor (open/close door) and have been checking the OZW logs, seen a Basic report, and thought I was defeated because nothing was changing on my dashboard.

Presumably though I can write some code which triggers something when that change occurs that you’re talking about, but I can’t see where that change occurs.

Even when I open/close the door, these values all stay the same on the dashboard:
image
(I removed / re-added the zwave gear, hence Node 4 has changed to Node 2)

Hmmmm, are none of the other sensor. values changing either?

Now, that it’s reporting as always “on” suggests that the magnet isn’t close enough to the sensor to trigger the sensor. If you manually place the magnet against the sensor, does it trigger then? If that doesn’t trigger then there’s some form of fault with the device (from a failure of the sensor hardware, to something as stupid as the magnet being installed the wrong way around).

If I have a look in the dev-state section, the only sensor. which is now showing up (since the device deletion / re-addition to hass.io) is this one:


… and on that screen, certainly nothing changes when I trigger the sensor, if that’s where I’m meant to be checking for change.

Re. magnet distance from sensor - I’m yet to install the sensor in the door so this is just triggering it by holding the magnet and sensor together in my hands. I can see from the consequent red lights that the triggering is occurring.

every time I do this triggering (putting the magnet up to the sensor, then removing), it shows up in the OZW logs (as basic report) but I don’t see any trace of change elsewhere.

Ok, have you checked the Report Type setting for the device (in the Z-Wave control panel). I suspect the default is Basic Set only https://github.com/OpenZWave/open-zwave/blob/master/config/aeotec/zw089.xml

Also, you should find some zensor.aeotec_zw089_... nodes

I don’t know how to check the Report Type setting as such - what I have done is set the Config Parameter to 1 (Sensor Binary Report Toggle), but this yields no change in the OZW logs, and when I trigger the sensor, I get the same as usual (treated as Basic report, as per my last screenshot).
If I sent the Config Parameter to 121, with Config Value = Sensor Binary Report, this DOES yield a change in the OZW logs as follows:

… but then when I trigger the sensor again, it’s the same old story - treating as basic report, no change registering on the main dashboard, etc.

I can’t see any other sensor. nodes aside from the one I’ve screenshotted above. Here’s the full list (I copy/pasted to excel):

As just mentioned in Discord -> Go to the Z-Wave control panel, find the entity, find the Node config options piece, and Config parameter.

Thanks for the help in discord!
Just to close this off for future viewers, the reason why my Report Type wasn’t changing from Basic to Binary was because I hadn’t woken the device before doing so. I found the manual for the device online, it said I need to hold the button down for 6 seconds to wake the device up for a few minutes, and that did the trick.

@alltherage
Did you ever get this working with events showing in Hassio?

I have the ZW089 returning binary sensor reports (after setting parameter 121) however the old and new values are always the same?!. I suspect this is the reason why they’re not showing up in Hassio Logbook or History.

E.g. note the old and new values are both true in the second line below:

2017-09-06 13:00:10.924 Info, Node011, Received SensorBinary report: Sensor:54 State=On
2017-09-06 13:00:10.924 Detail, Node011, Refreshed Value: old value=true, new value=true, type=bool
2017-09-06 13:00:10.924 Detail, Node011, Changes to this value are not verified
2017-09-06 13:00:10.924 Detail, Node011,   Expected reply and command class was received
2017-09-06 13:00:10.924 Detail, Node011,   Message transaction complete

I also tried changing config parameter “1: Sensor Binary Report Toggle” but that changes both new and old values to false…

Cheers,
Justin