Skip to content
SeventhSERGIO edited this page Jun 28, 2018 · 31 revisions

Repository

git clone https://github.com/SeventhSERGIO/intel_edison.git

MQTT

https://ricveal.com/blog/primeros-pasos-mqtt/

Updating the MQTT* C client library on the Intel® Edison board

opkg install coreutils

opkg remove paho-mqtt-dev

opkg remove paho-mqtt --force-depends

git clone https://github.com/eclipse/paho.mqtt.c.git

cd paho.mqtt.c

export prefix=/usr; make install

Compile a mqtt program

Subscribe

gcc -L/home/root/paho.mqtt.c/build/output mqtt_asynchronous_sub.c -lpaho-mqtt3c -o mqtt_asynchronous_sub

Publish

gcc -L/home/root/paho.mqtt.c/build/output mqtt_asynchronous_pub.c -lpaho-mqtt3c -o mqtt_asynchronous_pub

Publish A0 with mraa

The Python client can be downloaded and installed from PyPI using the pip tool:

pip install paho-mqtt

Subscribe

python sub.py

Publish

python mqtt_pub.py

Subscribe and toggle a relay

python rele_mqtt.py

Subscribe - LCD

Mqtt Dashboard

Home Assistant

http://192.168.1.108:8123