Integrating Mac OSX with SmartThings

Perhaps available already - I am looking for a simple way to integrate SmartThings with several Mac machines in the house. Basically, I’d like to create an automation (whether via SmartThings or Webcore) that once I arm the alarm and everyone is not presence, forces a ‘lock’ command on all of our macs.

Any ideas? I would think that it would require some sort of a local app or command line daemon that would listen to events to be installed on every mac or perhaps some sort of a trigger created via notifications that I can create pretty easily via webcore or other - once an agreed upon event is detected, it would be easy to issue the lock command. It is the ‘detection’ part of smartthings events by Mac OSX that is my missing link unless better ideas exist out there?

thanks

1 Like

I think you could run a very lightweight server in Mac OS (e.g., node.js) that can accept incoming http post request to trigger the “lock/sleep” command. Node.js with express to receive the incoming http, then it can run a system command to lock…

Search forum for EventGhost (Windows… but same concept). EventGhost uses an http server to receive commands, and html to send Events back to SmartThings (which you don’t require).

1 Like
2 Likes

Thanks @jkp - I’ll test it out this weekend and report back. Sounds like exactly the use case I am after.

1 Like

Took a few tweaks understanding Hammerspoon but does the job great. Thanks for the quick response @jkp and @tgauchat .
download

2 Likes