Python script for grabbing JSON data over serial from the NinjaCape and publishing it as MQTT messages
You need to have an MQTT broker installed, such as http://mosquitto.org/
See the wiki for more information
- Messages received on 433Mhz as published to:
/ninjaCape/input/DeviceID
payload: DeviceData -
Messages to be sent out on 433Mhz should be pushlished to:
/ninjaCape/output/DeviceID
payload: DeviceData - The script subscribes to all updates on /ninjaCape/output/#
- Make it daemon-ised. At the moment I'm just running it in a 'screen' instance.
- Catch invalid JSON messages and throw an error, instead of just ignoring it.
- Update the MQTT message to have an additional layer for the 'gid' instead of assuming its zero.
- Make the MQTT topic configurable, some brokers (i.e. eventghost) require a leading slash to work