Rule for turning on IKEA tradfri zigbee power outlet

135 views
Skip to first unread message

Erik Marius Bautz-Holter

unread,
Nov 20, 2021, 6:08:54 AM11/20/21
to TasmotaUsers

I got a Sonoff zigbee bridge which is flashed with Tasmota and used thorugh Home Assistant to control a number of IKEA tradfri power outlets. I would like to use one of the IKEA power outlets to reset my 4g/wifi router. I can turn the power outlet for the router off from Home Assistant, but obviously not on again since the wifi connection between Home Assistant and the Sonoff bridge is down.

Is there a way to setup a tasmota rule that would detect that the given power outlet is turned off, and automatically turn it on again 30 seconds later (to restart the wifi router)?

Any help would be appreciated!

Br. Erik

Philip Knowles

unread,
Nov 20, 2021, 8:19:01 AM11/20/21
to Erik Marius Bautz-Holter, TasmotaUsers

For a normal Tasmota device

Rule1 on power1#state=0 do backlog delay 300; power1 1 endon

Rule1 1

However, this is a slightly dodgy method as it will always turn it back on after 30 seconds

In a ZigBee bridge you would replace the power1 1 with a ZBSend and the power1#state=0 with a ZBReceived

I would probably use a variable within the ZBBridge as a trigger rather than actually switching the output something like

On var1#state=reset do backlog ZBSend {"Device": "0xxxx", "Send":{"Power":0}}; delay 300; ZBSend {"Device": "0xxxx", "Send":{"Power":1}}; var1 OK endon

 

Regards

 

Phil K

Sent from Mail for Windows

--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/8e57e78a-0939-4fec-83a4-add608b14c46n%40googlegroups.com.

 

Reply all
Reply to author
Forward
0 new messages