Here is some examples / sample code for the RaspberryPI / MQTT / Mosquitto / Ardunio.
SSH to your RaspberryPi, with mosquitto installed, if not already running execute the command “sudo mosquitto” to start the broker.
Now your mosquitto server is running, run the command “mosquitto_sub -d -t HomeZoneCH“, what does this do? it subscribes the RaspberriPi to the topic HomeZoneCH

Open a second ssh session to your Pi and run the command “mosquitto_pub -d -t HomeZoneCH -m “CellarLightOff”” you should see the message below.

On the first SSH session you have open you should see the message below appear!

Now with the code runnning on my Arduino after a reset I receive the following message on the first SSH session.

Now I know this is super simple and your asking yourself what value does this have? it’s just a simple demo of the messaging system… I will be sharing all my final code with Webserver, mosquitto interface etc… as soon as I feel it’s ready. I am moving house soon and will not have much time to focus but I hope to have a good update next month regarding my progress
Have a look at some useful links here, here and here
HumpA