Freitag, 12. August 2022

Tasmota / Sonoff MQTT Cheat Sheet


Weil ich nach 2 Jahren mal wieder vergessen hatte wie das hier geht:

 

Prefix defaults are/can be:
cmnd/stat/tele


Full Topic consists of %prefix%/%topic%/ in Tasmota language, e.g. listening like this

mosquitto_sub -h 192.168.178.32 -t tele/#
mosquitto_sub -h 192.168.178.32 -t tele/solar/#
mosquitto_sub -h 192.168.178.32 -t tele/solar/SENSOR

... and e.g. acting like this:

mosquitto_pub -h 192.168.178.32 -t cmnd/fluter/POWER -m ON
mosquitto_pub -h 192.168.178.32 -t cmnd/fluter/POWER -m OFF

 

Vielleicht noch folgendes in der Console setzen:

PowerDelta 110

TelePeriod 60


Von https://tasmota.github.io/docs/Commands/#power-monitoring

 
TelePeriod     See current value and force publish STATE and SENSOR message
0 = disable telemetry messages
1 = reset telemetry period to firmware default (TELE_PERIOD)
10..3600 = set telemetry period in seconds (default = 300)

PowerDelta<x>
    Set maximum delta of phase a<x> in energy monitoring devices to report on active power load change while the power is ON. PowerDelta will not report when the power turns off. 
0 = disable reporting on power change
1..100 = set reporting on percentage power change to send an MQTT telemetry message
101..32000 = set reporting on absolute power change to send an MQTT telemetry message (offset by 100, e.g., 101=1W, 207=107W)