I would like to write a smart app that would get some information from my router (either via telnet/ssh or http)
and according to the response it should do something.
Is this possible ?
I haven’t written any smart apps yet and I don’t know the guidelines.
I will write a script on my router which pings a specific device and provide “present” /“absent” status.
The result should be processed as a presence sensor on the ST platform.
But the DD-WRT example is a little different than what I was looking for. In that example, router triggers the ST platform. I was looking for a way to query router from ST Hub. Because if I do that, I won’t need access to cloud for just pinging something inside my house.
Is there an example for that reverse query mechanism ?
In any case, I would like to try the DD-WRT example.
But I couldn’t understand how to fill up
you need a smartapp to do the status change of the presence sensor. you cannot configure Oauth derectly on a device type without a smartapp. so you do need a smartapp to enable the mapping for the URL and then trigger the device type.
the smartapp is simple to customise to trigger the action you want.
so I first create a device from example presence sensor codes.
then I create a smartapp (also from example codes)
then , shall I have to add a device from the device handler I create in the first step ?
what will be the network ID to use there ?
and I don’t understand in the DR-WRT example below; there’s only one code for smartthings platform. Which one is that ? device handler or the smart app ?
@Fuzzyligic thanks. I am trying to use the example in your post.
I installed the virtual presence sensor device handler and then created a device from it with network ID 3000
Then I installed the smart app.
At this point I understand that I should install an instance of it with the virtual presence sensor device I just created.
So I select thet presence sensor and give a name. I don’t select any modes.
When I tap “done” app says : “unexpected error occured”