Mqtt-broker: Unterschied zwischen den Versionen

Aus Un-Hack-Bar
Zur Navigation springen Zur Suche springen
Zeile 12: Zeile 12:
 
=== benutzte mqtt topics identifizieren ===
 
=== benutzte mqtt topics identifizieren ===
 
  awk {'print $6'} /var/log/mqtt-debug.log |sort  |uniq |less
 
  awk {'print $6'} /var/log/mqtt-debug.log |sort  |uniq |less
 +
 +
=== topics ===
 +
 +
esphome_space/debug
 +
esphome_spacekeller/debug
 +
esphome_spacekeller/sensor/space_keller_luftfeuchte/state
 +
esphome_spacekeller/sensor/space_keller_temperatur/state
 +
esphome_space/sensor/space_luftfeuchte/state
 +
esphome_space/sensor/space_temperatur/state
 +
esphome_spacetrennwand/debug
 +
esphome_spacetrennwand/sensor/space_trennwand_luftfeuchte/state
 +
esphome_spacetrennwand/sensor/space_trennwand_temperatur/state
 +
heizung/status
 +
homegear/unhb/plain/2/0/LOWBAT
 +
homegear/unhb/plain/2/0/RSSI_DEVICE
 +
homegear/unhb/plain/2/1/ERROR
 +
homegear/unhb/plain/2/1/LOWBAT
 +
homegear/unhb/plain/2/1/STATE
 +
nachricht/an/fynn/intern
 +
rfid/sync
 +
sensor/radiation/cpm
 +
sensor/radiation/uSv
 +
sonoff-dfi/app
 +
sonoff-dfi/board
 +
sonoff-dfi/datetime
 +
sonoff-dfi/desc
 +
sonoff-dfi/freeheap
 +
sonoff-dfi/host
 +
sonoff-dfi/ip
 +
sonoff-dfi/loadavg
 +
sonoff-dfi/mac
 +
sonoff-dfi/relay/0
 +
sonoff-dfi/rssi
 +
sonoff-dfi/ssid
 +
sonoff-dfi/status
 +
sonoff-dfi/uptime
 +
sonoff-dfi/vcc
 +
sonoff-dfi/version
 +
UHB-power/sonoff-10/app
 +
UHB-power/sonoff-10/apparent
 +
UHB-power/sonoff-10/board
 +
UHB-power/sonoff-10/current
 +
UHB-power/sonoff-10/datetime
 +
UHB-power/sonoff-10/desc
 +
UHB-power/sonoff-10/energy
 +
UHB-power/sonoff-10/factor
 +
UHB-power/sonoff-10/freeheap
 +
UHB-power/sonoff-10/host
 +
UHB-power/sonoff-10/ip
 +
UHB-power/sonoff-10/loadavg
 +
UHB-power/sonoff-10/mac
 +
UHB-power/sonoff-10/power
 +
UHB-power/sonoff-10/relay/0
 +
UHB-power/sonoff-10/rssi
 +
UHB-power/sonoff-10/ssid
 +
UHB-power/sonoff-10/status
 +
UHB-power/sonoff-10/uptime
 +
UHB-power/sonoff-10/vcc
 +
UHB-power/sonoff-10/version
 +
UHB-power/sonoff-10/voltage
 +
(identisch fuer sonoff 1-10)
 +
wled/schaufenster/c
 +
wled/schaufenster/g
 +
wled/schaufenster/status
 +
wled/schaufenster/v

Version vom 25. Februar 2020, 16:21 Uhr

MQTT-Broker (Mosquitto)

Der MQTT-Broker läuft auf einem Raspi, der unter mqtt.unhb erreichbar ist. Zugangsdaten für SSH liegen in der Keepass-Datenbank. Der Zugang ist auf publickey beschränkt, die Keys sind auf dem Lab-PC hinterlegt. Von dort aus kann der Mosquitto bearbeitet werden.

mqtt logging

mosquitto_sub in einem screen starten und logs getagged ins syslog schreiben:

screen -S mqtt-debug sh -c "mosquitto_sub -t \# -v -R | logger -t mqtt-debug"

/etc/rsyslog.d/10-mqtt-debug.conf:

:syslogtag, isequal, "mqtt-debug:" /var/log/mqtt-debug.log
& stop

benutzte mqtt topics identifizieren

awk {'print $6'} /var/log/mqtt-debug.log |sort  |uniq |less

topics

esphome_space/debug esphome_spacekeller/debug esphome_spacekeller/sensor/space_keller_luftfeuchte/state esphome_spacekeller/sensor/space_keller_temperatur/state esphome_space/sensor/space_luftfeuchte/state esphome_space/sensor/space_temperatur/state esphome_spacetrennwand/debug esphome_spacetrennwand/sensor/space_trennwand_luftfeuchte/state esphome_spacetrennwand/sensor/space_trennwand_temperatur/state heizung/status homegear/unhb/plain/2/0/LOWBAT homegear/unhb/plain/2/0/RSSI_DEVICE homegear/unhb/plain/2/1/ERROR homegear/unhb/plain/2/1/LOWBAT homegear/unhb/plain/2/1/STATE nachricht/an/fynn/intern rfid/sync sensor/radiation/cpm sensor/radiation/uSv sonoff-dfi/app sonoff-dfi/board sonoff-dfi/datetime sonoff-dfi/desc sonoff-dfi/freeheap sonoff-dfi/host sonoff-dfi/ip sonoff-dfi/loadavg sonoff-dfi/mac sonoff-dfi/relay/0 sonoff-dfi/rssi sonoff-dfi/ssid sonoff-dfi/status sonoff-dfi/uptime sonoff-dfi/vcc sonoff-dfi/version UHB-power/sonoff-10/app UHB-power/sonoff-10/apparent UHB-power/sonoff-10/board UHB-power/sonoff-10/current UHB-power/sonoff-10/datetime UHB-power/sonoff-10/desc UHB-power/sonoff-10/energy UHB-power/sonoff-10/factor UHB-power/sonoff-10/freeheap UHB-power/sonoff-10/host UHB-power/sonoff-10/ip UHB-power/sonoff-10/loadavg UHB-power/sonoff-10/mac UHB-power/sonoff-10/power UHB-power/sonoff-10/relay/0 UHB-power/sonoff-10/rssi UHB-power/sonoff-10/ssid UHB-power/sonoff-10/status UHB-power/sonoff-10/uptime UHB-power/sonoff-10/vcc UHB-power/sonoff-10/version UHB-power/sonoff-10/voltage (identisch fuer sonoff 1-10) wled/schaufenster/c wled/schaufenster/g wled/schaufenster/status wled/schaufenster/v