My HubDuino (ST_Anything) supports Child Presence Devices. This was a recent addition for a ST user (long story... )
I am guessing that the Asus router code could be modified to send the properly formatted LAN packet (no OUATH required) to my HubDuino Bridge Driver / Service Manager App / Child Presence Sensor Driver. It just needs a LAN packet that contains the string "presence1 present" or "presence1 not_present" for the driver to parse() and create events for the service manager to use to automagically create child devices and keep them up to date.
curl -X POST "http://192.168.1.15/apps/api/776/home?access_token=2a16f329-7e13-4d62-b925-7682abdc7985"
curl -X POST "http://192.168.1.15/apps/api/776/away?access_token=2a16f329-7e13-4d62-b925-7682abdc7985"
With the new version of the hub 1.0.3 (available today) you can also call it like this:
curl -H "Authorization: Bearer 2a16f329-7e13-4d62-b925-7682abdc7985" -X POST "http://192.168.1.15/apps/api/776/home"
curl -H "Authorization: Bearer 2a16f329-7e13-4d62-b925-7682abdc7985" -X POST "http://192.168.1.15/apps/api/776/away"
I must be missing something here. I followed the guide here adding in the log.debug you showed above, edited the CheckUser file to just have my and my wife’s phone mac address and replaced the curl commands as you’ve shown above, but with my own ip, api # and access tokens. I’m getting the following error on the CheckIfHome script:
./CheckIfHome: line 13: qcsapi_sockrpc: not found
[: 0: unknown operand
If I try to post the curl command directly, I get a html error 500 response to:
curl -X POST "http://192.168.x.x/apps/api/391/home?access_token=fa7a7129-0382-4f53-xxxx-bf659f9f5226"
I seem to be missing something. I cannot get anything to show up in my logs. Totally empty. Not just for this app/device, but for everything. What am I missing, I’m sure its probably pretty simple. Thanks in advance
Can you give the steps necessary to find my appid? Also the API #? I'm brand new here, so I may figure it out on my own, but it's taking me a while to understand how to find these things.
At this moment, I have the app installed, I added the debug code you provided. I even created a virtual presense sensor and used the app and pointed to that sensor. But cannot find the info to add to my router script.
For each copy of the AsusWRT Wifi Presence app you install, selecting the (i) will give you the app id in the url at the top <ipaddress>/installedapp/status/<appid>
And if you selected oAuth when you installed the app driver, the access token will be listed as well on that page.
Awesome thanks for the tip. I’ve now got two presence sensors working with my asus router. Same as I had with ST. I like to use wifi for unlocking doors, because it requires me to be even closer to the house.
Ummmm, no. Asus Presence is a combination of an Asus Router and an OAUTH App running directly on the Hubitat hub.
HubDuino is used for integrating an Arduino or ESP8266 with Hubitat. Two completely different things.
Earlier, I was only suggesting that one could follow the HubDuino design in order to implement Asus Presence on Hubitat without the need for an OAUTH App.
Asus also supports IFTTT and can trigger something (i.e. a Hubitat virtual switch) when a device connects. However, and for unknown reasons, they don't have an IFTTT service for when a device disconnects, unlike TP-Link and Google WiFi which support both connect and disconnect triggers.
Is there a ping command that we can use in a dh? If yes then this could be a way to detect presence. But only if our phone is getting static IP from the router. @mike.maxwell is this possible?
Been trying to get this to work with no success. This works fine in SmartThings but tried the various commands in this thread to no avail. Was there something that has changed in the recent firmware to cause this to no longer work?