msmartbot Posted June 21, 2017 Posted June 21, 2017 Can anyone please share the information about implementing MQTT on Orange Pi Lite ? any guide or link would be helpful
chwe Posted June 21, 2017 Posted June 21, 2017 I doesn't expect that it differs so much from a opi zero.. so usage of the forum search engine would help. Search for mqtt 1
jeanrhum Posted June 23, 2017 Posted June 23, 2017 I use mosquitto as a MQTT broker on my opi+2e and it works well. It can be installed from standard repo, just do: sudo apt-get update sudo apt-get install mosquitto Before you can publish or subscribe to any topic, you have to install some clients: apt-get install mosquitto-clients Then you can send data (publish) to the broker on a topic, and/or get them (subscribe): # publish 32.5 value to topic sensor/temperature on localhost mosquitto_pub -h localhost -t sensor/temperature -m 32.5 # subscribe to topic sensor/temperature on localhost: it waits until ctrl+c for any publish values mosquitto_sub -h localhost -t "sensor/temperature" To test your local broker, you have to write the subscribe command in a terminal and the publish one in another and you can repeat the publish one with different values. You should see the values appearing in the subscribe terminal. You can also use node-red to manipulate MQTT message with other protocols or sources or targets for your data. You'll find easily some tutorials on the internet.
Recommended Posts