AME Status and Logging

From IoT with AME
Revision as of 15:06, 28 December 2020 by Ctreber (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The AME Stack

AME Status Information and Logging

Since a whole bunch of components are working together things can get tough when there is a problem. The AME stack provides logging via I2C and status information via a RGB-LED.

Logging with "Logsury"

Logging can be switched off in production

  • at build time
  • at run time via switching an I/O pin on or off on Arduino reset

If logging is switched off at build time, the logging code completely disappears from the program (accomplished with C++ macros). Logging library and statements do not consume any space or processing time.


Event Visualization with the "Event Facility"

The AME Stack issues events that may be of interest to a user:

  • Regarding the WLAN connection:
    • Note to self: Description to be done (no connection/ trying/ connected)
  • Regarding the TCP connection:
    • Note to self: Description to be done (no connection/ trying/ connected)
  • When the MQTT connection is in place
    • The LED twitches every second, indicating the Arduino is running and not stuck in an endless loop
    • Every time a message is sent, it flashes in blue, indicating the attempt is being made
    • Every time a message is received, it flashes in ???, indicating a message has been received (the broker did sent it our way)
    • Every time a ping response is received, it changes color (either green or magenta), indicating pings are being sent and received (the broker replied)

These events get handled by an Event Facility that comes in three versions:

  • "Do Nothing" (it does what you think)
  • Use a programmable RGB LED (using colors and flashing)
  • Use an LCD screen (symbols in the top right corner)

The programmable status LED consumes only one Arduino pin while it is able to provide quite a bit of useful information. The library to "talk to it" is very small.

The AME Stack