Giter Club home page Giter Club logo

e2pv's People

Contributors

omoerbeek avatar pixelchrome avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

e2pv's Issues

New conection accepted but not handled

The script is only capable of handling one connection. That is fine, but new conections are accepted by the OS since we do not close the accepting socket. This is confusing at least.

Gateway reset is not detected

After rebooting the gateway, the existing connection is not terminated, the timeout mechanism does not seem to work in that case.

Address already in use.

Hi,

I'm trying out this script you wrote so (when it works) we can deploy this on all installations that are deployed by our company. But I'm getting some errors with it. It points to line 306 on my modified version:

$ok = socket_bind($socket, '0.0.0.0', 5040);

The only thing I added is some things to the MySQL statement's which shouldn't interfere with this function. But to be save, here is my modified version http://pastebin.com/f6ktRxd2 and here the config http://pastebin.com/7x6jjGrD

Also when I just manually run this script I notice it won't stop and let me run another command (if you know what I mean) and when I run sudo netstat -a -p -n it shows the socket 0.0.0.0:5040 is still open.

Hope you can help me with this...

-Zandor Smith

PS Nederland ftw!

[suggestion] change upload-interval

new data is now sent each 540 seconds (9 minutes).
pv output converts it to each ten minutes (HH:M0)
i suggest to rewrite the '540' line to something that will trigger when:

  • $last is over 5 minutes ago
  • current time (%M) modulo 10 < 5.

I now got this replacement:

  $min = idate('i') % 10;
[..]
//  } elseif ($last < $time - 540) {
  } elseif ($last < $time - 300 && $min < 5 ) {

e2pv.php script throws error with PHP 8

I'm a happy user from the moment that the Enecsys servers went down. As of 2 days ago the script doesn't run anymore. I realized that this started with updating of PHP from PHP 7.4 to PHP 8.

My line 390 might be different, so I will put the corresponding lines below.

PHP Fatal error: Uncaught Error: Object of class Socket could not be converted to string in /home/pi/enecsys/e2pv.php:390
Stack trace:
#0 /home/pi/enecsys/e2pv.php(448): loop()
#1 {main}
thrown in /home/pi/enecsys/e2pv.php on line 390

My e2pv.php lines (it is both line 390 and 391 (according https://phpstan.org/ the problem is on both lines):
$selarray[(string)$client] = $client;
$connections[(string)$client] = $conn;

phpstan also mentions the following when I check the script:
Cannot cast Socket to string. (line 390)
Cannot cast Socket to string. (line 391)

(when I start the script with PHP 7.4, it runs as it used to and the gateway connects directly)

Split inverter data in MySQL database

Is it possible to split the inverter data to the MySQL table? Like so:

Inverter Data Time
111111 10kWh 10:30
222222 11kWh 10:30
333333 12kWh 10:30
111111 11kWh 10:40
222222 12kWh 10:40
333333 13kWh 10:40

Thank you

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.