How do I create a second instance of an addon?

Regarding the MQTT addon for Risco alarm systems, I have two separate alarms. The first one works fine, but I am not clear on how to add the second one.

The developer @vanackej has written:

Multiple panels support
To integrate multiple panels to a single HA instance, you must start one process/docker container instance for each panel. Each panel must have a unique panel_name value in its configuration file. panel_name is automatically converted to a suitable panel_node_id, used in various topics definitions and subscriptions. panel_name is also used as HA device name
Link

I am stumped on how to start a second process/docker container instance.

I know there was a thing called Portainer, but I understand development has been shelved due to the damage it could do.

I’d be very grateful if someone could suggest how I might go about creating a second instance of this addon.

Thanks in advance.

W.

This is regarding the HA add-on to run Portainer, not Portainer itself. The Risco integration does not appear to be an HA add-on, rather it is standalone and sends data to MQTT in a format suitable for auto-discovery by HA. Therefore, I’m guessing you’re either running it on a separate machine, or not using HAOS.

Assuming my guess is correct, you could just replace what youu’re doing now and use two docker containers, something along the lines of:

docker run -v /your/path/config_1.json:/data/config.json --name risco1 vanackej/risco-mqtt-local
docker run -v /your/path/config_2.json:/data/config.json --name risco2 vanackej/risco-mqtt-local

Note that they each have their own config file. You might also want to add “–restart=always”. You could similarly run Portainer (not the HA add-on) to check their status, logs, etc. Caveat - I don’t have these devices, so I have no direct experience.

Hi @michaelblight ,
Thanks for your reply.

It’s defiantly running on my HA machine, but whether it’s using HAOS, I couldn’t say, but what I do know is that if I go to Settings > Add-ons, I see Risco local MQTT:

Possibly a real noob thing to say, but if I go to HA terminal and attempt to run a docker command, docker is not recognised and a quick find / -name docker doesn’t return any results.

As I understand it, most of the add-ons are in fact containers, but how I see those, I do not know.

This is regarding the HA add-on to run Portainer, not Portainer itself.

I am confused even more now. Obviously, I don’t understand what Portainer is.

Thanks for your help.

W.

Portainer is software that can help manage docker containers. If you are running HAOS, it runs everything in docker containers, but the OS locks things down so you can’t tinker/break, hence the attitude to Portainer. So it’s a bit of a red herring in this case. You can confirm if you’re running HAOS under “Settings > About”, where you will see something like:

image

There’s more than one way to go “HA terminal”. Since you can’t run a docker command, you’re probably in the “SSH & Web Terminal” or “Terminal & SSH” add-on, which itself is a docker container (as are all add-ons). A main reason for running things as containers is so they can be locked down, so it would not be normal to give access to docker commands from within a container. If you have a screen connected to the computer running HA, you can go there and type “docker ps” (for example) to see all the docker containers running. You can even start another container yourself, but you should not - HA will then report the installation as “unsupported” (or something like that).

I made the assumption the risco integration was not an add-on based on their documentation, which is scant at best. I hadn’t noticed the “add repository” button - so it is definitely an add-on. HA doesn’t have the capability to run more than one instance of an add-on - if you try to add one twice it will just take you to the page of the already installed one. Therefore you would have to run it on a separate machine as described above (or another HA running on a separate machine).

You could also add a feature request to their github to support configuration of multiple panels with the one HA add-on.

Hi again @michaelblight ,

Thank you so much for your detailed response. I had the feeling that it was not possible without going against the grain.

I am running HA OS.
image

I read this page and I have the “official” SSH & Web Terminal add-ons.

On the HA’s VM console, the only Docker command that returns anything is ha > docker info that returns:

logging: journals
registries: {}
storage: overlay2
version: 20.10.22

It seems my choices are:

  1. Request and wait for the developer to allow multiple instances in a supported way.
  2. Build a second instance of HA.
  3. Muck about with Docker and be unsupported (I didn’t realise there was any support).

At this point in time, option 2 appears to be most favourable. It appears one can “link” HA instances together: Multiple HA instances now possible? - Configuration - Home Assistant Community (home-assistant.io)

Thank again. You’ve been a massive help.

Sounds good. You don’t need to link the HA instances. The second one will run the add-on and nothing else (not even the MQTT add-on). It will publish to the same MQTT server, so the first HA instance will pick up the entities through auto-discovery.