Getting ZWN-BPC PIR motion sensor to work with openHAB

Hello all,

I am trying to get openHAB to work with ZWN-BPC zwave PIR sensor. The user manual appears to suggest that the sensor will send a BASIC on/off command. I am getting the BATTERY message with battery level, but I don’t know how to read BASIC, and the sensor does not appear to send any message when it detects motion (there’s a bulb on the sensor that blinks when motion is detected). Following is the poorly written user manual. How do I manually read the sensor value? Setting respond_to_basic or refresh_interval values for BASIC does not seem to help.

http://enerlites.com/media/mconnect_uploadfiles/z/w/zwn-bpc_3.28.pdf

I Have to same sensor and it seems to work correctly. This is what I have in the items file:

Contact sensor_1_motion “sensor [MAP(motion.map):%s]” (Motion) { zwave=“5:command=sensor_binary,respond_to_basic=true” }

Number sensor_1_battery “Battery [%s %%]” (Motion) { zwave=“5:command=battery” }

Let me know if there is anything else I can provide that might help…

Denis

Hi Denis, thanks for the reply. I tried your item definition, but without the map. I am still getting nothing. The only input openHAB sees from the sensor is a battery state update every 30 minutes. If I remove the item definition shouldn’t I still see communication (sensor_binary) between the sensor and the server?

Thanks again
Hiran

Hiran

I’m pretty new to openHAB, so I don’t know the answer to your question. Maybe you should try enabling the Z-Wave logging and see if anything shows up? I also made my Z-Stick the masterController, have you tried that? Both these items are discussed here:

Denis

Denis, I am new here too! I tried your suggestion to make my Z-Stick the masterController. I am running in debug mode, so every communication should register in my log. But I am not getting any signal other than battery stat. I am guessing my sensor is defective. I’ll ship it back to Amazon and get a new one.

Thanks for the reply

Hiran

Ok, I have a new sensor from Amazon. But still nothing seems to work.

Still the only update tp SENSOR_BINARY is when I press the button on the sensor. It says it is going back to sleep mode, and after that I see no SENSOR_BINARY updates again.

What am I doing wrong? This is my item definition:

Contact living_PIR1_motion "Living Room Presence [%d]" (Living,Presense) {zwave="7:command=SENSOR_BINARY,respond_to_basic=true"}

This is what I am trying to display using a sitemap:

sitemap default label="label" {
    Frame label="frame" {
	Text item=living_PIR1_motion
    }
}

Denis,

How do you know when your sensor gives a signal? I have been trying to display it in the browser UI. Are you using some rule to trigger something?

I got a new sensor, but it does not seem to do anything different :frowning:

Thanks

This device is not in the database, so you won’t be able to configure it properly. Until configured, I don’t think you’ll be able to get it to report motion.

Please can you post the XML file for the device here (ie the one in /etc/zwave/node7.xml) and I’ll add it.

1 Like

Hi Chris, this is the xml file:

node7.xml (3.5 KB)

Thank you!

I’ve added this to the database - if you get the nightly build from cloudbees tomorrow it should be in there. Update the JAR file in the addons file, delete the node7.xml file, and restart. This should (hopefully!) automatically set up the device to send notifications.

Chris

1 Like

Thank you Chris!

Chris,

Find attached my XML file for the motion sensor. Can you please point to some info about the database your are mentioning?

node5.xml (3.6 KB)

Thanks

The database is compiled into the binding. Each zwave device has some identifiers that we use to identify it - a manufacturer ID, and a device type and ID, and sometimes a version…

From these IDs, we link this to the database. The database is used to define how the device should be configured. It lists the configuration parameters and association groups that you see in HABmin - without the database, we don’t know this information from the device, and HABmin can’t be used to configure it.

The database is made up of a bunch of XML files - they are compiled into the binding to ensure that they are correct since getting the information wrong can cause problems…

There is information here on the format of the database files (and here for the upcoming OH2 format).

When we update the database, you need to update the binding JAR file to the latest version - this can be downloaded from cloudbees.

Chris

Chris,

I deleted node7.xml and restarted openHAB, but for some weird reason it does not create a new node7.xml file. Is this normal?

I am now getting notifications from the PIR sensor now! Thank you!

If it doesn’t create the XML, then it means that the node is not completing initialisation. This may take some time (a few wakeups) but if it hasn’t happened in a few hours (depending on the wakeup period) then it would be good to get a log (debug) of this so I can check as we may need to modify the database…

I checked the etc folder after manually waking up my motion detector, and found at some point openHAB has of course created the xml file.

One weird thing happened the first time I used the updated zwave binding. OpenHAB kept trying to send a message to a ‘node 255’ which I have never connected to my network. It also broke another node which connected a GE zwave socket. Restarting openHAB fixed both issues though.

I have still not used HABmin to manually configure anything. Thank you very much for your help Chris! I am beginning to realize the usefulness of HABmin.

Node 255 is the controller, so you will normally see a lot of these messages - especially on startup.

1 Like

Chris,

This is a dumb question.
Enerwave PIR sensor seems to have a parameter (parameter 0) that sets the time it takes to send the OFF command once triggered ON.
In the database it seems to default to zero. How can I manually configure it to a different value? Can I use HABmin to do this?

Thanks in advance!

Yes - if it’s showing up in HABmin, then you should be able to change the value. When you change the value, the background in HABmin will show yellow (for that parameter). You then need to either wait for the device to wake up (maybe it takes an hour normally), or you can wake the device up manually (probably pressing the little button on the back 3 times). Once the data is transferred to the device, the background should change to white again.

I hope that makes sense?

Cheers
Chris

Maybe I am looking in the wrong place. Below is what I see in HABmin > Configuration > Bindings > (zwave bundle) > Devices. I don’t see a “Refresh” button as described in https://github.com/cdjackson/HABmin/wiki/Z-Wave-Configuration. In fact, even for the other nodes I have, “Refresh” button doesn’t ask me to input new values. I have tried Safari and Chrome to access HABmin on a Mac. Both gave the same result.