Sonoff ZigBee Smart Switch Mini - per Node schalten?

Node-RED als CCU3/RaspberryMatic Addon, WebApp, HomeKit, ...

Moderator: Co-Administratoren

Antworten
holger22
Beiträge: 16
Registriert: 26.09.2022, 19:09
System: CCU

Sonoff ZigBee Smart Switch Mini - per Node schalten?

Beitrag von holger22 » 10.12.2022, 18:44

Hallo,
ich benötige mal wieder Unterstützung.
Es geht um einen "Sonoff ZigBee Smart Switch Mini".
Das Auslesen der Schaltzustände funktioniert ohne Probleme.
Sonoff ZigBee Smart Switch Mini READ.JPG
Sonoff ZigBee Smart Switch Mini READ.JPG (20.07 KiB) 300 mal betrachtet

Code: Alles auswählen

[{"id":"1c3e987b.3ab74","type":"mqtt out","z":"b47e4440.f97278","name":"","topic":"tele/TempBuero/SENSOR","qos":"0","retain":"false","broker":"27a455a8.7daf2a","x":690,"y":320,"wires":[]},{"id":"7e3b9d95.5f6624","type":"inject","z":"b47e4440.f97278","name":"true","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"device\":\"0x38A9\",\"send\":{\"Power\":1}}","payloadType":"str","x":380,"y":280,"wires":[["1c3e987b.3ab74"]]},{"id":"283f4bab.ecc2bc","type":"inject","z":"b47e4440.f97278","name":"false","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"device\":\"0x38A9\",\"send\":{\"Power\":0}}","payloadType":"str","x":380,"y":380,"wires":[["1c3e987b.3ab74"]]},{"id":"27a455a8.7daf2a","type":"mqtt-broker","name":"podbie57","broker":"192.168.178.56","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"true","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
Beim Schalten über einen Node bin ich noch auf dem Holzweg. Es funktioniert nicht.
Wahrscheinlich habe ich hier noch einen Denkfehler. :?:
Sonoff ZigBee Smart Switch Mini WRITE.JPG
Sonoff ZigBee Smart Switch Mini WRITE.JPG (20.25 KiB) 300 mal betrachtet

Code: Alles auswählen

[{"id":"be80048.8f232f8","type":"mqtt in","z":"b47e4440.f97278","name":"","topic":"tele/TempBuero/SENSOR","qos":"0","datatype":"auto","broker":"27a455a8.7daf2a","x":410,"y":480,"wires":[["3948c59a.e6f9ba"]]},{"id":"8640b8ff.f82ff8","type":"debug","z":"b47e4440.f97278","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":920,"y":480,"wires":[]},{"id":"55dbde72.9c528","type":"change","z":"b47e4440.f97278","name":"Status","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.ZbReceived.0x38A9.Power","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":480,"wires":[["8640b8ff.f82ff8"]]},{"id":"3948c59a.e6f9ba","type":"json","z":"b47e4440.f97278","name":"","property":"payload","action":"obj","pretty":false,"x":610,"y":480,"wires":[["55dbde72.9c528"]]},{"id":"27a455a8.7daf2a","type":"mqtt-broker","name":"podbie57","broker":"192.168.178.56","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"true","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
Wäre für jeden Tip dankbar.

Holger

Benutzeravatar
Henke
Beiträge: 1524
Registriert: 27.06.2022, 20:51
System: CCU
Hat sich bedankt: 141 Mal
Danksagung erhalten: 306 Mal

Re: Sonoff ZigBee Smart Switch Mini - per Node schalten?

Beitrag von Henke » 10.12.2022, 19:14

Mal blind geraten, über die gleich Hürde gestolpert wie ich am Anfang.

Get und Set brauchen bei MQTT unterschiedliche Pfade.

Nach: https://www.zigbee2mqtt.io/devices/ZBMINI.html
Switch
The current state of this switch is in the published state under the state property (value is ON or OFF). To control this switch publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"state": "ON"}, {"state": "OFF"} or {"state": "TOGGLE"}. To read the current state of this switch publish a message to topic zigbee2mqtt/FRIENDLY_NAME/get with payload {"state": ""}.
Linkquality (numeric)

Antworten

Zurück zu „RedMatic“