97: Automating Rosemary Orchard

Just in case anyone is curious about Home Assistant but on the fence, just wanted to pop in to note that it’s also possible to install it on a Mac and it doesn’t necessary require a Raspberry Pi or similar.

I had disregarded it for ages because I have don’t have many smart home products and also I assumed that it required additional hardware, but I had no trouble getting it functioning using VirtualBox on my super-old iMac, which is currently sitting on my office desk and operating as a quasi-Mac mini server, I guess, just running Hazel rules and stuff in the background. And the automations options are great!

(Incidentally, something went awry and I appear to have lost the .vdi file, so the other thing I learnt this week was: back up your Home Assistant, people!)

2 Likes

Funnily enough I have Raspberry Pi’s that are always on aplenty. I’m about to get my first always on Mac.

Any criterion to decide which to use?

I’m no expert, but I don’t think it matters a great deal. Someone more knowledgeable than me might be able to speak to any limitations of either approach, though.

Their installation instructions are pretty good. They recommend a Raspberry Pi if you’re not familiar with virtual machines, in particular, but I don’t really have any experience with virtual machines other than a vague idea of what they do, and I didn’t have any issues getting set up.

1 Like

I love hearing about how Rosemary uses Bunch (I had listened to previous episodes where this was mentioned but never implemented this).

I am trying now to use Bunch rather than using more complicated KM scripts, but can only see the use of the dnd focus modes in the docs. Can other focus modes also be used?

EDIT: Found Brett’s repo https://github.com/ttscoff/bunch and it appears this has not been implemented. I have just run as a shortcut from applescript in Bunch

tell application "Shortcuts"
	run shortcut "Writing Mode On"
end tell

With a slight syntax change, you can turn this into a one-line script.

tell application “Shortcuts” to run shortcut “Writing Mode On”
1 Like

Thanks much neater! I don’t suppose this can be called from Applescript or a shell script to save having to use shortcuts?

I wouldn’t use pi 2 but something like more powerfull pi3 or pi4 got enough power if you don’t use it for multiple cameras. Also if you want to use rpi use it with external ssd. Corruption of sd card is most frequent cause of failure.

I am sure this question reveals that I am a bit of a novice, but I am curious if it is possible to run both Homebridge and Home Assistant on the same Raspberry Pi? Already have a Raspberry Pi 4 running Homebridge. Don’t really mind getting another box, but with all the hubs, etc that I already have avoiding another thing would be nice.

Brett’s has responded and suggested running shortcuts with $ /usr/bin/shortcuts run "[shortcut name]"

Sure! From the terminal, there’s no better way than this to run a shortcut.

However, you can use this one-liner inside longer AppleScripts. They’re handy to avoid creating a multi-line tell block for a single-line AppleScript command to a given app (I do this all the time to invoke Keyboard Maestro Engine to update a variable or run a macro straight from inside a long AppleScript routine).

Should you want to invoke other AppleScripts straight from terminal, there’s aways the osascript -e command, as in:

osascript -e 'tell app "Safari" to activate'
2 Likes

I am a novice, but HomeKit and Home Assistant are very confusing to me. I have 2 homes with two Alexa Echo 5 and they are managed independently and work independently.

For Xmas I gave myself 2 HomePod Minis and set up two homes. One is in Florida and the other is in France, Europe, so any manual action is not possible. The home in Florida has 2 cameras which are programmed to switch off recording and streaming when somebody is inside the house.

Now, every time I leave my house in France, or return, the function connects or disconnects in Florida. I have two homes in the Home app. But I have got so frustrated I no longer use the HomePod for anything.

I know I must be stupid, but Apple is meant to just work…

It should do, but it sounds like something has got stuck somewhere. I personally only “own” one home, but anecdotally don’t seem to have issues turning things on/off when going to my parents’ Home which I am also a member of. I’d suggest double-checking which device is sharing your location, and try toggling the “someone arrives home” automations on and off for each home, just to see if something “shakes loose”.

This is one of the reasons I prefer Home Assistant to be honest, it has a user interface making it easy to see what is triggering what, and why—and then you can fix things like that much more easily.

Hi Rosemary,

Soooo excited to get a direct reply from you! Thanks very much!!!

I have tried to follow your suggestion, but for the last few hours ( I hope because I am 16+ hours flight time away form Florida) my HomePod there is not responding. I will certainly feedback on this thread if/when I get access to my "other " Home again.

Great episode! I have a Stream Deck Pedal, I love using Keyboard Maestro in tandem in so many ways, but my favorite so far is using the tap [once, twice, thrice, long press, etc] to stack/select different actions. Unfortunately, because Keyboard Maestro doesn’t necessarily know which profile-per-application the pedal is set to, it has to primarily be universal always-on actions.

Your opinions please, is it worth setting these types of actions up in KM to be triggered in certain applications?

Sidenote: @RosemaryOrchard , I’m not sure if I’m mishearing what the issue was when it comes to auto switching profiles, but I did learn from Elgato that when your Streamdeck manager app is open, the auto switching is disabled. You may have already knew that, but it blew my mind when I learned that—I was tearing my hair out trying to figure out why my profiles weren’t switching.

Thanking you again, and I apologize for not going into your other post on another forum, just an update:
1.- I still have no access to my home in Florida for some reason ( unrelated to the problem I mentioned)
2.- Universal Control is working flawlessly on both Intel and M1 Macs side by side, once I turned on wifi on the M1.

Late to this party because Life, but agree that it was very interesting. One question, re Rose’s mantra of being able to do everything everywhere: When you store config files in git, are you actually using the file in git as the config file, or is it just a place that you can download it from? I love apps that let me store preferences in iCloud or Dropbox, but not actually tried it for things like zsh.

If you are interested in managing your dot files via Git, I would recommend taking a look at chezmoi. It is a tool that allows you to go beyond just backing up or syncing dot files. It allows you to build and maintain them dynamically across devices.

If you really want to get the best from it, I would recommend listening to a podcast, Programming by Stealth episode 122 - Managing Dot Files with chezmoi. It is a fantastic zero to hero overview of how to get the best from it.

1 Like

Many thanks, especially for the podcast recommendation. I started listening to Bart Busschots’ series on Taming the Terminal; need to revisit that.

@RosemaryOrchard any specific zigbee dongle you recommend to replace a aqara hub with a raspberry pi and home assistant?