👻 Halloween decoration: Let ghosts appear in your window or how to play mp4 file on beamer, when action triggered

Hi HA community,

I’m preparing a Halloween party and I have a beamer to show ghost videos in one of my windows.
Looks pretty cool BTW: AtmosfearFX Phantasms and Ghostly Apparitions Test - YouTube
(animation from https://atmosfx.com/ )

I don’t wanna play the mp4 videos in loop. I would like to use my door sensor to trigger a media player to play the video, so the ghost will appear in the window, when kids ring the bell.

My plan was to connect a Raspberry Pi to the beamer.
Is there a Raspberry Pi media player, which can be triggered by HA to play a specific mp4 file?
Once the video is played, it should return to a black screen.

Any ideas? Your support is very much appreciated.

:ghost: :ghost: :ghost:

I installed omxplayer on a second RPi. Videos are playing smoothly via SSH command.

Is it possible to execute this SSH command via HASS? In other words: Can HASS control another RPi via SSH?

Thanks!

I like talking to myself. :slight_smile:

If you try OMXPlayer with MQTT, don’t waste your time with mqtt-omxplayer, mqtt-exec and mqtt-launch. At least I was not successful.

So, that’s my solution:

Raspberry Pi to play mp4/videos and receive MQTT commands:

  • Install OMXPlayer and Node-RED
  • Activate autostart for Node-RED
  • Very simple Node-RED setup:
    HA is used as MQTT server.

I use the filename (e.g. /home/pi/g8.mp4) as payload: "sudo omxplayer " plays the mp4/video file.

Hint: Remove console / clear screen:
I don’t wanna see the console, when the video stops. Switching of HDMI off, wait and on again does the job nicely:

/usr/bin/tvservice -o
wait some seconds
/usr/bin/tvservice -p

Setup MQTT scripts to run commands and embed them in lovelace or integrate them in automations.

The result:

  • Beamer is showing black screen and waiting for some halloween lovers.
  • Kids ring bell at the door
  • Automation starts: MQTT command sent by HA, second Raspberry Pi receives command and beamer presents ghost :ghost: animation on the window:
    AtmosfearFX window projection Ghostly Apparitions - YouTube (not my video :wink: )
  • After video ended, beamer is showing black screen again (no console)
  • Give sweets to scared kids. :candy: :lollipop:

Let me know, if you like it too.

3 Likes

Thank you for posting this! I am very new to all this and this is exactly what I was looking for. Was the below Irene done on the raspberry pi?

  • Install OMXPlayer, Mosquitto and Node-RED
  • Activate autostart for Mosquitto and Node-RED

Hi Ben,

Thank you! I’m happy, that it’s helpful for you.

Yes, this is done on a separate Raspberry Pi. It is just playing the video via HDMI once it receives the MQTT command.

I assumed, that the MQTT server is up and running on the HA device.

The node-RED flow you showed above, was that the configuration on the raspberry pi? If so, could you point me to the documentation to get the UI running?

I installed Node-RED on the raspberry pi, but didn’t see the option for the GUI. Thanks!

My comment on node red not having a GUI was a total newbie mistake. I saw that you can open a browser to get the GUI. I’m starting to play around with it to see what I can do. Thanks!

Hi Ben, sounds good. How’s is your project going? Does it work? Cheers, Axel