Disable lights off when logged into Mac?

Is there anyway for me to toggle a switch when I log into my computer open an App?

Yes? Thereā€™s a way to use Asus routers as a presence sensor for wifi connections, so if youā€™re using wireless and an Asus router, you can. Otherwise I donā€™t know of a way.

Can you activate HE switches with CURL? I used to have Applescript executables that would activate Insteon devices. You could run an Applescript at login.

I am trying to figure out how to do this. I thought there was no API.

None that Iā€™m aware of. But @mike.maxwell can likely steer you in the right direction.

Yes. That's how the Asus router tells Hubitat that devices are present. Details here:

I believe the current. most popular method would be to create an App with an Oauth2 endpoint. This would allow you to simply use ā€˜curlā€™, or similar, to tell the App that the MAC is up and running, and then have the App update a virtual presence device to ā€˜presentā€™. Youā€™d need to make sure to either send another ā€˜curlā€™ request when shutting the MAC down, or implement a watchdog timer. If the timer expires before another ā€œHey, I am the MAC, and I am open and runningā€ ā€˜curlā€™ message was received, it would reset the virtual presence device to ā€˜not presentā€™

4 Likes

Thanks for this! I will be using this with hammerspoon on my Mac to update it.

I believe kewashi the house panel dev developed a smartapp that detected his activity on the pc and sent it to St as a presence sensor. Maybe it could be ported.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.