#Perform actions on macbook from homeassistant ?

1 messages · Page 1 of 1 (latest)

vagrant hill
#

hello,

im not that new to HA, but recently i moved to macOS, and im struggling at performing actions on my mac remotely from HA - potentially integrated into many automations.

the companion app for the mac seems irrelevant for that matter as much as im aware (please correct me if im wrong)
so SSH is the way to go(?)

for starters, i just wanna go with a very basic action - initiate a screensaver remotely: 'open -a ScreenSaverEngine'
(this command is working in the terminal on mac, and ALSO working on the HA terminal through SSH)

  • but the missing piece is to make it into a script/button/switch/whatever - it just doesnt work no matter what i try...

do you know how i should go about it? is SSH even the most suitable way? how about running macOS shortcuts from HA?
TIA

oblique basin
vagrant hill
oblique basin
vagrant hill
#

its weird because this command isnt working:
shell_command:
start_mac_screensaver: "ssh 'lonlav@192.168.1.123' 'open -a ScreenSaverEngine'"

yet i do see it available in automations

oblique basin
vagrant hill
oblique basin
vagrant hill
# oblique basin huh? ssh is ssh it doesnt matteer what the host is

aahh im obviously lacking some crucial (and probably basic) knowledge about that then, please excuse my ignorance - when im at the 'add integration' part - i need to choose which Default commands , whats the right one then? and also im not sure whats the host field is referring to, its not specified in the documentation from what i see

oblique basin
#

do macs accept ssh connections by default or do you have to enable it? i have no idea