This is a bridge between MQTT and OpenZWave. Still very much a WIP and will gradually be expanded with new features.
Please note: This was just an experiment. I no longer use this or make any changes to it. Nowadays I am using the excellent (and also opensource) Home Assistant which also has the ability to connect it to MQTT and interface with it.
In the environment you want to manage you put a local device with a Zwave interface (e.g. USB or rPI Daughterboard). This script will run on that device and bridges between MQTT and OpenZwave. It will execute the requested commands posted in the queue and run sensor readings which will be reported back via MQTT (e.g. light sensor, motion etc).
Any process that is capable of working with MQTT can subscribe to the channels and receive the information. Depending on its filters it can execute particular actions. For instance:
- You have a motion sensor and it has detected motion
- It sends the signal to the Z-Wave controller (which is connected to the device running the mqtt-openzwave bridge)
- The bridge application will send the notice on to the MQTT bus with details required
- A listening process executes specific actions (e.g. creates a picture, sends a message, triggers other devices via MQTT)
This setup allows your base to be as small and flexible as possible while the "external runners" can be as complex as you want. Also, it can mean that you can run the bridge locally but anything else (e.g. webinterface) remotely.
Bugs, comments, Pull-requests?
Any comments or fixes are more than welcome.