Noob here, spent the past few hours digging through forums and documentation but seem to be hitting a roadblock hoping you guys can help me with.
Goal:
Ping a local IP address, on failure, power cycle a smart plug
Progress
D-Link smart plug setup manual integration with (through configuration yaml file), works great no issues.
I’ve also setup a binary_sensor
for ping
to ping the server (powered through the dlink outlet), which appears to work correctly as well.
switch:
platform: dlink
host: 10.0.0.50
username: admin
password: XXXXX
binary_sensor:
- platform: ping
host: 10.0.0.99
name: "Check Server"
scan_interval: 30
I’m having issues though figuring out how to setup a trigger to power cycle the dlink outlet, as it does not show up as an actual “device” per-say. Because of this, does that mean that my automation would need to somehow set the state
from on
to off
then from off
to on
?
This is where i’m getting stuck at, i’m not sure how I would go about doing a power cycle on the dlink device when the ping fails, can anybody help me out or point me in the right direction please?
Reference
I have a very old server that needs to be updated/upgraded but I have not had the time yet to buy new parts, and the easiest solution for me to deal with it for now is to just power cycle. If I could get this automation setup and working it could buy me a little more time to get the funds and parts together to do the upgrade, without much downtime.
Thanks!!