CCDM - Charge Controller Data Manager

Started by Fort Wisers, November 26, 2020, 04:39:08 AM

Previous topic - Next topic

Fort Wisers

#60
Hi again folks.....

Larry -> Adding a few graphs on to CCDM is something I'd like to accomplish.
The bit I looked into it, it would be best to add another package (similar to how we added Pillow when required) to leverage from to create plots.
It's on the list (so to speak) but I wanted to get the basic functionality and install method hammered home first.
Now you mentioned having to shut down to gather data from your other controllers.....
Here's a test for you....rename the original CCDM folder to CCDM1 and then make a copy and call that folder CCDM2 (or something like that).
Leave the original config file in or CCDM1 folder as you had it working, modify the config file in CCDM2 to point to the IP address of your second classic.
Once you've made the copies and edited the configs, simply open the first the first CC_Data_Manager as you normally would, then minimize it and open CC_Data_Manager in the second folder.
The only downfall is if you only have one monitor you'll have to flip between the two (minimize one, maximize the other) to gain full view of what's going on.
If you happen to have two monitors then you can dock one instance of CCDM to each monitor.

I have trial ran multiple instances of CCDM here in theory but never actually on two real CCs.....
But, in theory you should be able to run as many CCDM instances as your PC can handle.
Just be sure to edit the config files in each folder so that you don't have two CCDM instances trying to poll the same charge controller!
If you have a really big monitor, there is a way we can override the "auto sizing" CCDM does based on your monitor resolution so that you could potentially fit two CCDM instances into the space of one monitor, this will have limits in practicality though.

The long term plan (as you may have seen in the code) is to run one instance of CCDM to handle data reads from up to 4 controllers.
Again, it's on the list.....sorry, that's becoming my catch phrase.


Mike had a great question in a PM, and I hope he doesn't mind me answering it here, just so others see the answer.
(Mike if you're upset I answered it here instead of in the PM, please feel free to chew me out)
His question was how does CCDM decide on when to show a cloudy vs partly sunny vs sunny icon on the overview screen?

So, one thing I hadn't mentioned to you guys is this.....
In that same config file you modified for IP address, scroll until you find this line:
CC_EXPECTED_MAX_POWER = [700, 700, 700, 700]

Now set the first 700 to the power rating of your solar array....so if you have an array that can produce a total of 2000 watts, you'd change the line to this:
CC_EXPECTED_MAX_POWER = [2000, 700, 700, 700]

Now onto answering Mike's question.
In Bulk Charge Mode:
- if the incoming power is <20% of the expected max power, the cloudy icon is shown
- if the incoming power is >=20% but <70% of expected incoming, then the partly sunny icon is shown
- if the incoming power is >70% of expected incoming power, then the sunny icon is shown
My thinking behind doing these icons was a quick visual on how the incoming power compares to the real exposure. Meaning if we're in Bulk and I notice it's really sunny out but only see clouds on CCDM it's likely the panels are either dirty or I have a bad wire / connection somewhere between the array and the CC.
In Absorb and Float:
In these charge modes the incoming power is now not based entirely on array sunlight exposure, it's based upon CC input throttling (assuming there's at least enough available input power to maintain the mode).
The charge controller throttles the incoming power to achieve only enough power required to run loads and maintain the absorb or float charge voltage.
So, in these charges modes, I can't truly tell if the array is under cloud, sun or otherwise, so I just show sunny (IE it's a good day when you hit Absorb / Float).
In Sleep:
You get the wolf howling at the moon icon (our 12 year old daughters idea lol).

If you want to see the code behind the above, it's between lines 534 and 560 in the CCDM_UI_Class.py file....the method is called update_dynamic_images.


I hope that helps!
Take care and enjoy the end of the week:
Brent



Cabin#1 System: 2 x Hanwha QCell 370watt, Classic 200 incl. wbjr, 2 x Rolls FLA 6V, Kisae SW1220 Inverter

ClassicCrazy

I will give that multiple CCDM a try sometime Brent.
I have to flip between the two already for both Local Status app and Grahams Classic Monitoring app. Though Graham has one screen that has spot you can click that will show the total kwh between both Classics though everything else you need to switch  controller screens.
I will try out the PV total parameter with different values sometime too. 
The Midnite already does some kind of cloud monitoring - at least in the Local Status app there is a place it tells you if there is clouding on the panels - so must be a modbus message.
It is the icon that shows up on the largest dial on Local Status - it also displays if input voltage is lower than output voltage. Maybe these are in Reason for Resting codes ?  And there is something  if the clock on computer is set different then on Classic.

Appreciate your development but no hurry on it !

Larry 


system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

Fort Wisers

#62
Hey Larry,
I believe the feature you're referring to is partial shading detection, this is something a little different than just cloudy.
So if the CC does a sweep to determine the Maximum Power Point (MPP) on the input side (IE what's coming in from your panels) and the incoming voltage at that MPP is less than half (don't quote me on that value) of the VoC (Voltage, Open Circuit - the incoming voltage without any load) then it's likely that a part of your array is in decent light and the other part is shaded (generally caused by tree branches etc).
Where-as a simple cloudy day (or any cause where basically all of the array is under low light conditions) will result is nearly normal incoming voltages at MPP but low input current.
Anyhow, CCDM does show partial shading (note the feature has to be enabled in your classic).....if you go to the Misc Tab and look at the Charge Controller Info Flags section there is an indicator to show "PV partial Shading Detected".

This said though, it would be very little work to add this into the mix of icons.
All I described previous would take effect if there is no partial sharing detected, if partial shading is detected we could show a different icon, consider this added to the list!
Cabin#1 System: 2 x Hanwha QCell 370watt, Classic 200 incl. wbjr, 2 x Rolls FLA 6V, Kisae SW1220 Inverter

ClassicCrazy

Quote from: Fort Wisers on January 08, 2021, 07:48:30 AM
Hey Larry,
I believe the feature you're referring to is partial shading detection, this is something a little different than just cloudy.
So if the CC does a sweep to determine the Maximum Power Point (MPP) on the input side (IE what's coming in from your panels) and the incoming voltage at that MPP is less than half (don't quote me on that value) of the VoC (Voltage, Open Circuit - the incoming voltage without any load) then it's likely that a part of your array is in decent light and the other part is shaded (generally caused by tree branches etc).
Where-as a simple cloudy day (or any cause where basically all of the array is under low light conditions) will result is nearly normal incoming voltages at MPP but low input current.
Anyhow, CCDM does show partial shading (note the feature has to be enabled in your classic).....if you go to the Misc Tab and look at the Charge Controller Info Flags section there is an indicator to show "PV partial Shading Detected".

This said though, it would be very little work to add this into the mix of icons.
All I described previous would take effect if there is no partial sharing detected, if partial shading is detected we could show a different icon, consider this added to the list!

I learned a new one - never realized that partial shading notification was an option. I found it in the Tweaks section menu.

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

ClassicCrazy

I have both of my controllers running at the same time the way you said to do it.
The thing that would be nice is if there was a display of the data without the graphics so I could shrink  the window size and put them side by side .
If I Shrink  the windows in present format I can't see a lot of the data unless I open them up full size.

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

Fort Wisers

#65
Hey Larry, there is actually a way we can accomplish this......

Step 1: go into your good old config files, find the following:
UI_VIEW_STYLES = {
                "Application_Version": CCDM_VERSION,
                "UI_Mode": "graphics",
                "Tab_BG_Color": "default",
                "Widget_Group_Type": "tile",            #Valid inputs: None, "tile"
                "Widget_Group_BG": "light blue",
                "EntryWidget_BG": "gray90",
                "Base_Font_Size": 14                    #Valid range: 8-14 (might be limited based on screen res check)
                }   

This is the parameter we're after:

                "UI_Mode": "graphics",

Change the UI_Mode to "lists-only" so that you end up with this:

                "UI_Mode": "lists-only",

This will run CCDM without graphics, I think maybe the icons are still displayed but that's it......I can't remember.....

Step 2:
In order to override the auto-sizing thing CCDM does based on your PC monitor res, you need to edit the CCDM_UI_Class file (my plan is to move this editing to config in later revs).
Open the file and find these two lines (the are together, lines 93 and 94 if you're using notepad++ or similar to edit):
        self.Detected_Screen_Width = self.UI_root.winfo_screenwidth()
        self.Detected_Screen_Height = self.UI_root.winfo_screenheight()

Change them to look like this:
        self.Detected_Screen_Width = 1024
        self.Detected_Screen_Height = 768

This will force your instances of CCDM to run as a 1024 x 768 window instead of reverting you your PC monitors res settings.
So, assuming your PC's monitor is running a higher resolution than 1024 x 768, CCDM will now not take up your full monitor, so you might be able to place them side by side, one above / one below etc....whatever works to get the view you want.

A few words of warning, don't set the width x height to lower then 1024x768, CCDM will simply say "nope, can't go lower than this" (we could in theory change some code to ignore that warning)". That 1024x768 was a lower end screen res I decided upon based on what we're trying to fit on the screen vs font / data element usable size. Finally, 1024 x 768 likely won't fit completely side by side or over under unless you have a really high res monitor but MAYBE these steps will get you close to where you would like to be or decent enough so that you can at least see the majority of what you want to see side by side without having to flip through various views?
In all honesty I have not tested lists-only UI Mode in a number of builds, nor have I tested every single possible combination of widths and heights so expect some issues with overlap and other unknowns as you squash and pull the sizing around, while CCDM can resize and move things around during this resizing, it does have limits, and a number of the limits may not be checked in code.

Another option is to just do step 2, leave it in graphics mode and just override the opening resolution.

But, basically play around to help get something that will fit two instances in a usable manner on your screen. If your PC is already running a low res, you may have to play with that as well to make enough room for two CCDM instances.....

Have fun!
Have a great weekend:
Brent


Cabin#1 System: 2 x Hanwha QCell 370watt, Classic 200 incl. wbjr, 2 x Rolls FLA 6V, Kisae SW1220 Inverter

ClassicCrazy

I did the changes and those worked Brent .
Thanks

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

Fort Wisers

That's great Larry, thanks for trialing it and for the screen shot!
Have yourself a great weekend:
Brent
Cabin#1 System: 2 x Hanwha QCell 370watt, Classic 200 incl. wbjr, 2 x Rolls FLA 6V, Kisae SW1220 Inverter

qrper

Brent....

A Raspberry PI4 should be here soon. I got a monitor coming as well so I can dedicate it to CCDM all the time. I went with PI4 simply because I could get the 4 GB of ram and only 1 GB for the RB3+. I didn't scourer the 'net looking, but rather did a Amazon purchase.
Everything should be here sunday, so it looks like Sunday night is going to be a Crown Royal, Diet Coke and Prozac kind of night.

mike
System one: 7kWp w/ Trina 250 W panels @90 Vdc. Classic 150 to 16-6 V U.S batteries. Trace 5548 sine wave inverter.
System two: 6kWp grid tie with solaredge inverter.
System three: Midnite Brat, two 120 W Astropower modules, 100 Ah battery. Runs the LED streetlight in the back yard.

qrper

Brent,

here's a screen shot of what I'm seeing. There are dozens of blocks of these errors flying by mixed in-between what appears to be downloads from the Classic.

mike
System one: 7kWp w/ Trina 250 W panels @90 Vdc. Classic 150 to 16-6 V U.S batteries. Trace 5548 sine wave inverter.
System two: 6kWp grid tie with solaredge inverter.
System three: Midnite Brat, two 120 W Astropower modules, 100 Ah battery. Runs the LED streetlight in the back yard.

ClassicCrazy

Quote from: qrper on January 09, 2021, 11:27:46 AM
Brent,

here's a screen shot of what I'm seeing. There are dozens of blocks of these errors flying by mixed in-between what appears to be downloads from the Classic.

mike

I get those errors on the Classic that I don't have a Whizbang installed on Mike.
Do you have a Whizbang ?

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

qrper

Quote from: ClassicCrazy on January 09, 2021, 05:00:08 PM
Quote from: qrper on January 09, 2021, 11:27:46 AM
Brent,

here's a screen shot of what I'm seeing. There are dozens of blocks of these errors flying by mixed in-between what appears to be downloads from the Classic.

mike

I get those errors on the Classic that I don't have a Whizbang installed on Mike.
Do you have a Whizbang ?

Larry

yes, Larry, I have the whizbang installed in the system and CCDM reports it's there and displays the results

mike
System one: 7kWp w/ Trina 250 W panels @90 Vdc. Classic 150 to 16-6 V U.S batteries. Trace 5548 sine wave inverter.
System two: 6kWp grid tie with solaredge inverter.
System three: Midnite Brat, two 120 W Astropower modules, 100 Ah battery. Runs the LED streetlight in the back yard.

ClassicCrazy

Quote from: qrper on January 09, 2021, 05:30:38 PM
Quote from: ClassicCrazy on January 09, 2021, 05:00:08 PM
Quote from: qrper on January 09, 2021, 11:27:46 AM
Brent,

here's a screen shot of what I'm seeing. There are dozens of blocks of these errors flying by mixed in-between what appears to be downloads from the Classic.

mike

I get those errors on the Classic that I don't have a Whizbang installed on Mike.
Do you have a Whizbang ?

Larry

yes, Larry, I have the whizbang installed in the system and CCDM reports it's there and displays the results

mike

This is the modbus document in case you want to figure out which registry numbers are the ones with the errors .
http://www.midnitesolar.com/pdfs/classic_register_map_Rev-C5-December-8-2013.pdf

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

Fort Wisers

Hey guys!

Good luck with the PI tomorrow Mike.

Now this register read error is an interesting one.....
The screen shot Mike sent show's a successful read cycle ("Gathering data from....." message with no errors under it) and then a read failure of literally every register CCDM reads.
Then back to a successful read.
Larry do you see yours the same way on the controller you get errors on (good read, then bad read, then good read and so on....)?

A few questions for both of you:
Can I trouble you guys to grab Firmware numbers from your Classics?
Can you check what A-RST is set to on your controllers (under the tweaks menu)
Is any other software program running that will poll the controller for data?

Thanks, enjoy the rest of your weekend!

Brent

Cabin#1 System: 2 x Hanwha QCell 370watt, Classic 200 incl. wbjr, 2 x Rolls FLA 6V, Kisae SW1220 Inverter

qrper

Quote from: Fort Wisers on January 09, 2021, 09:03:58 PM
Hey guys!

Good luck with the PI tomorrow Mike.

Now this register read error is an interesting one.....
The screen shot Mike sent show's a successful read cycle ("Gathering data from....." message with no errors under it) and then a read failure of literally every register CCDM reads.
Then back to a successful read.
Larry do you see yours the same way on the controller you get errors on (good read, then bad read, then good read and so on....)?

A few questions for both of you:
Can I trouble you guys to grab Firmware numbers from your Classics?
Can you check what A-RST is set to on your controllers (under the tweaks menu)
Is any other software program running that will poll the controller for data?

Thanks, enjoy the rest of your weekend!

Brent

brent,

the read failure comes in hunks. It does not appear to be a pattern. I get scads of good reads, the a block of bad reads.

Firmware for my classic is:
2193 02/06/2018

No other software running that would be talking to the classic

Tweaks menu? From the midnite local app? Or on the controller itself?

Mike
System one: 7kWp w/ Trina 250 W panels @90 Vdc. Classic 150 to 16-6 V U.S batteries. Trace 5548 sine wave inverter.
System two: 6kWp grid tie with solaredge inverter.
System three: Midnite Brat, two 120 W Astropower modules, 100 Ah battery. Runs the LED streetlight in the back yard.