HA for school bus automation system

This one is a bit abstract - looking for high level feedback on whether HA is a good solution for my project.

I’m working on an automation system for my skoolie (school bus converted to RV). It’s pretty different than the typical home automation system, but I stumbled upon this world of home automation hardware and software solutions and they seem to check a lot of boxes. Right now most of the system is analog, in my grand vision everything is digital and can be monitored/controlled remotely.

Be aware most of this is useless and just a fun engineering project. Sorry if it seems silly, I think that’s what keeps things fun!
www.spaceforceone.io for some context.

It’s probably best to just list out the architecture:

  • Must be totally offline and self-contained. This is non-negotiable.
  • Lots of GPIO. Currently there are ~40 on/off switches planned to control various functions. Ideally some analog pots too for brightness or similar functions. Going for an airplane cockpit aesthetic; more switches the better.
  • A few relay boards distributed through the vehicle for accessories such as light bars, aux fans, etc.
  • A thermocouple (max6675) for transmission temperature monitoring. The amp board can change, if it matters.
  • An accelerometer logging data on which an FFT is performed “live” to display a rolling spectrogram. Obviously this is extremely computationally expensive and not a normal function within HA. Maybe there is a way to do this in python then display it in the same dashboard as HA?
  • Dashboard for monitoring aforementioned sensors.
  • House light control through hardware switch or app

I’ve set up HA on my Rpi4b and gotten the thermocouple logging data through an ESP8266. This was easy enough and made me excited about HA. All of the front end work I dreaded looks taken care of. Also full disclosure, my background is in mechanical, I have a little Python experience and plenty of tinkering, but this project is easily my biggest undertaking yet. Anything that can same me lines of code is appreciated.

Primary competing architecture considered:
Rpi running the show. I2c bus with differential lines (interference is a big problem, 120VAC is everywhere) for sensors and relay boards. Multiprocessed or multithreaded python code to handle the IO, spectrogram, other sensor processing, and GUI. Nanpy for large amounts of GPIO local to the Rpi. Other I2c based GPIO expanders could easily be used for other needs. These seem useful.

Routing more wires around the bus is a turn off. Throwing ESP8266s around sounds great! As long as the network can be reliable (am I kidding myself?), this sounds awesome. It seems like there is an enormous amount of support for home automation solutions, it would be great to leverage this.

I’m concerned about integrating my system. Largely that home automation normally needs a refresh rate on the order of minutes to hours, whereas I’d like seconds to minutes. Also I’d like for HA to run on an Rpi which also broadcasts the local network as an access point, instead of connecting to an existing network. Is HA just a bad fit here? Help a newbie out.


You sound as if you got skills on the electronics/tinkering side which is not optional for your challanging project. In principle HA let’s you do this and more without any problems, since it is able to connect and use to virtually anything (sometimes out of the box, sometimes with tinkering).

My biggest concerns would be:

  • reliability in case of a power out … does your system idea boot up and work without interference?
  • load test of the RPi4. The more complex the HA system becomes, the more computing power you need. I’d try to simulate your complexity beforehand.
  • I/Os: In an RV environment, you might want to take more caution in protecting (EMC, …) the I/Os and lines than you would normally do in a static home environment.
  • obviously rattling and therefore protection of any stick-in-daughterboard solutions

In short: In my opinion, HA is a nice solution for your set of challanges. But try to go step by step before directly throughing the RPi into the RV and covering it permanently with resin :wink:

Great, thanks for the response @CeeCee!

  • No-touch power up would be great but I could live without it.
  • Agreed an RPi4 could get bogged down. The spectogram alone will be difficult. Could you help me understand what part of HA takes so much CPU or memory? On the face it seems like there isn’t too much going on. That said, I’m willing to invest in a more powerful system like a Nuc to augment, if necessary.
  • I/O interference…yeah, that will be a challenge. I think that will be learn by doing.
  • I’m setting everything up on a desk in breadboards, then once it all works transplanting to a more permanent installed system.

So to integrations. esphome, Arduino, PCAL9535, etc I can figure out. I’m thinking the spectrogram will write to Numpy arrays or similar. What’s the best way to get info from a local python script into a graph in the same GUI as HA? I’ve read through the documentation and I’m still struggling to understand what Appdaemon does. I don’t care if the spectrogram info is saved to SQL. Would it be better to just put it all together in a third party GUI? How does one splice together HA data and an arbitrary external data source? Sorry I’m a bit lost here.

I switched to a beefier server at some point because of a truckload of switches/sensors/information that went into HA and was database stored and processed there. This at some point made HA slow.
I cannot really help you with the programming side of your spectrogram. But there is a lot of options to visualize roll/pitch data whenever you are not using a digital display. Some look scifi, some are oldschool.

Do you have a example of how you would like to visualize the data?

For all the “database-related” questions I would recommend creating a new thread, specifically asking these.