Additional ports needed in homeassistant. How to?

Hallo, i am running ElectricEel-24.10.2 with some Apps, included homeassistant.
In Homeassistant I try to connect to a raspberrymatic system which runs standalone on a Pi4. For this I installed the custom_homematic (Homematic(IP) Local) from HACS. This works, and I can see my 78 devices and owe 1500 entities. I can operate devices such as a blind, but I don’t get any feedback from any device.
Truenas has the IP 192.168.178.6, Homeassistant also, but port 30028.
The documentation says that a special configuration is required in a Docker environment.
see manual from custom_homematic

callback_host and callback_port

These two options are required for special network environments. If for example Home Assistant is running within a Docker container and detects its own IP to be within the Docker network, the CCU won’t be able to establish the connection to Home Assistant. In this case you have to specify which address and port the CCU should connect to. This may require forwarding connections on the Docker host machine to the relevant container.

I have now tested the following:
Callback hostname/IP address: 192.168.178.6
Callback XML-RPC port: 40000

Bildschirmfoto 2025-02-01 um 10.02.02

As I understand it, Homeassitant should now listen to messages from Raspberrymatic on port 40000.
But it does not. I still have to redirect the port 40000 to the port 40000 of the Homeassistant interface. As I understand it, only port 30028 is redirected or routed to Homeassistant.
Bildschirmfoto 2025-02-01 um 10.16.02

How can I “enable” this additional port in Homeassistant?

Another option would be to install the whole thing yourself via Custom App or YAML. There are examples of this on the net, at least from other applications (e.g. https://forums.truenas.com/t/trying-to-open-additonal-ports-for-minecraft-mods/15180

Hi Peter,
you will need to assign the new Port to the Docker Container by updating its configuration.

For TrueNas Scale 24.10.2:
Select your deployed Homeassistant application and press on “Edit” -button.

Now go to sector “Network Configuration” and search for “additional Ports”.
Press the “add” -button and enter the port you want for the container and the routed port for the host.

I hope this was helpful for you.

Hallo Laurenz,
Thank you for the andere…in the meantime i installed homeassistant as VM. This has in my opinion some more advantages.
Perhaps i will try again, because i Need a complete fresh install because i still have Problems with Nextcloud.
Regards Peter