Using digitalstrom_mqtt on home assistant as container with Portainer

Hello
I am using digitalstrom_mqtt: https://github.com/gaetancollaud/digitalstrom-mqtt
First I executed it on windows (Releases: digitalstrom-mqtt_1.6.1_windows_amd64.tar.gz) with a customized config.yaml:

DIGITALSTROM_HOST: 192.168.1.x
DIGITALSTROM_USERNAME: dssadmin
DIGITALSTROM_PASSWORD: XXX
MQTT_URL: tcp://192.168.1.X:1883
MQTT_USERNAME: homeassistant
MQTT_PASSWORD: XXX
MQTT_TOPIC_PREFIX: digitalstrom
REFRESH_AT_START: true
HOME_ASSISTANT_DISCOVERY_ENABLED: true
HOME_ASSISTANT_DISCOVERY_PREFIX: homeassistant
HOME_ASSISTANT_REMOVE_REGEXP_FROM_NAME: “(light|cover|blind)”

I immediately saw the devices under MQTT in the home assistant and could control them.

After that, instead of using two systems (Windows and Home Assistant on a Raspberry), I had the idea to run digitalstrom-mqtt as Docker with Portainer directly in home assistant.

This video helped: Portainer Addon in Home Assistant installieren & Docker nutzen

I made a stack:

version: ‘3.0’
services:
digitalstrom-mqtt:
image: gaetancollaud/digitalstrom-mqtt:latest
build: .
environment:
- DIGITALSTROM_HOST=192.168.1.x
- DIGITALSTROM_USERNAME=dssadmin
- DIGITALSTROM_PASSWORD=XXX
- MQTT_URL=tcp://192.168.1.X:1883
- MQTT_USERNAME=homeassistant
- MQTT_PASSWORD=XXX
- MQTT_TOPIC_PREFIX=digitalstrom
- MQTT_RETAIN=true
- REFRESH_AT_START=true
- HOME_ASSISTANT_DISCOVERY_ENABLED=true
- HOME_ASSISTANT_DISCOVERY_PREFIX=homeassistant
- REFRESH_AT_START=true
- HOME_ASSISTANT_REMOVE_REGEXP_FROM_NAME=(light|cover|blind)

The container was created and is running. I see the communication between digitalstrom and the container in the logs from the conteiner. But no devices in MQTT in home assistant.

Can someone help me?

After deleting the MQTT integration and setting it up again, I see the MQTT devices and entities, but not all.
I see all devices an entities from digitalstrom in the MQTT Explorer but not in the home assistant:

I see the device but only the entity EnergyWs state and no consumtionW state:

How can I add the entity or force it to be added?

Thanks a lot.

Hi, have you already got digitalstrom_mqtt running as a docker container?