Using Fibaro Sensors with OpenHAB2 to display simple information using BasicUI sitemap, setting up persistence using mySQL and remote access. Hardware used (so far) -
- Fibaro Devices
- Fibaro (Motion) MultiSensor - FGMS-001
- Fibaro Door/Window Sensor - FGK-101-107
- Fibaro Wall Plug - FGWPE-101
- Aeotec Z-Wave Stick Gen5
In the current setup, PaperUI is used to discover and add new devices while HabMin provides a better UI for configuration with a mix of text configuration files OpenHAB UI's can be accessed at http://ip-network-of-device:8080
- openHAB application - /usr/share/openhab2
- Includes addons, bin, runtime, start.sh, start_debug.sh
- Site configuration - /etc/openhab2
- Includes html, icons, items, persistence, rules, scripts, services, sitemaps, sounds, things, transform
- Log files - /var/log/openhab2
- Includes events.log, openhab.log
- Userdata like rrd4j databases - /var/lib/openhab2
- Includes cache, config, etc, hueemulation, jsondb, kar, log, persistence, tmp, zwave
- Important: zwave folder includes .xml files for each node/device
- Includes cache, config, etc, hueemulation, jsondb, kar, log, persistence, tmp, zwave
- Service configuration - /etc/default/openhab2
For openHABian -
- username:password = openhabian
- all folders located at - openhabian@openhabianpi:/$
// check status of openHAB
sudo systemctl status openhab2.service
// start openHAB
sudo systemctl start openhab2.service
// stop openHAB
sudo systemctl stop openhab2.service
// restart openHAB
sudo systemctl restart openhab2.service
Restart is sometimes required when .sitemap file is changed to re-sync Basic UI so it updates in realtime.
Install ZWave binding using PaperUI. New devices can be added using PaperUI's inbox discovery feature. If device not correctly recognised/initialized, wake up again by triple clicking the b button. Ignore Z-Wave Binding instructions available online as they only seem appropriate for OH1, follow this for OH2.
Note: HabMin currently buggy for adding Z-Wave devices, so only used for configuring them at the moment
Reminder: Don't forget to wake up battery powered devices when any changes to .items file is made
For inclusion/exclusion of sensors manually (not usually required!). Aeotec User Manual
HabMin used for adding and managing devices (installed using PaperUI).
- Add Serial Controller automatically discovered once Aeotec Stick plugged in.
- Enter Port - discovered by typing $ ls /dev/tty*
- Add Fibaro devices discovered by triple clicking B button (waking device up).
- Device Node and Channels UID can be discovered once device is added. For Fibaro devices, following can be used in the .items file
Switch motionSensor "Motion [%s]" <motion> (mSensor) { channel="zwave:device:15b4d86c1b1:node4:alarm_motion" }
Number mSensorBattery1 "Battery [%s]" <battery> { channel="zwave:device:15b5860e0b8:node4:battery-level" }
OR
Number motionSensor1 "Motion Node 4 [%s]" <motion> (mSensor) {channel="zwave:device:15b5860e0b8:node4:alarm_motion" }
Number mSensorBattery1 "Battery [%s]" <battery> { channel="zwave:device:15b5860e0b8:node4:battery-level" }
alarm_motion can be set as Switch or Number to display ON/OFF or 1/0.
Note: In current binding sensor_binary is not functioning properly. As far as I can tell it gets triggered only when the device is woken up manually (by tripple clicking and b button) and stays on till next wake up time.
Number doorSensor1 "Door Node 5 [%s]" <window> { channel="zwave:device:15b5860e0b8:node5:sensor_door"}
OR
Contact doorSensor1 "Door Node 5 [%s]" <window> { channel="zwave:device:15b5860e0b8:node5:sensor_door"}
Switch heater "Plug Node 7 [%s]" { channel="zwave:device:15b5860e0b8:node7:switch_binary"}
Number heaterWatts "Watts [%s]" <battery>{ channel="zwave:device:15b5860e0b8:node7:sensor_power"}
Number heaterKWH "KWH [%s]" <battery>{ channel="zwave:device:15b5860e0b8:node7:meter_kwh"}
Note: meter_watts is not working in current binding. Instead use sensor_power.
sitemap smarthome label="FibaroOpenHAB SmartHome" {
Frame label="Movement" {
Text item=motionSensor1
Text item=mSensorBattery1
Text item=motionSensor2
Text item=mSensorBattery2
Text item=doorSensor1
Text item=dSensorBattery1
}
Frame label="Heating" {
Switch item=heater
Text item=heaterWatts
Text item=heaterKWH
}
}
Here is a snapshot of the BasicUI setup through this sitemap:
Tip: Don't forget to change Basic UI sitemap name through Paper UI.
[Rest of the document to be updated..]