MQTT Publish for Raspberry Pi AIY Projects

I have a lot of things in my house connected using a Raspberry Pi mosquitto broker and Node-RED so I wanted to add simple publish commands to my AIY Project.

The code is hosted at Github here:

For this you will just need to copy the file to your ~voice-recognizer-raspi/src/ folder.

For it to work you need to install paho-mqtt:
sudo pip install paho-mqtt

I’ve set this up as an example to swich lights on and off so you will need to tweak it to suit your own setup.

One Comment

Add a Comment

Your email address will not be published. Required fields are marked *