Bridging Plex to Shortcuts with nodejs and Pushcut
2 min read • 269 words
I have been relying on Pushcut for many of my smart home automation needs. Pushcut is hard to describe, so I'll list a few things it has enabled me to do:
- My work meetings get announced out loud from my desk speakers 5 minutes before they start and again when they begin
- When I get out of bed, Siri reads my schedule for the day, including any reminders I have set for myself
- When I walk in the door, Siri greets me with "what up doe"
- If it gets too cold in my apartment, the AC turns off (even tho its a dumb AC that plugs into the wall)
The latest thing I have used Pushcut for is to send notifications to my phone and iPad when I start watching something thru Plex. The notification comes with a few different options that let me dim the lights or activate other Home scenes, depending on what I'm feelin' at the time.
I have a few goals:
- I want to get different notifications depending on which room I was watching TV in.
- I want different notifications for if I play or pause a show.
- I don't want a notification every time I play or pause, that's too noisy.
To give myself maximum customization options, and meet these goals, I wrote a little node app.
It receives Plex webhooks and maps them to Pushcut endpoints. It can send notifications, or for more advanced users, forward the webhook payload to a Shortcut running on a Pushcut automation server. Check out the repo, plex-to-pushcut
on my GitHub.