Currently have:
- OH2 running on Ubuntu AMD64.
- Aeotec Z-Stick configured and working.
- Z-Wave & MQTT bindings installed and configured.
- Z-Wave items configured via HABMin and outputting data correctly in event.log.
- MQTT binding is connected to broker.
I have had MQTT/InfluxDB/Grafana on my network for other reasons, what I’m attempting to do is log data that OpenHab generates (for the case of this example, a Z-Wave motion sensor) onto MQTT so I can use existing infrastructure to log/graph.
From the documentation this looks like exactly what I need:
Number garageTemp {mqtt=">[mybroker:openhab/garage/temp:state:*:default]"}
The problem is I’ve created the items I want to log in HABMin, they were automatically created when I added the Z-Wave device, so the item files don’t exist in /etc/openhab2/items. So couple of queries:
- Is that the best way long term to create Z-Wave items?
- Can I edit the files that HABMin creates to add the appropriate MQTT commands? If so, where is that file?
- Is there a better way to get data generated from OpenHab2 to my MQTT broker?