Toggling a Simulated Presence Sensor via a Python Script?

In the Smartthings IDE web interface, I’ve created a new device with the type “Siimulated Presence Sensor” which I can see in my Smartthings app on my phone. What I’d like to do, is toggle this device between present and not-present using an HTTP Request command from a Python script on my home iMac. Can someone please give me some tips on if this is possible? I think it is possible, if I can get the API Token and URL for the device I created (I don’t know how!).


Thanks for the suggestion. I haven’t used webCoRE before, so I’ll take a look at it.

Ok, I just installed WebCoRE and setup a simple Piston as you’ve suggested. I am able to turn on/off my virtual presence sensor by sending the external URL link for that Piston… cool!

1 Like