Install DSMR reader on hass os

Then the changes in the compose file changes are not reflected by Portainer. Can you remove the stack and start over with the updated compose file?

I started from your compose file

… and did you change the relative volumes references as mentioned here?

Like this

services:
  dsmrdb:
    image: postgres:12-alpine
    restart: always
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /home/skank/dsmr/dsmrdb:/var/lib/postgresql/data
    environment:
      - TZ=Europe/Brussels
      - PG_TZ=Europe/Brussels
      - POSTGRES_USER=dsmrreader
      - POSTGRES_PASSWORD=dsmrreader
      - POSTGRES_DB=dsmrreader

  dsmr:
    image: xirixiz/dsmr-reader-docker:latest
    depends_on:
      - dsmrdb
    cap_add:
      - NET_ADMIN
    restart: always
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /home/skank/dsmr:/dsmr/backups
    environment:
      - DJANGO_TIME_ZONE=Europe/Brussels
      - VIRTUAL_HOST=localhost
    ports:
      - 7777:80
      - 7779:443
    devices:
      - /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AQ5ADAWE-if00-port0:/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AQ5ADAWE-if00-port0
version: '2'

so i have
home/skank/docker/dsmr

Yes, like this.

Again error
image

I am giving up, sorry.

No problem mate , thx for your help, hope someone else can help

You can look into this, if you want. This skips all the hassle:

https://community.home-assistant.io/t/custom-component-homewizard-energy-wifi-p1-meter

Mmm theres not much difference then with the integrated dsmr “slimme meter”

Thats the reason why i want to go the dsmr reader route…

Ah, I understand!
Can you let me know what you are ‘missing’ from the official component and what you want to achieve? Maybe I can bring it as a feature in the HomeWizard Energy component.

Using the official… HA is terrible in history keeping…
Thatswhy i would prefer the reader
Also, it fills up your db in ha

  • graphs without the need to program it

I think the homewizard energy component has the same sensors as the official , no???
Which sensors do you make then from it, in HA?

Same type of sensors (maybe a different name) and it uses the HA DB. So yes it has no use case for you. Sorry for the interruption.

No problem mate.
Perhaps i should stay with the official one…
And try other stuff with it.
I want statistics per day/week/month/year for gas and electric… and stuff

You could try to look into the Grafana add-on. Maybe this is way you are looking for.

I just posted in that topic of yours.
Theres a guy with very nice statistics

1 Like

I am using DSRM reader this way.

Installed the Portainer Addon and added the two docker containers, 1 for DB and 1 for DSRM.
I will post some screenshots soon for the details.

You still need the integration if you want to have reading in Home Assistant though

1 Like
  • Add a containter for the DB: postgres:12-alpine.

  • Map /var/lib/postgresql/data to hostvolume /mnt/data/supervisor/share/dsmrdb. (first install samba addon, you can then access dsmrdb in the share folder of hassio)

  • set network to hassio

  • add environment vars for POSTGRES_USER etc.

  • add a container for DSMR with the image: ualex73/dsmr-reader-docker:latest

  • for DB_HOST set it to dsmrdb:

Also add DSMRREADER_ADMIN_PASSWORD and DSMRREADER_ADMIN_USER as environment vars

  • set the network to hassio.
  • dont forget to the the device of the USB
  • map the ports 7779 to 443 and 7777 to 80
    image
1 Like

Install the grafana addon, you can create dashboards:

But then you need the Hassio dsmr integration. If you just want the graphs from DSRM you can install the dockers and you will have port 7777 and 7779 on your Hassio box for DSMR

@Romkabouter thx will try and test.
I cant run that simultaenously with “slimme meter” right?
I should first get rid of slimme meter?

I went to app templates, chose PostgreSQL and entered this

I cant map add the hostvolume there, it says select volume and its empty
Am i doing right?