Ok i tried yours
Now the stack is deployed
and i get 2 containers
When i try to start i get this
chmod -R 777 /data/compose/1/dsmr
on the host to permit reading/writing/creating of files in that folder to everybody.
no such file or directory
not sure where to create it manually either
Sorry, take the paths from the error message,
- /data/compose/1/dsmrdb
- /data/compose/1/dsmr_backups
If they don’t exist, create them first using mkdir
.
Hope DSMR is nothing of importance, as this setup is wacky your knowledge on what is actually going on is poor. It will probably run, but don’t blame me if things get messy.
Yeah, thats my opinion too, thatswhy i asked for help if someone succeeded and could point out a how-to
I know how to create directories but i dont know where that data folder is
is it under /home/user ?
The path is abolute, so not inside /home. It’s computed from the path Portainer uses as “home” directory and the realtive path defined in the docker-compose file (see volumes:
section).
If you want that directory be created inside a user’s home directory, change “./dsmrdb” and “./dsmr_backups” in docker-compose / portainer stack file to absolute paths, using a user’s home directory.
volumes:
- /home/user/dsmr/dsmrdb:/var/lib/postgresql/data
and
volumes:
- /home/user/dsmr:/dsmr/backups
Of course, replace “user” with real user-id and create world-wide-writable sub-directory “dsmr” first.
i created the dirs and still cant start it
mm
i dont know what i’m doing either, i should probably quit until someone does the same and can help me?
Same error? Did you re-deploy the stack?
yeah
and now its under compose/3 instead of compose/1
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
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.
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.