Friday 14 September 2018

Tinkering OpenWRT (14) : Python MQTT Setup





root@JoySince:~# mosquitto_sub  -t "topic" -v
topic OFF


####################################

Could download directly from openwrt:

root@JoySince:/tmp# wget --no-check-certificate https://pypi.python.org/packages
/source/p/paho-mqtt/paho-mqtt-1.1.tar.gz
wget: not an http or ftp url: https://pypi.python.org/packages/source/p/paho-mqtt/paho-mqtt-1.1.tar.gz

Download to PC and upload it to openwrt:
scp -P 2022 paho-mqtt-1.1.tar.gz root@192.168.0.24:/tmp/

Cannot unzip it...
root@JoySince:/tmp# tar xfz paho-mqtt-1.1.tar.gz
tar: can't open 'z': No such file or directory

Unzip locally on PC and upload to openwrt
scp -P 2022 -r paho-mqtt-1.1/ root@192.168.0.24:/tmp/

cd paho-mqtt-1.1
python setup.py install



ref
https://github.com/relayr/python-sdk/blob/master/docs/manual/openwrt.txt
http://lukse.lt/uzrasai/2015-02-internet-of-things-messaging-mqtt-2-install-python-clients-on-pc-carambola-rpi/
http://www.steves-internet-guide.com/into-mqtt-python-client/
http://www.steves-internet-guide.com/publishing-messages-mqtt-client/




No comments:

Post a Comment