Seite 1 von 1

MQTT und Sonoff mit Pulsetime

Verfasst: 20. Dez 2022 10:39
von togi99
Hallo zusammen,

ich bin gerade dabei meine OpenHab2 Instanz nach OH3 zu migrieren.
BTW: In der OH2 Instanz hatte ich noch MQTT1 am Laufen.

Ich nutze Sonoff SV in der Garage um als Taster für die Tore zu agieren.
Diese Sonoffs (Tasmota) sind auf Pulsetime mit 0,5 sec eingestellt.

In OH3 stelle ich fest, dass wenn ich den Schalter triggere, er auf ON springt aber nicht mehr automatisch auf OFF (nach der Pulsetime).
Somit ist der Status falsch.
Das war in meiner bisherigen Konfigration anders.

Kann mir jemand auf die Sprünge helfen was nicht passt?

Things Definition (auszug)
Thing topic sonoff6 "Test Öffner" {
Channels:
Type switch : schalter [ stateTopic="stat/sonoff6/POWER", commandTopic="cmnd/sonoff6/POWER", on="ON", off="OFF" ]
Type switch : kontakt1 [ stateTopic="stat/sonoff6/POWER2", on="AUF", off="ZU" ]
Type switch : kontakt2 [ stateTopic="stat/sonoff6/POWER3", on="ZU", off="AUF" ]
}

Switch Sonoff_6 "Garagenöffner Test" { channel="mqtt:topic:mosquitto:sonoff6:schalter" }
Switch Sonoff_6_Kontakt1 "Garagetor Test offen" { channel="mqtt:topic:mosquitto:sonoff6:kontakt1" }
Switch Sonoff_6_Kontakt2 " Garagentor Test zu" { channel="mqtt:topic:mosquitto:sonoff6:kontakt2" }

Danke & viele Grüße
Tobi

Re: MQTT und Sonoff mit Pulsetime

Verfasst: 20. Dez 2022 17:50
von udo1toni
Die Frage ist: Wie sah die Konfiguration unter openHAB2 aus?

By the way: Markiere Code (Konfiguration im allgemeinen ist auch Code) als Code, das ist besser lesbar.

Re: MQTT und Sonoff mit Pulsetime

Verfasst: 20. Dez 2022 19:21
von togi99
Hallo Udo,

die Konfiguration unter OH2 und MQTT1 anbei.

items

Code: Alles auswählen

Switch Sonoff_5 "Garagenöffner Tobi" { mqtt=">[mosquitto:cmnd/sonoff5/POWER:command:*:default], <[mosquitto:stat/sonoff5/POWER:state:default]" }
Switch Sonoff_5_Kontakt1 "Garagetor Tobi [MAP(switch.map):%s]" { mqtt="<[mosquitto:stat/sonoff5/POWER2:state:default]" }
Switch Sonoff_5_Kontakt2 "Garagetor Tobi [MAP(switch2.map):%s]" { mqtt="<[mosquitto:stat/sonoff5/POWER3:state:default]" }

Re: MQTT und Sonoff mit Pulsetime

Verfasst: 20. Dez 2022 21:59
von udo1toni
Hast Du das Modul zwischendurch getauscht? Weil, mqtt1 -> sonoff5, aber mqtt2 -> sonoff6.

Schau bitte mal mit einem mqtt Sniffer wie z.B. MQTT Explorer auf die Antwort des mqtt Device, nicht dass es da ein anderes Topic gibt (z.B. POWER1).

Re: MQTT und Sonoff mit Pulsetime

Verfasst: 23. Dez 2022 09:53
von togi99
Ich weiß zwar immer noch nicht woran es liegt, die Konfiguration ist es jedenfalls nicht.
Wenn OH neu starte, dann funktioniert es wieder reibungslos.