CCDM - Charge Controller Data Manager

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

Previous topic - Next topic

mcsarge

Fort Wisers,

I love this interface, I think it might be quite easy to switch the input from the modbus directly to our MQTT service. Is this a GitHub project? would you be open to me taking a look and seeing if I can get this display working with our constellation of services and servers?

All the best,

Matt
Off Grid Island in Ontario Canada (Beaverstone Bay)
Primary: Classic 150 + wbjr; 3s2p HES 270watt
Winter: SolarBoost 50 MPPT (into wbjr); 2 x Sharp NE-80EJEA 80watt
Pack: 4s2p ROLLS S6-460AGM 6V for 24V pack
Inverter/Charger: Trace DR2424
Call Sign: KG4EUF

Fort Wisers

#16
Hey gang....
Well I was going to hold posting the project publicly until it was a little further along.
But at the rate I'm going that's going to be a while.....
So what I did is posted the project publicly here:
https://github.com/Brent-Lekx-Toniolo/Charge-Controller-Data-Manager-CCDM

And added features being worked on in the "issues" section and marked them enhancements, so feel free to check out the plans of things to come.
I have been talking to Graham Ross a bit in the background and I think he's also going to link this to the classicdiy group as well.

Matt, to answer your specific question, by all means grab the code and have at it!
I wrote the UI as a separate class, contained in CCDM_UI_Class.py file, so in theory you should be able to create an instance of this class and then pipe your data in to populate the UI fields.
I haven't tested a stand-alone instantiation though so can't say for certain there won't be some dependency issues, I believe you will have to drag BLT_Misc.py with it as well, but can't remember for sure what other dependencies you may need as I've always been building the entire package as a whole.
My plan long term is to do an HMTL5 based UI....this Tkinter one was just something to get off the ground.
You'll see a working example of how I route data to the UI Instance in the CC_Data_Manager.py file.


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

qrper

Well I gave it a good college try... and failed.
I guess that's why I wasn't born to be a hacker.

Got Python install on my window machine,(Windows 7 professional) and that was the end. Couldn't figure out how to get the pip3 pillow to install. Not even sure where I was suppose to try.

Looks interesting and I'll poke around some more and maybe get lucky.

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.

mcsarge

Fort Wisers,

I created a Q&D web based interface on Python using Flask and socketio to get the server side to be able to update the copies of the front end running on peoples web browsers. It worked pretty well, but I think there are better frameworks out there that would make things look better.

I will take a look in the new year, I like python alot and any oppurtunity to try something new is fun.

So many projects...

Matt



Quote from: Fort Wisers on December 21, 2020, 05:58:36 AM
Hey gang....
Well I was going to hold posting the project publicly until it was a little further along.
But at the rate I'm going that's going to be a while.....
So what I did is posted the project publicly here:
https://github.com/Brent-Lekx-Toniolo/Charge-Controller-Data-Manager-CCDM

And added features being worked on in the "issues" section and marked them enhancements, so feel free to check out the plans of things to come.
I have been talking to Graham Ross a bit in the background and I think he's also going to link this to the classicdiy group as well.

Matt, to answer your specific question, by all means grab the code and have at it!
I wrote the UI as a separate class, contained in CCDM_UI_Class.py file, so in theory you should be able to create an instance of this class and then pipe your data in to populate the UI fields.
I haven't tested a stand-alone instantiation though so can't say for certain there won't be some dependency issues, I believe you will have to drag BLT_Misc.py with it as well, but can't remember for sure what other dependencies you may need as I've always been building the entire package as a whole.
My plan long term is to do an HMTL5 based UI....this Tkinter one was just something to get off the ground.
You'll see a working example of how I route data to the UI Instance in the CC_Data_Manager.py file.
Off Grid Island in Ontario Canada (Beaverstone Bay)
Primary: Classic 150 + wbjr; 3s2p HES 270watt
Winter: SolarBoost 50 MPPT (into wbjr); 2 x Sharp NE-80EJEA 80watt
Pack: 4s2p ROLLS S6-460AGM 6V for 24V pack
Inverter/Charger: Trace DR2424
Call Sign: KG4EUF

ClassicCrazy

Quote from: qrper on December 22, 2020, 04:43:03 PM
Well I gave it a good college try... and failed.
I guess that's why I wasn't born to be a hacker.

Got Python install on my window machine,(Windows 7 professional) and that was the end. Couldn't figure out how to get the pip3 pillow to install. Not even sure where I was suppose to try.

Looks interesting and I'll poke around some more and maybe get lucky.

mike

Mike

I pretty much gave up at that stage too. I just got a new laptop with small ssd drive and larger regular drive so I am trying not to install everything on the SSD but of course that makes it a bit more difficult for certain things like the Pip that wants to go in users folders .

I will wait until this gets developed a bit more or else I will try it on a raspberry pi sometime.

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 December 22, 2020, 05:54:30 PM
Quote from: qrper on December 22, 2020, 04:43:03 PM
Well I gave it a good college try... and failed.
I guess that's why I wasn't born to be a hacker.

Got Python install on my window machine,(Windows 7 professional) and that was the end. Couldn't figure out how to get the pip3 pillow to install. Not even sure where I was suppose to try.

Looks interesting and I'll poke around some more and maybe get lucky.

mike

Mike

I pretty much gave up at that stage too. I just got a new laptop with small ssd drive and larger regular drive so I am trying not to install everything on the SSD but of course that makes it a bit more difficult for certain things like the Pip that wants to go in users folders .

I will wait until this gets developed a bit more or else I will try it on a raspberry pi sometime.

Larry

That makes me feel better, Larry. I wasn't sure where I was to type in the C:\user\user_name> pip3 install pillow
Was it in the Phyton window? Don't know. All I got was errors, so after trying everything I could think of, I watched some cat videos on Youtube.

I'll need to wait for the movie to come out with a simple install button.

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.

Fort Wisers

#21
Hey gang, sorry to hear about all the issues!
Feel free to post up screen shots or just straight text of what errors you are getting.
Perhaps, with your feedback, we can work through it and I can update the getting started guide to help future users avoid trouble.

FYI, installing both python and pillow is done at the windows command line.
So for pillow, as soon as you enter the command line shell enter the following:

pip3 install Pillow (the capital P is important)

Let me know what errors you get from this and I'll see what I can do to help sort it out and update the getting started guide to help makes things a little more intuitive!
Sorry again for the trouble! Perhaps I'll do the entire process fresh on another PC and see what steps I've missed in the guide.
Also fyi, the total hard drive space requirements will be very small.
CCDM itself is about 1 MB total (half that if you delete the documentation folder after you're complete) and while I'm not sure about pillow install size, I suspect it's quite light weight.



MATT-> I agree, too many projects and not enough time, if I get a few moments I'll build a small "UI only" package for you to trial.


Brent



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

ClassicCrazy

#22
Okay here is what I did .
I had installed Python in my  D drive.
But when I went to CMD and typed in python it took me to Microsoft Edge and Windows app store to Python.
So I just clicked on that and let it install.
So far so good  - next time I typed in CMD python I got python
So then I went to install pip part
Used directions from this page
https://vgkits.org/blog/pip3-howto/
It said I had old version of Pip3 so I did their command to install latest version.
Then it also said I didn't have it in the PATH
so I used directions on this page to add it to paths
https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/
now I type Pip3 and get directory so guess it is installed.
I installed Pillow
I click on the saved CCDM files under software
CC Data Manager but nothing opens up .
here are some screen shots of what I did along the way . ( I also checked some additional boxes in first python screens Py Launcher was one  - Associate files with Python was another and I think I checked environment variables too )
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

Some more screenshots of my setup

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 tried to start the python with command line but get the following errors
( I had an error before this with ip address but corrected it )
Now I get this error
see screenshot
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

#25
Larry,
Before anything, can you confirm what OS you're running (Win10 etc)?

You look to be basically there as some of the messages you're receiving in that last screen shot are from CCDM, meaning it's actually trying to get off the ground.
Now the next hang-up is it can't find night_icon.png, this is a little icon used in CCDM to display when the controller is asleep (in solar mode).
My first thinking is I somehow forgot this icon in the GitHib package, so I just did a fresh download from Github, unzipped (To most closely imitate what you're seeing on your end I did this on D:\  as well, as I have a second drive similar to what is sounds like you have) and it ran no problem.......

So, in your CCDM package, right where CC_Data_Manager.py file is located, can you see a folder called "resources", in there should be another folder called "images", can you confirm what icon images are in there, night_icon.png should be in there, among others?

It seems I should add some notes into the getting started guide about pip3, I must have either got lucky (it was already installed on this PC?) or I simply don't recall (possible as my memory can be hit and miss lol) having any issues with it but will add some notes as per your findings Larry.

Let me try a fresh start on my wife's pc this morning.............

Sorry gang, it certainly shouldn't be this difficult.
Thanks for the feedback so far, and for being patient as we get this hammered out.

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 December 23, 2020, 04:52:54 AM
Larry,
Before anything, can you confirm what OS you're running (Win10 etc)?

You look to be basically there as some of the messages you're receiving in that last screen shot are from CCDM, meaning it's actually trying to get off the ground.
Now the next hang-up is it can't find night_icon.png, this is a little icon used in CCDM to display when the controller is asleep (in solar mode).
My first thinking is I somehow forgot this icon in the GitHib package, so I just did a fresh download from Github, unzipped (To most closely imitate what you're seeing on your end I did this on D:\  as well, as I have a second drive similar to what is sounds like you have) and it ran no problem.......

So, in your CCDM package, right where CC_Data_Manager.py file is located, can you see a folder called "resources", in there should be another folder called "images", can you confirm what icon images are in there, night_icon.png should be in there, among others?

It seems I should add some notes into the getting started guide about pip3, I must have either got lucky (it was already installed on this PC?) or I simply don't recall (possible as my memory can be hit and miss lol) having any issues with it but will add some notes as per your findings Larry.

Let me try a fresh start on my wife's pc this morning.............

Sorry gang, it certainly shouldn't be this difficult.
Thanks for the feedback so far, and for being patient as we get this hammered out.

It's not when you do it all the timeâ€"and I couldn't locate a 13 year old to help me.

I haven't poke around with computers since my Apple II days.  At one time, I could keep my head above water with DOS, but crap, that's been 25 years ago. Heck at one time, I use to build my own pc (Who didn't?) now, when a HD dies, I take it to the local computer guy and have him install a new SSD and move all the files. I mean he's got kids to feed, too.


Now that you told me where to enter the commands, (I had to look up how to get to the command line on windows) I'll give it another shot today. I'll also take a peek at the resource folder and see if that file is there.
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.

Fort Wisers

Quote from: qrper on December 23, 2020, 09:20:57 AM
It's not when you do it all the timeâ€"and I couldn't locate a 13 year old to help me.

I haven't poke around with computers since my Apple II days.  At one time, I could keep my head above water with DOS, but crap, that's been 25 years ago. Heck at one time, I use to build my own pc (Who didn't?) now, when a HD dies, I take it to the local computer guy and have him install a new SSD and move all the files. I mean he's got kids to feed, too.


Now that you told me where to enter the commands, (I had to look up how to get to the command line on windows) I'll give it another shot today. I'll also take a peek at the resource folder and see if that file is there.

Hey Mike,

We're all doing our best to keep on-top of technology.
If I had made a better, more complete getting started guide perhaps a lot of the issues you guys are struggling with could be avoided.
So I appreciate you guys starting with me at ground zero as we get together something a little more user friendly......

Hopefully it ends up being a package that many find useful, and if not, then we try again!
I appreciate all the feedback from you and Larry, best of luck when you go to try again.
In the meantime I'm going to work on that guide and get it further along, I see python has a few more options in their 3.9 installer and I really should add a few notes on pip3 as well.
Spare time to work on personal interest projects / hobbies always seems to be the issue!

Take care everyone:
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 December 23, 2020, 10:35:12 AM
Quote from: qrper on December 23, 2020, 09:20:57 AM
It's not when you do it all the timeâ€"and I couldn't locate a 13 year old to help me.

I haven't poke around with computers since my Apple II days.  At one time, I could keep my head above water with DOS, but crap, that's been 25 years ago. Heck at one time, I use to build my own pc (Who didn't?) now, when a HD dies, I take it to the local computer guy and have him install a new SSD and move all the files. I mean he's got kids to feed, too.


Now that you told me where to enter the commands, (I had to look up how to get to the command line on windows) I'll give it another shot today. I'll also take a peek at the resource folder and see if that file is there.

Hey Mike,

We're all doing our best to keep on-top of technology.
If I had made a better, more complete getting started guide perhaps a lot of the issues you guys are struggling with could be avoided.
So I appreciate you guys starting with me at ground zero as we get together something a little more user friendly......

Hopefully it ends up being a package that many find useful, and if not, then we try again!
I appreciate all the feedback from you and Larry, best of luck when you go to try again.
In the meantime I'm going to work on that guide and get it further along, I see python has a few more options in their 3.9 installer and I really should add a few notes on pip3 as well.
Spare time to work on personal interest projects / hobbies always seems to be the issue!

Take care everyone:
Brent

Poked around a bit more. Got the window command panel up. I forgot all about that guy.
However, when I type in ;

pip3 install pillow

I get a error that says pip3 is not recognized as internal or external command

I do have python that appears to be running, I can open it and see it's screen.

however!! If I type python within the CMD screen, I get an error that 'Python is not recognized as a internal or external command."

It's the holidays... so don't put any work into this. I'll continue to poke at it and see what's going on

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 December 23, 2020, 11:46:57 AM
Quote from: Fort Wisers on December 23, 2020, 10:35:12 AM
Quote from: qrper on December 23, 2020, 09:20:57 AM
It's not when you do it all the timeâ€"and I couldn't locate a 13 year old to help me.

I haven't poke around with computers since my Apple II days.  At one time, I could keep my head above water with DOS, but crap, that's been 25 years ago. Heck at one time, I use to build my own pc (Who didn't?) now, when a HD dies, I take it to the local computer guy and have him install a new SSD and move all the files. I mean he's got kids to feed, too.


Now that you told me where to enter the commands, (I had to look up how to get to the command line on windows) I'll give it another shot today. I'll also take a peek at the resource folder and see if that file is there.

Hey Mike,

We're all doing our best to keep on-top of technology.
If I had made a better, more complete getting started guide perhaps a lot of the issues you guys are struggling with could be avoided.
So I appreciate you guys starting with me at ground zero as we get together something a little more user friendly......

Hopefully it ends up being a package that many find useful, and if not, then we try again!
I appreciate all the feedback from you and Larry, best of luck when you go to try again.
In the meantime I'm going to work on that guide and get it further along, I see python has a few more options in their 3.9 installer and I really should add a few notes on pip3 as well.
Spare time to work on personal interest projects / hobbies always seems to be the issue!

Take care everyone:
Brent

Poked around a bit more. Got the window command panel up. I forgot all about that guy.
However, when I type in ;

pip3 install pillow

I get a error that says pip3 is not recognized as internal or external command

I do have python that appears to be running, I can open it and see it's screen.

however!! If I type python within the CMD screen, I get an error that 'Python is not recognized as a internal or external command."

It's the holidays... so don't put any work into this. I'll continue to poke at it and see what's going on

mike

Mike ,
How did you install the Python ?  When I used the Microsoft app store to do it everything seemed to start working .
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