jrbenito / canadiansolar-pvoutput Goto Github PK
View Code? Open in Web Editor NEWReads canadian solar inverter and submit to pvoutput.org
Reads canadian solar inverter and submit to pvoutput.org
canadianSolar-pvoutput/canadian_reads.py
Line 251 in 11b87cf
canadianSolar-pvoutput/canadian_reads.py
Line 278 in 11b87cf
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
)
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.
I am pretty struck with aurora inverter it replies on Aurora Software did everything what manual says but it doesnt replies back on ModBus RTU
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 the clock synchronize code to keep inverter clock in sync with RPi clock
Ideas:
In any case proper error handling must be in place since some inverters don´t have internal clock
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.
Implement wh_today_last verification for growatt low resolution counters on multi-inv branch
This will make multi-inv read to merge back into master and release 1.0.0
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.