"inter process communications" for apps - easy?

Hello

I have a simple docker compose which I want to use to install some software which listens to data on a USB port and presents it as MQTT messages.

I then want to process that MQTT data using mosquitto and/or node-red, both of which are available as official “community” TrueNAS apps:


I read a bit about IPC (inter-process communication) with Electric Eeel but I don’t understand:

(1) should it be a simple matter to pipe data between my docker container and these two applications?

(2) Would it be a better solution if I were to use docker compose for all three?

(3) In either case ought I to wait until Fangtooth is suitable for general use, perhaps because Fangtooth better implements this sort of use case?

The task is to listen to and decode some data bursts from 433 MHz transmitters (a weather station, a couple of temperature sensors and a door alarm) for local display on a web page or onwards alerting via Pushover, that sort of thing.

There’s already a feature request for that topic and someone created a script so that apps can use internal dns names for inter app communication. The script is linked in one of the post on the feature request

Another option would be to let all three apps join a common network and use this for inter app communication.

Typically, this is about

  • ports: are they exposed to other containers or via the host IP which everyone can communicate with?
  • networks: are containers member of the same network?

(1) When three containers need to communicate with each other, it’s often a good idea to make them part of the same stack, i.e. you put them into the same docker-compose.yml. Alternatively, you could expose their ports on the host IP and configure them to use this port.
(2) yes most likely
(3) no need to wait. I think it was mentioned that it will be easier to assign docker containers to custom IPs in the upcoming June update. But what you describe is already possible on EE or FT.

If you go down the path of docker-compose.yml, you may want to install the dockge app. It makes such configurations a bit easier and intuitive than the custom app mechanism of FT.

Another recommendation is to check out Home assistant, especially as a virtual machine. What you describe is nicely packaged in HAOS. There are several add-ons, e.g MQTT, Node Red etc.

These are both excellent answers for me - I understand a bit more now.

Thanks Lars & Mike; I will look at getting them all on the same network and sharing via ports which seems easy enough and I do like the idea of a single docker compose approach.