Configuring a Aeon Labs Multi Sensor with openHAB

I got a new sensor today, an Aeon Labs Aeotec Z-Wave Multi-Sensor
. This is a motion sensor that can report Light, Humidity, Temperature, Motion.

The first thing is to add the sensor to your z-wave network. I read something interesting in searches for how to set this up. If you configure your device at one location say your desk then move the sensor to another location you need to update the neighbors using ozwcp (for a guide on how to compile it on centos 6 see my last blog post).

I am using an Aeon DSA02203-ZWUS Labs Z-Wave Z-Stick Series 2 USB Dongle
, so I unplug it from the USB port then push the button, then push the black button on the Multi Sensor and it is joined to the network.

Then start ozwcp

./ozwcp -d -p 1234

Now make sure the red light is on for the sensor so we know it is awake, if not push the black button. Enter the device name, I have a special configuration so it always maps to /dev/zwave ( will write up how to do that later ). Click on initialize

Screen Shot 2014-07-12 at 12.37.58 AM

Select the multinode sensor (note is says awake)
Screen Shot 2014-07-12 at 12.41.04 AM

select Request Node Neighbor Update and press Go

Screen Shot 2014-07-12 at 12.42.19 AM

wait for the log window to stop updating.

Select configuration for the Sensor

Screen Shot 2014-07-12 at 12.47.49 AM

Set Group 1 Reports: to 225, which is decimal for the binary map 11100001, the first bit reports the battery, the 5th bit Temperature, the 6th bit Humidity, the 7th bit Luminance, then click the submit button next to it. I also set the Group 1 Interval: to 240 (4 minutes) while testing, again click the submit button next to it. Make sure the log messages have finished updating then press refresh to make sure the setting have taken. Once finished click on the close button in the Controller Interface box.

In open hab configure the following items

configuration/items/motion.items

 
Group Motion
Number sensor_1_temp "Temperature [%.1f °F]" (Motion) {zwave="2:1:command=sensor_multilevel,sensor_type=1"}
Number sensor_1_humidity "Humidity    [%.0f %%]" (Motion) {zwave="2:1:command=sensor_multilevel,sensor_type=5"}
Number sensor_1_luminance "Luminance    [%.0f Lux]" (Motion) {zwave="2:1:command=sensor_multilevel,sensor_type=3"}
Contact sensor_1_motion "sensor [MAP(motion.map):%s]" (Motion) {zwave="2:1:command=sensor_binary,respond_to_basic=true"}
Number sensor_1_battery "Battery [%s %%]" (Motion) {zwave="2:command=battery"}

configuration/rules/motion.rules

import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*


var Number counter = 0
var Number lastCheck = 0

rule "corLightOn"
when
        Item sensor_1_motion changed from CLOSED to OPEN
then
        sendCommand(light_living_room_switch, ON)
end

rule "corLightOff"
when
        Item sensor_1_motion changed from OPEN to CLOSED
then
        sendCommand(light_living_room_switch, OFF)
end

sitemaps/motion.sitemap

sitemap home label="Main Menu"
{
        Frame {
                Group item=Motion label="Motion" icon="firstfloor"
                }
        }

}

transform/motion.map

CLOSED=No Motion
OPEN=Motion
-=No Motion

if everything goes to plan you should see the following when you visit https://hostname:8080/openhab.app?sitemap=motion

Screen Shot 2014-07-12 at 1.08.12 AM

And when you move in front of the motion detector it should turn on the light_living_room_switch, and turn it off 4 minutes later if no motion detected.

4 thoughts on “Configuring a Aeon Labs Multi Sensor with openHAB

  1. Ghostface

    Thx a bunch, very helpful! Advise to the ones following it to the letter: make sure your sensor is really node 2 or else change the zwave=”2:1: parts accordingly 🙂

    Reply
  2. Morten Attermann Holst

    How is this sensor working out for you?
    Mine eat batteries like a mad man, and never report battery.

    Reply
  3. Pingback: Openhab Beginner’s Guide Part 2: Zwave, Mqtt, Rules And Charting – UTUDU

Leave a Reply

Your email address will not be published. Required fields are marked *