Giter Club home page Giter Club logo

canadiansolar-pvoutput's People

Contributors

jrbenito avatar lampra1 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

canadiansolar-pvoutput's Issues

Cumulative flag should be tested against False

power_imp=None, temp=None, vdc=None, cumulative=False, vac=None,

if cumulative is not None:

Cumulative flag is being defined as False by default and tested against None, this causes C1=1 for every single request.

Better to test it against True instead of redefine it as None because this way any non default value besides True will end up default c1 at pvoutput (default as today is c1=0)

Multi-inv: No upload to pvoutput If the first device does not respond

Hi, just to let you know that I have an issue with one inverter not responding to modbus during the sunny mid days (probably overheating issue not solved yet). When the device is first (didn't try second) in the .conf file (systemid and address), the script does not upload to pvoutput. As a workaround I placed the device last in the .conf file and it works even if the last address does not respond.
I will try (not sure If I will be able) to come up with a more general solution and discuss it here.

My Canadian Solar inverter throws a 0x84 Exception 02

Hello, I tried using your code, and other methods (ESPHome) with other codes and for whatever reason (regardless of code/method), my inverter (csi-8ktl1p-gi-fl) only replies with
[15:14:06][VV][uart_esp32:125]: Read 0b00000001 (0x01)
[15:14:06][V][modbus:058]: Modbus received Byte 1 (0X1)
[15:14:06][VV][uart_esp32:125]: Read 0b10000100 (0x84)
[15:14:06][V][modbus:058]: Modbus received Byte 132 (0X84)
[15:14:06][VV][uart_esp32:125]: Read 0b00000010 (0x02)
[15:14:06][V][modbus:058]: Modbus received Byte 2 (0X2)
[15:14:06][VV][uart_esp32:125]: Read 0b11000010 (0xC2)
[15:14:06][V][modbus:058]: Modbus received Byte 194 (0Xc2)
[15:14:06][VV][uart_esp32:125]: Read 0b11000001 (0xC1)
[15:14:06][V][modbus:058]: Modbus received Byte 193 (0Xc1)
[15:14:06][W][modbus:108]: Modbus error function code: 0x84 exception: 2
[15:14:06][E][modbus_controller:058]: Modbus error function code: 0x4 exception: 2
[15:14:06][E][modbus_controller:067]: Modbus error - last command: function code=0x4 register adddress = 0x11 registers count=2 payload size=0

CSI changed the registers or I'm doing something wrong?

Thank you.

Add clock synchronize code

Add the clock synchronize code to keep inverter clock in sync with RPi clock

Ideas:

  1. Synchronize once, when the program starts
    problem is that a long running process would synchronize only once in a lifetime
  2. Synchronize every 24 hours when inverter wakes up
    seems good

In any case proper error handling must be in place since some inverters don´t have internal clock

Possible issue with number of inverters and system Ids

But I accidentally tested against an other situation so I believe that line 25 might not work as expected: raise ValueError("Error: need same number of inverters and system_ids"
The accident was that I had left commented out the address and port in the .conf file while i had set two systemid’s. I got no complain but only one system was uploaded, the first systemID. I tested with: systemID=12345,67890, systemID='12345','67890'. When using systemID='12345,67890' it was constantly restarting and not uploading

This was sent to me in a forum thread. Need to verify various combinations of systemID and inverter addresses in the config file. This was observed on multi-inv-rc3 tag.

Variable not define when calling script out of daylight time

f you restart pvoutput.sh outside the start and stop monitoring times (shStart and shStop) then you get the following error:

Traceback (most recent call last):
File “/home/pi/canadianSolar-pvoutput-master/canadian_reads.py”, line 279, in 
main_loop()
File “/home/pi/canadianSolar-pvoutput-master/canadian_reads.py”, line 271, in main_loop
str(snooze) + ’ minutes’
UnboundLocalError: local variable ‘snooze’ referenced before assignment
python script erro, sleeping few seconds and call it again

It looks like the variable snooze is only defined if canadian_reads.py is first run within the start and stop times.

Send end of day output information

This is needed for long periods of internet outage in order for the daily data to be reported correctly to pvoutput.
Things to consider: 1) Status code of newer models with pid offset function changes to 3 after sunset/dusk though all data may be retrieved from the inverter.
2) Old models turn off after sunset/dusk
So I am not sure at which exact moment the day data can be retrieved for old models.
Again during days with heavy clouds the inverter may shutdown before sunset.
As the daily output will be over-writen by the live data, the script could start sending day data at some interval (say 30-60 minutes) before sunset/dusk and keep sending until after 5-10 minutes after sunset/dusk if there is a change. Though to implement this, the estimation of sunset/dusk time is probably needed.

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.