Before I go into the details of how the devices are configured I would like to give you a system diagram with devices /components overlay.
Step 1.
Installing Openhab
I used the instructions available on the site https://www.openhab.org/download/
- Add the repository key
- Add the HTTPS transport for APT
- Add the repository
- Update the package lists and install the openHAB distribution package
- (Optional) Install the add-ons for offline use 🛈 You don't need the add-ons package if your machine has Internet access, openHAB will download add-ons online as necessary.
- Navigate with a web browser to
http://<ip-address>:8080
- Continue by following the First-time setup chapter of the New User Tutorial
wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | sudo apt-key add -
sudo apt-get install apt-transport-https
echo 'deb https://dl.bintray.com/openhab/apt-repo2 stable main' | sudo tee /etc/apt/sources.list.d/openhab2.list
sudo apt-get update && sudo apt-get install openhab2
sudo apt-get install openhab2-addons
Step 2.
Z Wave Installation
To enable RaspberryPI to receive z wave messages from the door sensor we need plug the z-wave adaptor and install open z-wave control panelTo install the driver for receiving the z-wave and the control panel to manage the devices that listen to z-wave can be found here
https://lickthesalt.com/2016/04/11/compiling-open-zwave-control-panel-on-a-raspberry-pi-3/
Initialise door sensor z-wave virtual device to receive messages from door sensor
To configure a new device to listen to z-wave communication follow steps below . The process will initialise Z wave in open-zwave-controller.
Openhab does not necessarily bundle zwave binding that works with the HS1DS-Z HEIMAN door sensor. You can use kafar console to update the zwave binding. Below step helps you do just that.
- Stop HA - sudo service hass-daemon stop
- Confirm HA has stopped - sudo service hass-daemon status -1
- Start OZWCP
- cd open-zwave-control-panel
- sudo ./ozwcp -p 8888
- Open OZWCP your ip:8888
- Enter /dev/ttyACM0 into device field and click initialize button
- DONT NOT TICK THE USB CHECK BOX
- Check the driver path before you run the initiate
- You need to make sure that to reset the door sensor by pressing the reset button after having removed the batteries. Put the batteries on After resetting.
- Press the activation button three times in 1.5 seconds and take the sensor close to the controller
- Once the devices gets activates and added to the controller, kill the open-zwave-controller application
- Start Openhab application and add z-wave binding
Step 3.
MQTT broker installation
MQTT messages are created using openhab binders for MQTT. This allows just to convert the messages from Z-wave devices into MQTT messages.
You can install the Mosquito Raspberry PI package using this link http://www.instructables.com/id/Installing-MQTT-BrokerMosquitto-on-Raspberry-Pi/
To setup MQTT messages using openhab, please use the link below.
Step 4
Openhab z-wave binder installation.
- Install z-wave binding via paper ui
- Go to karaf console and uninstall the binding via console
- Search for the zwave binding. In my case it had id 198
- Uninstall the binding using this id
- Install newest snapshot got to '/usr/share/openhab2/addons' (if you installed with apt-get)
- cd /usr/share/openhab2/addons
- run command sudo wget https://openhab.ci.cloudbees.com/job/openHAB2-Bundles/lastSuccessfulBuild/artifact/bindings/org.openhab.binding.zwave/target/org.openhab.binding.zwave-2.0.0-SNAPSHOT.jar
- restart openhab sudo /bin/systemctl restart openhab2.service
Step 5
Openhab Energine binder
Follow similar steps like above to install the Energine e-TRV binders.
The binder can be found at this site
Step 6.
Fire up openhab and using the paper UI , discover and configure the zwave adapter, door sensors and e-trv's.
Next Steps
Once the installation and configuration are complete, you will be able to receive MQTT message from openhab in regular intervals set via mosquito configuration.
In my next set of blogs, I will discuss about how the messages are configured and how the whole architecture differs from WOO reference architecture.
Thanks for sharing this wonderful knowledge about smart home. If you are looking for a professional company who offer services for SMART HOME SG Singapore, then you must choose FuturaHaus. We provide smart home services in All Singapore at reliable prices. To explore more about us Visit our website now!
ReplyDeleteThanks for sharing this amazing knowledge about smart home. If you are looking for a professional company who offer services for SMART HOME SINGAPORE, then you must choose FuturaHaus.
ReplyDelete