Hey everyone, I wanted to share a fun project I recently worked on. I’ve always been fascinated by the idea of controlling my home entertainment system through smart home devices, so I decided to take it a step further by setting up a button that could play a specific movie on demand. The goal was to create a simple, user-friendly experience for my kids, who love watching My Neighbor Totoro.
The Setup
I started by researching how to integrate my Plex server with a smart button. After some digging, I stumbled upon Phlex, a tool that allows casting movies to devices. I also came across the cast bundle addon for Plex, which seemed essential for sending movies to my target device.
The plan was to use a dash button as the trigger. I set up Phlex on a hosted server and configured the cast bundle addon in Plex. Once that was in place, I tested casting My Neighbor Totoro to ensure everything worked smoothly. It took a few tweaks, but eventually, the movie started playing without any issues!
The Automation
Next, I moved on to setting up the automation in Home Assistant. I used the rest_command component to create a service that would call the Phlex API and trigger the movie playback. Here’s a snippet of the configuration I used:
yaml
rest_command:
totoro:
url: https://app.phlexchat.com//api.php?say&apiToken=TOKEN&command=play+my+neighbor+totoro+on+tv
I then created a script that would execute this command:
yaml
play_totoro:
alias: My Neighbor Totoro
sequence:
- service: rest_command.totoro
Finally, I linked this script to my dash button using a simple automation. Here’s how the automation looks:
yaml
- alias: ‘Play My Neighbor Totoro’
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_8675309
click_type: single
action:- service: rest_command.totoro
The Result
After setting everything up, I tested the button, and to my delight, My Neighbor Totoro started playing on my TV! My kids were thrilled, and it’s been a great way for them to enjoy their favorite movie without any hassle.
Challenges and Solutions
One thing I encountered was Phlex being a bit finicky with device connections. If the device went offline, I had to manually reconnect it. However, this solution still works well for my needs, especially since the button press is so seamless.
Final Thoughts
This project was a fun way to combine my love for automation with family entertainment. It’s amazing how a simple button press can bring so much joy. If you’re looking for a similar setup, I’d recommend starting with Phlex and the cast bundle addon—they were key to making this work!
If anyone has questions or needs help setting something like this up, feel free to reach out. I’d be happy to assist!
Cheers,
[Your Name]