Using SendtoHttp for router reset

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
kenkoknz
Normal user
Posts: 64
Joined: 03 Jul 2018, 23:46
Location: New Zealand

Using SendtoHttp for router reset

#1 Post by kenkoknz » 15 Nov 2018, 00:44

Hi All,
Trying to make a simple router reset switch i.e. when internet is disconnected, power router on off. I am aware that we can resort to Ping Plugin, but that means having to compile,etc as Ping is not in the latest Mega (although in the pipeline) yet, also TDer mention side effects of holding up processing while Ping is called.

So instead I am thinking of using Send to http to Google and check for the return OK status.
Logic is:
Every 5mins, SentToHttp to Google; check response from SendTohttp; if 200 ok, do what ever; else pulse GPIO relay (NC) to reset modem.
I ve check the command SendToHTTP by entering the command SendToHttp 216.58.196.14,8080 under tools and it works and returned "OK"

Before I start writing the rules, the question is how do I check for the response of the SendtoHttp in rules, is the response stored in some var I can access and place it in dummy variable to test?



Thanks,
Ken

User avatar
grovkillen
Core team member
Posts: 3261
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Using SendtoHttp for router reset

#2 Post by grovkillen » 15 Nov 2018, 06:13

No you cannot act on a response of send to http. I guess we could add an event for it but I'm not promising anything soon.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests