BeNext door sensor not showing status

Hello,

Sorry if this question was already asked before, but after few hours of trial/error and rtfm, I can’t make the Benext door sensor work. (https://www.benext.eu/static/manual/doorsensor.pdf)
HA seems to find it and there is a “benext door sensor” in the top bar, but opening/closing the switch doesn’t change its status.
Some post says that I need to use a template to create a virtual sensor that will reflect the changes, so I added this section:

binary_sensor:

  • platform: template
    sensors:
    frame_front_door:
    friendly_name: Front Door
    value_template: “{{ states.sensor.benext_door_sensor_alarm_level.state == ‘255’ }}”
    entity_id: sensor.benext_door_sensor_alarm_level

From the log of ozw, i see that the event is triggered:

2018-02-11 15:05:12 INFO (MainThread) [homeassistant.core] Bus:Handling <Event zwave.node_event[L]: entity_id=zwave.benext_door_sensor, node_id=3, basic_level=255>
2018-02-11 15:05:14 INFO (MainThread) [homeassistant.core] Bus:Handling <Event zwave.node_event[L]: entity_id=zwave.benext_door_sensor, node_id=3, basic_level=0>

If I go to the developper tools → states, I don’t see any changes (I’m looking for a ‘255’ value on the page) no matter I refresh the page.
On this page there are different names for this sensor, so it’s also confusing which Id I should use (moreover, I don’t find an entity id where I can see the 255 value)
binary_sensor.benext_door_sensor_sensor
zwave.benext_door_sensor

So it seems there are some missing link between the zwave event and the HA component/sensor?!
Any help would be greatly appreciated. I can provide any log if needed

Regards,

Pretty sure with sensors like this you need to change the reporting type on the z-wave node. This may require you to keep the device awake while actively changing the node type in the z-wave configuration. I don’t remember what reporting type you need to change it to… Notification maybe? I think the problem stems from the fact that a basic report type does not update the zwave entity in Hass. So even though the basic_level attribute is changing, the template never sees the state change because the zwave state doesn’t change.

What reporting options do you have for the device?

Hello Petro,
Thanks for your answer, I feel less hopeless :smiley:

I’ve checked the commands the device can accept, but the closest one seems to be:
External contact
Description:
Default:
Configure what the external contact sends when trigger
0x00 (send alarm report)
Size:
Param1:
1 byte*
If 0x00: Send an alarm report with type 2
If 0x01-0xFF: Send a basic set frame to all nodes in association group 2.

I’ve been able to change it from 0x00 to 0x01 and after a restart the value seems to be persisted (I had to open the device and wake it up few time with the internal switch).
However, it is still not reported correctly from homeassistant.
I’m quite confused why there is indeed an event generated:
2018-02-12 20:53:49 INFO (MainThread) [homeassistant.core] Bus:Handling <Event zwave.node_event[L]: basic_level=0, node_id=3, entity_id=zwave.benext_door_sensor>

But homeassistant can’t link it with the interface :frowning:
I’ve read the manual but couldn’t find a any other option that looks what you said
( https://www.benext.eu/static/manual/doorsensor.pdf )
If I use node-red instead, I can easily capture the event and do something, so why is homeassistant not able to detect/map it??
why " basic report type does not update the zwave entity in Hass" ??

Sorry if this is a newbie question, but from a logical point of view I don’t get it…
Maybe need to right some python module for this switch?

Best regards,

I also found out some tricks on https://www.domotiga.nl/projects/domotiga/wiki/Devices_ZWave_BeNEXT_Door_Sensor
The device external alarm wasn’t associated, so I did what they recommend (associate with controler node 1)
But in the end it is still not recognized.
The temperature and tamper sensor does work but not the magnetic contact

That’s odd. I looked at the document and the reporting section didn’t really have any information. When you load up HA and open/close your door, does HA see a event change in the log?

Hi Petro,
The first line is when I open the device or if I press the internal tamper switch.
But for the magnetic door switch there are only logs similar to the second one.
If I go to the developer section, as soon as I trigger the tamper sensor, there is a value sensor.benext_door_sensor_alarm_level that changes. But with the magnetic door, no value changes (can’t find 255 in the page as it represents the ‘door open event’.

I starts to wonder if I would need to code something specific for this device?

Regards,

2018-02-14 07:36:31 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state zwave.benext_door_sensor=sleeping; manufacturer_name=BeNext, sentTS=2018-02-14 07:36:31:142 , max_baud_rate=40000, wake_up_interval=7200, is_ready=True, lastRequestRTT=125, sentFailed=2, receivedUnsolicited=34, product_name=Door Sensor, receivedTS=2018-02-14 07:36:31:135 , sentCnt=22, query_stage=Complete, is_info_received=True, retries=0, capabilities={‘routing’, ‘beaming’}, lastResponseRTT=95, neighbors={4, 6}, receivedCnt=47, receivedDups=3, averageResponseRTT=187, friendly_name=BeNext Door Sensor, is_zwave_plus=False, is_awake=False, old_entity_id=zwave.benext_door_sensor_3, node_id=3, battery_level=100, averageRequestRTT=112, is_failed=False, node_name=BeNext Door Sensor, new_entity_id=zwave.benext_door_sensor @ 2018-02-14T08:36:31.375648+01:00>, old_state=<state zwave.benext_door_sensor=ready; manufacturer_name=BeNext, sentTS=2018-02-14 07:36:16:975 , max_baud_rate=40000, wake_up_interval=7200, is_ready=True, lastRequestRTT=103, sentFailed=2, receivedUnsolicited=34, product_name=Door Sensor, receivedTS=2018-02-14 07:36:31:135 , sentCnt=21, query_stage=Complete, is_info_received=True, retries=0, capabilities={‘routing’, ‘beaming’}, lastResponseRTT=95, neighbors={4, 6}, receivedCnt=47, receivedDups=3, averageResponseRTT=187, friendly_name=BeNext Door Sensor, is_zwave_plus=False, is_awake=True, old_entity_id=zwave.benext_door_sensor_3, node_id=3, battery_level=100, averageRequestRTT=99, is_failed=False, node_name=BeNext Door Sensor, new_entity_id=zwave.benext_door_sensor @ 2018-02-14T08:36:31.244036+01:00>, entity_id=zwave.benext_door_sensor>

2018-02-14 07:36:37 INFO (MainThread) [homeassistant.core] Bus:Handling <Event zwave.node_event[L]: basic_level=0, node_id=3, entity_id=zwave.benext_door_sensor>

Hello,
I’ve found a workaround that seems to work but I couldn’t change the status of the sensor in the topbar.
If I add some automation event:
automation:
- alias: Test Next door
trigger:
platform: event
event_type: zwave.node_event
event_data:
entity_id: zwave.benext_door_sensor
basic_level: 255
node_id: 3
action:
# - service: notify.notify
# data:
# message: ‘Door was open’
- service: switch.toggle
data:
entity_id: binary_sensor.benext_door_sensor_sensor
I can see in the log that it indeed react to the event but it still doesn’t toggle the icon.
Any idea what I should do?
Regards,

Laurent

Sorry I didn’t notice you replied until now… Can you post your automation using the </> button at the top? And when you reply, click reply on my post instead of the thread reply. Thread reply’s do not notify recipients in the thread.

Hi Petro,

Thanks for the followup. I didn’t know I should reply to u instead of the thread… This forum client is not so intuitive and I don’t like some of its behavior:frowning:
I ended up with some dirty solution but it seems to work.
I had to create an automation on the zwave event, publish an mqtt event so I can reuse it via a sensor:

    automation:
     - alias:  Next door open
       trigger:
         platform: event
         event_type: zwave.node_event
         event_data:
           entity_id: zwave.benext_door_sensor
           basic_level: 255
           node_id: 3
       action:
         - service: mqtt.publish
           data:
             topic: '/home/doors/cave'
             payload: 'Open'
             retain: 'false'
         - service: notify.my_email
           data:
             title: 'Door was open!!'
             message: 'Someone open the door of the cave!!'


 - alias:  Next door close
   trigger:
     platform: event
     event_type: zwave.node_event
     event_data:
       entity_id: zwave.benext_door_sensor
       basic_level: 0
       node_id: 3
   action:
     - service: mqtt.publish
       data:
         topic: '/home/doors/cave'
         payload: 'Closed'
         retain: 'false'

sensor:
    - platform: mqtt
    name: 'Cave door'
    state_topic: "/home/doors/cave"

I think that’s a good solution to get around your issue. It is a little ass-backwards but as long as the event fires, you should have your sensor and your notifications.

Hello sorry to break into this topic, i got the same issue. I got 6 brand new door sensors of benext, but m not able to get the door open/close setting right . is there something i can change somewhere?

In my log i have the following:

#open the door
2018-11-14 21:40:27.965 Detail, Node002, Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x02, 0x03, 0x20, 0x01, 0xff, 0x2d
2018-11-14 21:40:27.984 Detail,
2018-11-14 21:40:27.984 Info, Node002, Received Basic set from node 2: level=255. Sending event notification.
2018-11-14 21:40:27.984 Detail, Node002, Notification: NodeEvent
#closing the door
2018-11-14 21:40:31.080 Detail, Node002, Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x02, 0x03, 0x20, 0x01, 0x00, 0xd2
2018-11-14 21:40:31.080 Detail,
2018-11-14 21:40:31.081 Info, Node002, Received Basic set from node 2: level=0. Sending event notification.
2018-11-14 21:40:31.081 Detail, Node002, Notification: NodeEvent

My states are
Entity = binary_sensor.benext_door_sensor_sensor_2
{
“node_id”: 2,
“value_index”: 0,
“value_instance”: 1,
“value_id”: “72057594076463104”,
“friendly_name”: “BeNext Door Sensor Sensor”
}

What do i have to do to get it working in the Frontend?

it’s a binary_sensor. It should be on or off already. Are you looking at the state of the binary sensor?

If i open the door it is saying level=255, when i close the door it is saying level=0
But i don’t see any changes on the front end.

i’m new to Home Assistant, i got it running in openHab but that is not stable enough for me.
Continuous freezes. So i want to set it over to HA.
But i’m now trying for the third day on a row to get the door sensors working.

Am i doing something wrong here? Maby looking in the wrong place to get the sensors working?

Then you need to implement the method that @Laurent did. Look up creating an MQTT broker and sensor topics. Then implement his method which populates a MQTT topic with open or close based on zwave node events.

ok, you still have to create work arounds. there is not something i can change that value 255 stays for value 1 ?

no because the device isn’t reporting a property to a sensor. You need to access the state changes through the events. And because you have to do that, you need a way to store the event data. Because you need to store the data, that forces you to use MQTT. There are other ways, but MQTT is the most streamlined for a novice user. If you know python can write a script instead.

Ok, so there is nothing to change.

I’ve also asked the manuafacutre of the product. They repleyed me the following.

BeNext Project Support (BeNext)

15 nov. 14:52 CET

Beste Ronald,

Bedankt voor uw vraag. Wij zijn niet zo zeer bekend met hoe de Home Assistent werkt. De waarde van de deur is niet te veranderen in de deur sensor, wel is 255 “open” en 0 “gesloten” (volgens Z-Wave standaard). Ik weet niet of dit mogelijk aan te passen is in de Home Assistent interface?

Mvg,
Thajan

Met vriendelijke groet,
BeNext Support

TRANSLATED

Dear Ronald,

Thanks for your inquirer, we are not familiar how Home Assistant works. The value of the door sensor could not be changed. According to the Z-wave standard we are using 255 as open value and 0 as closed. I don’t know of you can changes this in Home Assistant interface?

Mvg,
Thajan


So those sensors working fine in Domoticz and openHab, but not in Home Assistant.

How do other door sensors work? Are they sending value 1 for door open instead of 255 ?

With Kind Regards,

Ronald

zwave door sensors in ha typically send 22 or 23 for on/off. Zwave binary_sensors door sensors appear as on/off.

Your zwave device isn’t being created in home assistant, which typically means that OpenZwave does not see it as a specific device. So the problem probably lies in OpenZwave, but it could lie in HomeAssistant. It’s hard to tell at this point.

So what are your solutions?

  1. Play with the device settings in the zwave config and see if any device changes make a sensor or binary_sensor appear in home assistant. This may not work as there could be no setting that makes home assistant see the device.
  2. Write up an issue with home assistant about the device not appearing. They will find the root cause, but if they don’t have the hardware… most likely nothing will be done.
  3. Figure out why home assistant doesn’t see the zwave device by debugging into it yourself and making the change yourself.
  4. Implement @laurent’s method.

Ok, i will look into it a bit more, i’m certain that the issue lies in HA, because openhab and Domiticz are showing the status correctly, i could raise an issue, but indeed if they don’t have the sensor. Nothing will happen.

So 1 is not working, 2 could be done, but no hardware, i will try 3 tonight otherwise i will go for option 4.

Thanks anyway

Hi @GodZZila,
Did you ever manage to fix this?
I bought two different brand sensors: 1 of these and a Neo CoolCam.
The Neo CoolCam just works in HA (after I tripple clicked the include button on the device after including via the Z-Stick), but for the BeNext I have the same problems as you have…