Mqtt-broker: Unterschied zwischen den Versionen

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

Aktuelle Version vom 4. Dezember 2020, 09:40 Uhr

MQTT-Broker (Mosquitto)[Bearbeiten | | Quelltext bearbeiten]

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[Bearbeiten | | Quelltext bearbeiten]

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[Bearbeiten | | Quelltext bearbeiten]

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

topics[Bearbeiten | | Quelltext bearbeiten]

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/boardUHB-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/versionUHB-power/sonoff-10/voltage


(identisch fuer sonoff 1-10)


wled/schaufenster/c


wled/schaufenster/g


wled/schaufenster/status


wled/schaufenster/v