Home Assistant and VMS on same Pi 4

This may be a little different, and Home Assistant may not even be the best tool, but hopefully y’all can help me move in the right direction. I have one of these:

Mounted at the top of that pole will be seven IP cameras, PA speakers, and LED flood lights. Inside the box, I’m mounting a Raspberry PI 4 8GB. My original plan was to run the VMS server (NX Witness) and Home Assistant on that PI.

The plan is to use Home Assistant to run this MQTT relay controller and run some additional I/O on the PI. For example, I have a wireless remote/relay to trigger pins on the PI to enable/disable an alarm.

The VMS has a built in web browser and can display a webpage on the screen with video feeds. My plan was to make a simple Home Assistant dashboard that could flip the relays on and off so I can remote control the tower over LTE. What I did not realize is that Home Assistant is its own OS, requiring it to take over the whole Pi or be run in a VM.

So now I’m trying to figure out the best way to do this. Can the Pi handle running a VMS and Home Assistant in a VM? The VMS server shouldn’t be too terribly taxing, as it is just copying the streams to an SSD and providing remote access. It’s my understanding that the client does most of the heavy lifting. I’ve seen a demo of it using only 40% CPU on a Pi4.

Is there software better suited to talk to the MQTT relay controller? I’m not much of a programmer, so I’m trying to not reinvent the wheel here.

Thanks for any advice/ideas!

You don’t HAVE to install HassOS.
You can run HA in a single docker container (or even in plain local, but that could become messy), which might be more in-line with the kind of setup you have in mind

True. Running Home Assistant Supervised gives the same experience but is only officially supported on a clean Debian installation. Once you install your other software you need to perform your own troubleshooting. Most people setting up something like this are able to troubleshoot their systems anyway.

My current preference would be Home Assistant Container if it meets your needs. The Docker container removes any Python version headaches.

Indeed.
Honestly, the supervised install is pointless for somebody at ease with Linux sysadmin.
The only plus point I see is the ability to run “addons”, but as those are themselves containers, you can run your own ones as well.

For reference, my own very simple docker-compose to run HA in a single container:

version: '2.1'
services:
    homeassistant:
        container_name: home-assistant
        volumes:
            - ./config:/config
            - /etc/localtime:/etc/localtime:ro
# if you need access to USB
#        devices:
#            - /dev/ttyUSB0
        restart: unless-stopped
        image: homeassistant/raspberrypi4-homeassistant:stable
        network_mode: host

1 Like