Differences

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

Link to this comparison view

iothings:laboratoare:2025:lab3 [2025/10/11 13:20]
dan.tudose [Publish Sensor Readings From BME680 as JSON]
iothings:laboratoare:2025:lab3 [2025/10/13 17:20] (current)
dan.tudose [Platformio.ini]
Line 48: Line 48:
     * ''​sensors/​room1''​     * ''​sensors/​room1''​
     * ''​sensors/​temperature/​office/​room1''​     * ''​sensors/​temperature/​office/​room1''​
 +{{ :​iothings:​laboratoare:​2025:​single-level-wild-card--1-.png?​600 |}}
  
 == # (Multi-Level Wildcard) == == # (Multi-Level Wildcard) ==
Line 61: Line 62:
  
   * ''#''​ alone matches **all topics**.   * ''#''​ alone matches **all topics**.
 +
 +{{ :​iothings:​laboratoare:​2025:​single-level-wild-card--1--1.png?​600 |}}
  
 == Rules and Constraints == == Rules and Constraints ==
Line 112: Line 115:
   adafruit/​Adafruit BME680 Library   adafruit/​Adafruit BME680 Library
   bblanchon/​ArduinoJson @ ^7   bblanchon/​ArduinoJson @ ^7
-  256dpi/MQTT @ ^2.5.2 ​      ​+  256dpi/MQTT @ ^2.5.2 ​   
 +  knolleary/​PubSubClient @ ^2.8    ​
 </​code>​ </​code>​
  
Line 159: Line 163:
 At the same time, the ESP32 regularly publishes telemetry data through MQTT. It sends heartbeat messages with uptime, signal strength, and network information,​ and it transmits environmental sensor readings from the BME680 to a designated topic as JSON data. All MQTT communication uses Quality of Service level 1 to ensure that messages are delivered at least once, providing reliable data exchange between the device and the broker. The code also manages automatic reconnection with exponential backoff, meaning it gracefully retries connecting to the MQTT broker when disconnected without flooding the network. In essence, from the MQTT point of view, this device behaves as a resilient, bidirectional IoT client that reports data, accepts remote commands, and maintains a persistent, reliable session with the broker. At the same time, the ESP32 regularly publishes telemetry data through MQTT. It sends heartbeat messages with uptime, signal strength, and network information,​ and it transmits environmental sensor readings from the BME680 to a designated topic as JSON data. All MQTT communication uses Quality of Service level 1 to ensure that messages are delivered at least once, providing reliable data exchange between the device and the broker. The code also manages automatic reconnection with exponential backoff, meaning it gracefully retries connecting to the MQTT broker when disconnected without flooding the network. In essence, from the MQTT point of view, this device behaves as a resilient, bidirectional IoT client that reports data, accepts remote commands, and maintains a persistent, reliable session with the broker.
  
-[[iothings:​laboratoare:​2025:lab3_code4|Click here to access your code for this example.]]+[[iothings:​laboratoare:​2025_code:lab3_4|Click here to access your code for this example.]]
  
 Test it out using [[https://​dantudose.github.io/​labs/​lab3_4.html | this link]]. Test it out using [[https://​dantudose.github.io/​labs/​lab3_4.html | this link]].
iothings/laboratoare/2025/lab3.1760178018.txt.gz · Last modified: 2025/10/11 13:20 by dan.tudose
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0