Run flow when computer is active or not. (Mac)

Hey. I want lights, heating etc to be turned on when I’m in my office. I’ve tried presence detector but as I’m sitting still by my computer it fails to detect me after a while.

So I was thinking: is there a way to run a flow when my computer (Mac) wakes up from sleep and vice versa? Any ideas here? I could run a http-request or maybe there are better ideas?

The thinking is to turn on lights and what not as long as I’m sitting in front of my computer…

You can try a smart plug for checking the power use of the Mac.

IF power is more then … W,

IF powers less then … W.

1 Like

Similar to Mike’s idea, without extra hardware:
NetScan app. Monitor the IP of the mac

When mac is online
Then light on
When mac is offline
Then light off

1 Like

A mmWave sensor should do the trick.
I use a FP2 to do the same (integrated via HA)

Another cheap way is to use an app called Shortery running on the Mac. This allows you to automate the running of Apple shortcuts on the Mac in response to various events including for example the computer waking or sleeping.

You can then use this to trigger an Apple shortcut which in turn triggers a Homey flow (I do this using the Local API app on Homey but you could just use a standard webhook).

I have had this working for quite a while now and it’s very reliable.

1 Like