Git Product home page Git Product logo

intelwolf / p1monitor Goto Github PK

View Code? Open in Web Editor NEW
23.0 23.0 8.0 47.39 MB

Docker container version of the P1-Monitor software to monitor smart energy meters

Home Page: https://marcel.duketown.com/p1-monitor-docker-versie/

License: GNU General Public License v3.0

Dockerfile 0.02% Python 20.94% Shell 0.64% Hack 0.12% PHP 23.30% CSS 2.07% JavaScript 44.82% HTML 2.95% SCSS 5.13%
docker docker-compose dsmr p1-monitor p1monitor smartmeter

p1monitor's People

Contributors

intelwolf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

p1monitor's Issues

Bug: P1 monitor Backup not running at set time

Im using backup option in the p1 monitor since i moved from rpi to docker the backup stopt running. When i hit test it works but normally it runs every day 00:05 but that not running any more I tried setting it again to different time rebooted but it wont work at set time. Thanks for making a docker version and very happy with it.
IMG_2984

Log rotation socat

When diagnosing an issue with socat dropping and not connecting back, I noticed the logs for socat are not rotated.
Because of the verbose options (-d -d -d) it will log every time it receives data. The log file of around a months worth of data is almost 400MB for reference in tuning this.

I an not sure if it would also be a good option to drop some of the verbosity by default when using socat. One could always add these flags back for debugging rough the socat options variable.

I might take a look at submitting a PR fixing this myself if I got the time this week.
(also you have not pushed back to github with v1.7.0d, github is still at v1.7.0a, and the entrypoint.sh looks to be missing, or I am blind)

Import data from old P1mon installation doesn't work

First off; Thanks for this great work!

I managed to get everything up and running on a Synology nas (that wasn't straight forward, because you can't mount tmpfs and/or devices). Using Pontainer I managed to get everything working. After that you need to make sure that your /dev/ttyUSB0 is chmod to 777.

Okay, so far so good. I now have a running install in Docker that receives data from the P1 cable.

Next step: Import 1,5 years of data from my old p1mon install.

I exported the database (with the export button) on the Raspberry. Next: I click the import button in the docker install and choose the file. Nothing happens.

I tried the same on my old install, to make sure the fault isn't in P1mon. But overthere it immediatly starts to import the file.

I suspect it has something to do with the upload location of the import file, is that possible?

Reverse proxy configuration not working.

Hi,

I'm running your image for a long time and wanted to place it behind a reverse NGINX proxy (Linuxserver.io SWAG)
Followed instructions and configured:
environment:
- PROXYPATH=p1mon

With the following NGINX config:
location /p1mon {
return 301 $scheme://$host/p1mon/;
}

location ^~ /p1mon/ {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app 10.0.0.156;
set $upstream_port 80;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}

The homepage is reachable without P1 data, all values (energy, gas, water) are zero.
Also the the P1 dongle configured using the following SOCAT config is blank.

  • SOCAT_CONF="pty,link=/dev/ttyUSB1,raw,user=root,group=root,mode=660 tcp:10.0.0.47:23,retry=forever,interval=30"

P1mon works perfect when you access it on it's internal IP but fails when behind reverse proxy.
It worked once (1 month ago) and since then it never worked again.

Any ideas, or logs needed?

No "actueel verbruik"

Just installed my this on my Synology NAS.
Got everything working in Docker, I can access the portal. But it seems it's not showing any real data right now.
How to troubleshoot?

Synology NAS is connected to my network
P1 cable directly into the USB of my NAS.

Container stop timeout

Currently when stopping the container docker will wait 10 seconds by default for a container to stop all processes, and if this timeout is exceeded, will kill it forcefully.
This 10 second timeout is not enough time to stop the container gracefully, as the stop script sleeps 3 or 5 seconds for each process. (current shutdown has 44 seconds of sleep (excluding time needed to run the actual stopping))

In the docker-compose stop_grace_period should be set to reflect the longer timeout needed to gracefully exit, or --stop-timeout argument for the docker cli.
it might also be useful to mention in your blog post linked in the readme.

I have also noticed that when extending the timeout way to much then it needs to stop, it still takes the full timeout before the stop command returns, suggesting that even after stopping p1monitor gracefully the main process does not stop. so the trap might not break the sleep loop. though I have not confirmed this properly.

Upgrading from 2.3.0 to the latest 2.4 caused /dev/ttyUSB1 to disappear

Situation:

Kubernetes with this spec snippet works:

 -     spec:                                                                                                                                                                                               
      containers:                                                                                                                                                                                       
      - env:                                                                                                                                                                                            
        - name: SOCAT_CONF                                                                                                        
          value: '"-T10 pty,link=/dev/ttyUSB1,rawer,group-late=dialout,mode=660 tcp:192.168.100.139:23,retry=forever,interval=30"'
        image: mclaassen/p1mon:2.3.0a    

With this snippet it does not work (upgraded on april 15th):

  -     spec:                                                                                                                                                                                               
      containers:                                                                                                                                                                                       
      - env:                                                                                                                                                                                            
        - name: SOCAT_CONF                                                                                                        
          value: '"-T10 pty,link=/dev/ttyUSB1,rawer,group-late=dialout,mode=660 tcp:192.168.100.139:23,retry=forever,interval=30"'
        image: mclaassen/p1mon:2.3.0a   

It seems that with the new version there is no /dev/ttyUSB1 with the same SOCAT_CONF

Weather API fails

I have had some issues with file permissions, those are now solved by chmodding the folders inside and outside of the container. One issue remains: I'm unable to grab weather data, with the follwing error in the log: getWeatherFromApi: URL error<urlopen error [Errno -3] Temporary failure in name resolution>
Any idea on how to fix this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.