Automatic switch OFF and ON a TAPO smart plug if it's offline

Hello, i’m new about this useful forum and SmartThings programming.

I’ve got a connected TAPO plug that powers the router.

I’m trying to reset the router by turning off and on a connected TAPO plug, in case the plug is OFFLINE.

I wrote the following simple routine, which unfortunately doesn’t seem to work:

[
{
“if”: {
“equals”: {
“left”: {
“device”: {
“devices”: [
“XXXXXXXXXXX”
],
“component”: “main”,
“capability”: “healthCheck”,
“attribute”: “DeviceWatch-DeviceStatus”
}
},
“right”: {
“string”: “offline”
}
},
“then”: [
{
“command”: {
“devices”: [
“XXXXXXXXXXX”
],
“commands”: [
{
“component”: “main”,
“capability”: “switch”,
“command”: “off”
}
]
}
},
{
“sleep”: {
“duration”: {
“value”: {
“integer”: 15
},
“unit”: “Second”
}
}
},
{
“command”: {
“devices”: [
“XXXXXXXXXXX”
],
“commands”: [
{
“component”: “main”,
“capability”: “switch”,
“command”: “on”
}
]
}
},
{
“sleep”: {
“duration”: {
“value”: {
“integer”: 5
},
“unit”: “Minute”
}
}
}
]
}
}
]

Any suggestions?

Thank you very much!

If the plug is offline don’t expect to turn it on or off… And if the router is needed for the WiFi Tapo plug to work, when you turn off the plug you won’t be able to turn it on since there’s no WiFi.

1 Like

Hi Mocelet, thank you for the reply.

I’ve tryed manually, to set a “timer” that switch on the plug after 1 minute (for example) and switch it off. It works, plug will return at status on.

I was hoping that the routine would also work in the case of offline, with some local operation, i saw that device has attribute “status offline”… but i’m not sure it works as i hope! :wink:

Local operation is only possible if you’re using Matter integration or a custom driver that uses TP-Link API and your WiFi access point is not the router that you’re restarting (and it’s not involved in any other way). If it’s the cloud integration it won’t work if the plug has no Internet access.

1 Like

I’ve seen the specific plugs kindly suggested by Andreas that do what I want, but I don’t like having to pay for an app service to do what I’m paying for the hardware.
Unfortunately, there don’t seem to be any alternatives. Do you know any tutorials on how to enable local integration via Matter? TAPO plug is Matter compatible, so i could try.
Thank you very much for your help.

Then again, it won’t work, if the plug is locally controlled it will never be offline from the hub point of view so the routine won’t run. And if it’s actually offline the routine won’t be able to control it.

1 Like

I don’t see a subscription fee associated with the following device.

Rebooter Pro – Automatic Router Rebooter & Wi-Fi Reset – Grid Connect Rebooter Pro – Automatic Router Rebooter & Wi-Fi Reset – Grid Connect

What I do at home when I have an Ethernet connected ST v2 hub is:

I have a ZigBee plug on my WiFi router. I manually can turn the plug off from ST. Then I have a local automation to turn it back on after 60 sec. My Ethernet connected devices such as ST generally work even when my Wi-Fi is acting up.

I have a Meross WiFi plug on my ST router that I can operate from the Meross app if ST gets wonky. This plug resets to its previous state after a power outage.

I use a Zigbee smart plug that’s connected directly to the SmartThings hub’s Zigbee wireless as well since it’s not connected to the WiFi router which my Matter smart plugs are connected to. Similar Automation Routine, if this Zigbee smart plug that my home router is connected to is Off for N seconds, then power it back on.

It’s obviously confusing since SmartThings shows Automation Routines that have Matter devices in them as running local. But to run local, the local wireless network that the Matter device is connected to has to be online.

So, if I use a Zigbee plug to power the WiFi router, I could test the status of the WiFi network and automatically turn the plug off and on again?

The Keep Connect doesn’t require a subscription and the app is only required for the initial configuration. ~$50.

I would buy one in an instant, but sadly my important equipment is hooked up to Mini USB UPS.

With the ZigBee plug if you notice Wi-Fi problems like offline Wi-Fi devices you can remotely turn the ZigBee plug off and it will automatically turn back on.

I assume you are in the EU.

You can get a 4G smart socket.

You text commands to cycle.

https://www.aliexpress.com/item/1005008743241084.html

1 Like

4 sockets!

1 Like