hi

my devices send their value with MQTT without JSON (like '15' in the payload). How can I monitor that value?

Mario


Article Comments

Hello,

as of now, the sensor parses only JSON output, not unformatted content.

While there is no ETA, we look at an option to parse unformatted data.


Feb, 2021 - Permalink

Hallo, habe auch nach einer Lösung gesucht und bin hier gelandet. Nun habe ich eine eigene Lösung mit "Mosquitto for Windows" erstellt. Hier ein Beispiel für die Abfrage eines Wertes per Programm/Skript (Erweitert) - Sensor: REM BAT-Datei im Verzeichnis ...PRTG Network Monitor\Custom Sensors\EXEXML\ set MSUB="c:\Program Files\mosquitto\mosquitto_sub.exe" set HOST=1.2.3.4 for /F %%i in ('%MSUB% -C 1 -h %HOST% -t topic/powerdc') do @set POWERDC=%%i echo ^<?xml version="1.0" encoding="Windows-1252" ?^> echo ^<prtg^> echo ^<result^> echo ^<channel^>PowerDC^</channel^> echo ^<unit^>W^</unit^> echo ^<float^>1^</float^> echo ^<value^>%POWERDC%^</value^> echo ^</result^> echo ^<text^>%POWERDC% W^</text^> echo ^</prtg^>

Das Topic "topic/powerdc" liefert genau einen Wert. Natürlich können auch weitere Topics abgefragt werden (for /F ... do @set WERTX=%%i).

Lars


May, 2023 - Permalink

Hi,

auch für mich interessant. Bei msxfaq.de wurde das erläutert. Man kann als JSON-Pfad einfach $ eintragen. Dann wird der Wert dargestellt. Leider geht so pro Sensor immer nur ein Topic. Ich habe noch keine Möglichkeit gefunden "Sub-Topics" mit den Kanälen zu erfassen.


Jun, 2023 - Permalink

Hello,

that is correct, a sensor supports just one topic. Allowing multiple topics per sensor would make the sensor, and its settings page, too complex.


Jun, 2023 - Permalink