Hallo,
ich habe meinen Shelly Plus 2pm über MQTT2 eingebunden und das vorhandene Template verwendet.
Im Prinzip funktioniert es ganz gut, aber leider wird kein state aktualisiert.
Auch das Internal "STATE" steht auf "???".
jsonMap
params_switch_0_state:state params_switch_0_aenergy_total:aenergy_total params_switch_0_apower:apower params_switch_0_temperature_tC:temperature params_switch_0_temperature_tF:0 params_wifi_sta_ip:ip temperature_tC:temperature temperature_tF:0
readingList
$DEVICETOPIC/online:.* online
$DEVICETOPIC/events/rpc:.* { return if $EVENT =~ m{switch:[1-3]}; $EVENT =~ s/"output":true/"state":"on"/g; $EVENT =~ s/"output":false/"state":"off"/g; json2nameValue($EVENT,'',$JSONMAP) }
$DEVICETOPIC/status/switch.0:.* { json2nameValue($EVENT, '', $JSONMAP) }
$DEVICETOPIC/status/mqtt:.* { json2nameValue($EVENT, '', $JSONMAP) }
fhem2shelly/rpc:.* {}
shellyplus2pm_b8d61a8999c8:shellyplus2pm-b8d61a8999c8/status/sys:.* { json2nameValue($EVENT) }
shellyplus2pm_b8d61a8999c8:shellyplus2pm-b8d61a8999c8/status/switch_1:.* { json2nameValue($EVENT) }
shellyplus2pm_b8d61a8999c8:shellyplus2pm-b8d61a8999c8/status/ble:.* ble
shellyplus2pm_b8d61a8999c8:shellyplus2pm-b8d61a8999c8/status/cloud:.* { json2nameValue($EVENT) }
shellyplus2pm_b8d61a8999c8:shellyplus2pm-b8d61a8999c8/status/input_0:.* { json2nameValue($EVENT) }
shellyplus2pm_b8d61a8999c8:shellyplus2pm-b8d61a8999c8/status/input_1:.* { json2nameValue($EVENT) }
shellyplus2pm_b8d61a8999c8:shellyplus2pm-b8d61a8999c8/status/wifi:.* { json2nameValue($EVENT) }
shellyplus2pm_b8d61a8999c8:shellyplus2pm-b8d61a8999c8/status/ws:.* { json2nameValue($EVENT) }
Was muss ich noch eintragen, damit auch der state richtig gesetzt wird?
Vielen Dank
lg, Gerhard
Hmmm, das Ding steht auf "generic update over MQTT" (oder so)?
Ggf. könnte sich mal wieder (ohne Worte...) was in der firmware geändert haben, es gibt einmal mehr anscheinend wieder andere/neue Topics, über die man nachdenken müßte.
Da hier ein list oä. ebenso fehlt wie die Info, was an Inhalt über welchen Topic kommt, fehlt mir der Lappen für die Glaskugel.
Am besten auch mal diese readingList aufräumen, da wird teilweise mit $DEVICETOPIC gearbeitet, teilweise das Topic manuell gesetzt. Lieber alles ordentlich mit $DEVICETOPIC machen. (Dann steht da noch fhem2shelly als Topic? Woher kommt das denn? Naja, was solls ...)
Dabei fällt mir auf: Einmal gibt es $DEVICETOPIC/status/switch.0
und einmal shellyplus2pm_b8d61a8999c8:shellyplus2pm-b8d61a8999c8/status/switch_1
Was ist denn richtig, switch_n oder switch.n? Vielleicht liegt da schon der Fehler – switch.0 auf switch_0 ändern und gut ist?
Und switch_1 müsste dann doch auch rausfallen, sofern hier nur ein Kanal gesteuert werden soll?
Hallo
Vielleicht mal mit dem Attr stateFormat Experimentieren.
mfg.