I’ve found the issue.
The “unschedule” command was overriding my “runin” command.
I removed “unschedule” and now it works as I want.
hi
i cant find the file SmartApp_HostPinger.txt
do you mean the groov script from this folder [smartapps/jebbett/host-pinger.src]?
i copied the script for the folder but after publishing it i could not OAuth. it gives me an error of access denied to
graph-eu01-euwest1.api.smartthings.com.
not able to proceed…
Yes that’s the correct file, what exact error are you seeing and where are you seeing it? I assume in the exe?
Have you enabled OAuth in ST and have you correctly updated the configuration file for the exe with the correct ids?
Hello, I had a quick question: How can I make the PING device an actual Switch that I can turn on/off via the app? The ST app just shows the status (Presence?). I have logic in WebCore to handle the on/off actions, but would like to be able to turn them on/off via the app.
Sorry I don’t understand the requirement? The ping device reports the state of a device, so this can’t be manually switchable, otherwise the state in ST would not match the real life state?
It’s like having a temperature sensor that you can change the temperature on?
If I haven’t understood your question then let me know!
Just create a virtual switch or virtual presence device in ST. You don’t need to use Host Pinger for that.
Sorry, to clarify, I’m using HostPinger to keep those Virtual switches updated with the status of some computers in my house.
I wanted to be able to send a command to turn them on/off by just switching the PING device on/off in the ST app. I then use WebCore (or Send Events to EventGhost smartapp) to monitor the PING device’s state and then send the actual command. I noticed that there’s a “switch” entry in the “Current States” field in the IDE for that device, so I assumed that it would have the option to “switch” on and off.
I can programmatically set the switch in WebCore to change the state, it just doesn’t show up as a Switch in the ST app.
Does that make more sense?
Well, I’ve already created “Virtual Devices” in the HostPinger smartapp, so I’d rather not have a bunch of duplicate virtual switches cluttering up my devices list.
That, and I can actually change the state of the PING devices with WebCore, just not the ST app.
This is what I do:
You should just be able to update the DTH with the capability and then it will be switchable, but personally I would keep separate so you can make sure that it does actually turn off…
Nice, I’ll try that. Any hints on how to do that? I’ve never gotten into writing DTHs.
I’m on my phone at the mo, but the ST documentation covers this in their DTH example, I think you just need to add a couple of lines to my code, on() , off() and and change the setting on the button to make it a switch rather than just an icon… take a look and if you still can’t work it out I should be able to do it tomorrow night
Wait…you want to monitor the PC’s status on your network or your want to turn your PC off?
When you say switch them off, do you mean the virtual switches or the computer? Because Host Pinger should already be turning a virtual switch on and off. That’s the whole point of the app. I’m not really understanding what you’re trying to make work. Why would you want to turn the switch off? It no longer corresponds to the device’s status on your network. If you are using host pinger to monitor those devices, wouldn’t you want their status correct on your ST app? Maybe I’m not following the point here.
In my case, I have set up some rules in Webcore to monitor changes in the PING devices. Changing them to Off will send a shutdown request via a web request to Event Ghost on that computer. If it turns on, send a wake-on-lan command to the computer. In this case the HostPinger app is really just keeping the physical computer with the virtual device, in the case that I turn the computer manually on or off.
Thank you, I’ll check it out.
Not the computer that’s running host-pinger i hope. I still don’t understand why the actions you are performing can’t be done with the statuses provided by host pinger. Sorry, I’m just not following you.
Obviously not the computer that’s running HostPinger. I have several desktops in my house that I’m trying to control.
HostPinger just provides status, nothing else. I am trying to use the virtual devices that I created using HostPinger to turn on/off the desktops. They already have a switch that can be toggled via Webcore, I just want to be able to do the same thing via the ST app.
Why does it have to be a Host Pinger device? If you’re using webcore, why can’t you just use any virtual device?
As I’ve already stated, because that would double the amount of Virtual Devices devoted to turning them on/off. Then I’d also have to sync those virtual switches with the PING virtual devices. That would be quite messy and if I can just add the ability to switch the PING devices on/off using the ST app, I only need one Virtual device per computer.
This is exactly what I do.
Host Pinger turns on/off the PC Switch based on if the Ping is live or dead.
I have a Piston devoted to turning on my PC’s via WOL command. All of my PCs are listed in this one Piston.
To turn off the PC, the “Off” event is captured in EventGhost and that is tied to a macro in EventGhost to shut the PC down.
I took it one step further and made a PC Activity Switch that Event Ghost sends to ST. This is useful to monitor if the PC is in use. Sorta use it as a Motion Sensor just the mouse acts as the motion trigger.
To keep it all in sync, I use the Piston below: The steps to set it all up is in the link above I posted but looks like you got a handle on EventGhost!
Nothing more to it.