Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:mqtt_as [2020/08/18 06:44] – external edit 127.0.0.1tools:mqtt_as [2020/08/18 23:41] (current) – external edit 127.0.0.1
Line 6: Line 6:
  
 ==ESP32== ==ESP32==
 +
 +boot.py is the MicroPython startup. The others are the MQTT demo.
  
 <code> <code>
Line 15: Line 17:
  
 ==Shell== ==Shell==
 +
 +These scripts to interact with the mosquitto MQTT broker.
  
 <code> <code>
Line 23: Line 27:
 ===boot.py=== ===boot.py===
  
-The ESP32 startup file.+The ESP32 startup file which run our test after a short boot delay.
  
 <code> <code>
Line 38: Line 42:
 ===test.py=== ===test.py===
  
-Main executable called from startup.+Main executable called from startup. This demo is pulled from the README documentation with local changes.
  
 Configure SERVER here. Configure SERVER here.
Line 80: Line 84:
 ===config.py=== ===config.py===
  
-mqtt_as configuration.+mqtt_as configuration as found in distribution directory with mosquitto MQTT broker and wifi 
 +changes.
  
-Configure server, ssid and password.+Configure MQTT broker, ssid and password.
  
 <code> <code>
Line 124: Line 129:
 ===mqtt_as.py=== ===mqtt_as.py===
  
-mqtt_as excecutable.+mqtt_as excecutable. This is the main logic which maintains a Wifi connection and publishes and subscribes to topics.
  
 <code> <code>
Line 209: Line 214:
  
 ==script== ==script==
 +
 +Subscribe to the topic named 'result' published by the ESP32 module and display it.
  
 <code> <code>
 #! /bin/bash #! /bin/bash
-while : +mosquitto_sub -h 192.168.0.13 -t result
-do +
-    mosquitto_sub -h 192.168.0.13 -t result +
-    sleep 5 +
-done+
 </code> </code>
  
 ==Shell output== ==Shell output==
 +
 +Running status for the result topic.
  
 <code> <code>
Line 229: Line 234:
  
 ==script== ==script==
 +
 +Publish two messages to the topic named 'foo_topic' which the ESP32 device is subscribed to,
  
 <code> <code>
Line 243: Line 250:
  
 ==ESP32 output== ==ESP32 output==
 +
 +Show running status on the ESP32 and incoming subscription topics.
  
 <code> <code>