xirixiz / dsmr-reader-docker

DSMR Reader in Docker.
https://hub.docker.com/r/xirixiz/dsmr-reader-docker
113 stars 33 forks source link

DSMR remote logger as separate container #300

Closed Wouter1702 closed 1 year ago

Wouter1702 commented 1 year ago

Request

Hello,

I run my DSMR in docker on a synology and i am using the USB port to connect the serial cable the the P1 port. Synology does not support the use of USB in DSM7 so before i can upgrade to DMS7, i need to move the DSMR data logger function to an other host. I prepared a RPi with docker and want to run the DSMR remote data logger on the RPi in a docker container. I found a very old container (3 year old script). This container does not contain the latest remote logging script and does not uses the .env variables mentioned in the DSMR reader documentation.

Is it posible to create a separate container of the remote data logger function only and maintain it next to the DSMRreader container so remote datalogger and DSMR reader always using the same version of the source code

Thanks, Kind regards, Wouter Iliohan.

Additional information

No response

xirixiz commented 1 year ago

Hi Wouter, I just checked the documentation, and I don't see outdated things in the Docker image.

https://dsmr-reader.readthedocs.io/nl/latest/how-to/installation/remote-datalogger.html

You can use the Docker container environment variables, which overrules the .env file settings, like the documentation says.

If you have additional info, or you'd like to have some additional info, please let me know.

xirixiz commented 1 year ago

Check the README.MD as well, there is info regarding this topic available.

Wouter1702 commented 1 year ago

Hello Bram,

How can i use your docker image as a remote logger. I can not find any examples on how to do that. I use your image on my Synology as a logger and app in 1. How can i seperate those. Can i use your docker image as a remote logger only?

xirixiz commented 1 year ago

Hi Wouter, you can start reading from here (sender, receiver, standalone).... https://github.com/xirixiz/dsmr-reader-docker#dsmr-datalogger-related

The Docker container on your NAS should be the receiver, the Docker container on the RPi should be the sender.

Wouter1702 commented 1 year ago

OK, so on the RPi i only use the dsmr container and no database. and i have to put the correct information in the environment variables.

I have made a docker-compose example.

version: '3.7'

networks: default: driver: bridge

services: dsmr: image: xirixiz/dsmr-reader-docker:latest cap_add:

Could you please check if this is a correct way. Thanks, Kind regards, Wouter Iliohan

xirixiz commented 1 year ago

Hi Wouter, never used it myself before, but it seems to be looking good. Most probably @dennissiemensma can tell whether the env vars match the setup you're trying to have.

dennissiemensma commented 1 year ago

@Wouter1702 if available on the host reading the USB, you can consider simply installing ser2net there instead (which should be working on Raspbian). Then configure DSMR-reader to read by netwerk instead, so the other way around. This should be way easier than the remote datalogger.


Could you please check if this is a correct way.

I think it's best to just try it. The settings required should prompt an error when missing.

dennissiemensma commented 1 year ago

@Wouter1702 any progress?

Wouter1702 commented 1 year ago

Hello Dennis,

Yes i have mad progress. I installed a RPi with docker and installed the ser2net container. The RPi now sends the P1 data to the DSMR container on my Synology.

Here is the compose file of my ser2net container

version: "3.7"

networks: default: driver: bridge

services: ser2net: image: jbouwh/ser2net:latest environment:

I switched the USB-P1 cable from the Synology to the RPi and then i changed the data logging mode in DSMR to use the network socket, put in the IP and port of the ser2net and the readings came in. I made the changes via the UI but Is it also possible to set this parameters on start of the container with environment variables or does that only apply to new installations?

Op 10 nov. 2022, om 22:45 heeft Dennis Siemensma @.***> het volgende geschreven:

@Wouter1702 https://github.com/Wouter1702 any progress?

— Reply to this email directly, view it on GitHub https://github.com/xirixiz/dsmr-reader-docker/issues/300#issuecomment-1310944308, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMYAQ535GINW23ESUYU3A5TWHVUI3ANCNFSM6AAAAAARWT7WT4. You are receiving this because you were mentioned.

xirixiz commented 1 year ago

Ik zie dat je nu een andere Docker image gebruik. Dat was niet nodig geweest. Persoonlijk ben ik niet zo thuis in de ser2net configuratie, maar er is door Dennis voldoende over gedocumenteerd.

https://dsmr-reader.readthedocs.io/nl/v5/how-to/installation/remote-datalogger.html

bikeymouse commented 1 year ago

@Wouter1702 if available on the host reading the USB, you can consider simply installing ser2net there instead (which should be working on Raspbian). Then configure DSMR-reader to read by netwerk instead, so the other way around. This should be way easier than the remote datalogger.

Could you please check if this is a correct way.

I think it's best to just try it. The settings required should prompt an error when missing.

I was wondering, what is the use case of the remote datalogger, if you can use ser2net to forward the P1-port to any host? Does the remote datalogger use less bandwidth?

dennissiemensma commented 1 year ago

Ser2net or a direct usb connection is always preferred, since it allows DSMR-reader to pull data from either source. It's also way easier to configure and debug/maintain as user. The remote datalogger should only be used for technical reasons as workaround, to push data. E.g. when the source cannot be reached by network. Like running DSMR-reader outside your home network etc.

xirixiz commented 1 year ago

Thanks for the additional notes Dennis. I wasn't aware. Maybe I need to double check the Docker settings and provide a ser2net docker-compose example.

Also we discussed it in the past 😄, but never followed up on this

https://github.com/xirixiz/dsmr-reader-docker/issues/241

bikeymouse commented 1 year ago

Yes, thanks for explaining, makes good sense. And for both of you kudos for making this great software easily available!