I don’t see how checking the state of a device will help here. If you had a device that was always changing states then yes, that would work. But I don’t have anything like that.
When you select a device in WebCore, one of the options is status. But I can’t figure out what you would compare it to. There are no preset options for that.
Power state of the hub won’t work for me. I have mine on a UPS. Unless if the hub is offline then the power status would show up as nothing??? I might try that.
I set up a piston to execute on a timer, used 1 minute for testing, then put in an IF statement to check for power status of the hub. Unplugged the ethernet from the hub. Tried over 5 minutes and never got a result back from the power status. So unless there is some way to force a read of the power status, I don’t think that will work.
You are probably referencing the $status attribute. It directly reads the device’s Health Check Status. Unfortunatelly, there is no preset list of possible values, which led to some devices reporting as ACTIVE / INACTIVE and some as ONLINE/ OFFLINE. And some report as UNKNOWN…
Actually, my use-case is different. I’m wanting to check the online status of ip-addressable things that are not known to ST.
I’ve tried using various forms of HTTP get and checking the response codes, but (as more knowledgeable networking experts here could probably have predicted since that’s much different than an ICMP ping) that didn’t work.
How do you check the response codes for an HTTP get? I see where in Webcore to program the get, but can’t seem to figure out how to get the response code.
They don’t seem to be of much help. If I do a get with the hub hooked up I get a code of 408 and a statusok of false. If I unhook the ethernet from the hub I still get the same values. I wouldn’t care what the values are if they were different when it is hooked up and when it isn’t. But they aren’t.
Hub offline in general. Since I enabled contacts I no longer get a notification if my hub is offline for any reason. I have a ups on the system so the power option is of no use.
It’s no big deal. If I don’t get the notification I’ll notice it sooner or later anyway. Just something to play around with.
I would like to use CoRE to control my automower but I don’t know enough to dive in yet. I know that I can send GET requests to the server to control the mower but the server requires authentication and I don’t know how to incorporate the username and password. I’m not a programmer so I am looking for help in simple terms. Thanks much!
Don’t know if I’m much help but doesn’t ifttt support sending get request using webhooks, I’m guessing automation can be achieved that way by creating a virtual switch in smart things, then linking that switch to ifttt to make the get request. And automating what ever you want with conditions for the virtual switch in webcore.
As for as the log in goes I’m not sure for your particular mower but some of the things I’m used to dealing with when making web request have the login info built into the url or body