Can HA share the RPi with another big app?

I installed HA on an RPi4b w/ 8GB of memory, using this procedure. It works great, and I’m happy.

But I realized the other day that I really need to move the software install for my Unifi AP controller software off of my laptop, and the best thing to do would be to put it on a dedicated machine, like another RPi.

But from a performance and “disk” and memory perspective, it seems crazy to need a separate machine to run the Unifi code. It’s not small – it uses java, and mongodb – but I think it could easily coexist with HA on the same hardware.

Is that possible? Unifi needs a stock Raspberry Pi OS Lite. Is there a way to install HA on that same OS? It’s not at all clear to me what my options are. This chart is very pretty, but it doesn’t really answer a question that I know how to ask. :grinning:

paul

Raspbian OS + docker

HA and unifi controller in docker containers

Just be aware of what you don’t get (from the pretty chart) if you choose the Container install suggested by tmjpugh. You will have to manage your own containerised applications (no add-ons).

1 Like

Thanks! I see. Since it would be my first foray into containers, that’s… off-putting. I’ve used VMs in the past, but retired a year or three before I would have surely needed to learn how to docker.

Would both HA and Unifi need to be in containers? Unifi could be a native install, right? (Though I understand why the advantages of a container would apply to both.)

What all are you implying, by, “You will have to manage your own containerised applications (no add-ons).” In the case of HA, what wouldn’t be “done for me” that’s being done now by my current install?

paul

No. Look at the chart. The container install has no supervisor or add-ons and you have to manage your own OS as you will be using Raspbian instead of Home Assistant OS. All you get is the Core Home Assistant install with all it’s included core integrations (and the ability to add third party integrations).

So say you wanted the Mosquitto MQTT broker addon, instead you will have to look for a Docker container that has Mosquitto MQTT in the Docker Hub library. Pretty sure just about anything that has been developed as an add-on is available there, https://hub.docker.com/

And while you get the ability to make backups in a Container install there is no way to restore them easily. You have to copy files from the backup archive. IMO if you are using Docker you can backup and restore the entire container without using HA’s internal backup system, so that’s not really an issue.

Also, are you aware that there is a Unifi controller addon that you can just install on your existing HAOS system?

This is maintained by the HA devs.

So no need for a Container Install. Just use your existing HA install with this add-on.

Thank you. I didn’t understand that integrations (I assume there are others besides MQTT) would be separate containers. As a user, I assumed that everything “in” HA was in the HA container. So yes, that’s a big difference. The terms “supervisor”/“core”/“addons” aren’t really well spelled out in any of the docs that a new user sees, certainly not in architectural terms. So that was exactly the kind of information I was looking for.

And thank you even more for pointing me to that Unifi addon. I definitely didn’t know about that. I’ll look into it! If it does what I need, it’s definitely a good answer.

I don’t think that HA add-on is what I need. From what I read, I believe it talks to an existing Unifi Network controller installation, and lets you use HA to get/fetch certain features/data from that Unifi installation. It’s not the installation itself. Had me excited, though!

No, that is the Unifi integration. The addon is a full blown Unifi controller applicacation, like what you have running on your laptop. It is what you want.

I’ve actually thought about running the addon myself. I have more than enough resources to spare on my NUC and it would perform better than my current Unifi Cloud Key (V1).

2 Likes

You pointed to the haos install, so just install the addon.

Well. That’s … great! I’ll give it a try. Many thanks.

1 Like

Well, it wants to work! Thanks again for getting me in the right direction.

But I’m not finished yet. (The rest of this is just me griping, and perhaps a cautionary tale for others.)

The reason I need to stop using the controller instance on my laptop is because it no longer functions. The controller s/w needs an older version of mongodb that isn’t available/installable on Ubuntu 22. So I currently can’t access my AP.

Unfortunately, the new controller instance in the HA addon can’t adopt the AP because it was “previously managed by another console”. To force the adoption, it claims I should be able to use the device’s ssh credentials (which I have) but that doesn’t work. If it were just SSID/password, I wouldn’t care, but the AP is served by 3 vlans, and hosts 3 SSIDs, and it had names attached to all of 20 or 30 MAC addresses. Phooey. I guess I better get busy. :slight_smile:

Configs are in controller

Do you have backup of controller?

If management is only problem, and ssid is already setup In controller, a factory reset and adoption of AP will clear that up. I don’t believe APs have Vlan, only switch and Gateway. Same with names, thats all on the controller and not in the AP.

I have a backup, but it’s a binary blob so I can’t read it. And the new controller won’t restore it. Not sure why not, unless that’s a security thing. Anyway, when I look at the date of the backup, it’s right on the cusp of when I implemented all the vlan stuff, so it may or may not have it.

It won’t take that long – I do have a good notes that I made while configuring it the first time.

Thanks for thinking about the problem!

Can you still access the controller on the laptop to export the site though?

That is all you need to import into the new controller.

He may also needs to point the AP to the new IP or change pi to laptop IP or it may not find controller.

Definitely. Adoption is covered in the link I posted. I meant that’s all they need resource wise.

No, the controller on the laptop no longer runs, due to a mongodb incompatibility.

As far as I can/could tell, my only recourse was to factory reset the AP, and adopt it into the new controller as a fresh install. With my notes, it didn’t take long to get all the config entered correctly,

And it may be that my new router does a better job of maintaining client id information, because 90% of the clients didn’t need to have a name configured.

So it was relatively painless. And not having to buy / maintain a second RPi for unifi is a huge huge win, for me.

2 Likes