MultiGeiger icon indicating copy to clipboard operation
MultiGeiger copied to clipboard

local WLAN http-pages, influx-db integration and translation system

Open tom-r opened this issue 3 years ago • 2 comments

Implements

  1. 2 local http-pages on sensor, which are accessible in the local WLAN
  • first page is display of actual sensor values, Wifi-quality, memory, etc
  • temp./humidity&pressure are displayed if BME 2/680 sensor is connected
  • second page show log-infos, which are normally visible on serial output only.
  • Debug level is temporarily adjustable Purpose is to monitor the current status of the sensor being installed outside, without the necessity to take it back in. Sensor data can also be monitored with broken Internet connection as long as WLAN is available.
  1. added an influx-db data export to the Config-page.
  2. added a translation system, so that language of texts displayed on the 2 pages can be selected at compile-time. Firmware is compiled then with the selected language. the only prerequisite is to set a build-flag '-DTRANSL_XX', where XX is the language. see platformio-example.ini for a sample. Languages DE and EN are available already. Auswahl_010-thumb Auswahl_011

tom-r avatar Apr 07 '22 17:04 tom-r

@TW, imo the translation for the embedded pages can differ from the translation for the documentation. @tom-r, there is a pull request in validation to simplify somewhat the different events (currently under transmit or publish) into a single event processing function. I propose to wait for its approval and then integrate influx connection afterwards.

t-pi avatar Apr 08 '22 15:04 t-pi

Da gibt's noch 'ne Baustelle die mir aufgefallen ist, mit den Logleveln: In der V1.17-0-dev existieren 2 unterschiedliche Log-Zyklen, einmal der Loglevel-Kreis mit NOLOG. CRITICAL, ERROR, WARNING, INFO und DEBUG (s. log.h), wobei NOLOG unüblicherweise = 999 gesetzt ist und dann von 4 abwärts bis DEBUG = 0; also kleinere Zahl --> mehr Info Und weiterhin der im multigeiger.ino verwendete "Serial_Print_Mode" (s. log_data.h). Hier wird mehr Info bei steigenden Werten ausgegeben. Das ist gegenläufig und schießt sich selbst ins Knie ... Deswegen hab ich in diesem PR den NOLOG ... DEBUG Zyklus umgedreht ( die hinterlegten Nummern und diese 'inkludiere alle kleineren Werte'-Regel).

Üblicherweise setzt man loglevel auf 0 und hat keine Ausgabe und je höher der Wert, desto mehr Log wird ausgegeben (so wie im Serial_Print_Mode). Zumindest kenn ich das so aus dem Berufsleben. Dann hast' außerdem die Möglichkeit noch ein zusätzliches Level mit mehr Infos einzuführen und stehst' net bei Null an ...

Am Ende gehört aber m.E. der Serial_Print_Mode-Zyklus aus log_data.h in die normalen Loglevel überführt ... (Das habe ich nicht gemacht )

tom-r avatar Apr 08 '22 17:04 tom-r