Author Topic: YACCM - Yet Another Charge Controller Monitor  (Read 554 times)

chowderhead

  • Newby
  • *
  • Posts: 7
YACCM - Yet Another Charge Controller Monitor
« on: August 02, 2021, 03:46:07 PM »
See attached screenshots.

Pure Python, SQLite, jQuery, HTML and CSS; serves a web page and uses websockets for peppy performance and real time (1s update) monitoring. I don't get off on 'pretty', so it ain't nothing but functional. I don't have a Whiz Bang Jr yet, so the real time data is incomplete. Working on getting the communication protocol for my MagnaSine MS4448PAE to integrate it, too, but radio silence from Magnum Dimensions so far. If anyone has knowledge, I'd be most appreciative.

I'm not sharing it until I have more time on it and greater confidence of its stability and performance, but would like some input from the community. Also looking for information about the Combo Charge Stage register, specifically what is "state", i.e. the LSB? Register Map document indicates vaguely what each number means, but I'm curious about their definitions as my goal is to write a driver to control an OpenEVSE vehicle charge controller to keep the system at MPPT for as long as possible during the day without cooking anything, and "state" may be exactly what I want.

I'm doing a crude calculation of inverter efficiency by calculating PV power (Ppv=IpvVpv), but clearly don't have it right as the efficiency results occasionaly suggest a violation of physical laws. Again, any info from the more educated is appreciated.

Specifics:
  • Orange Pi Zero with NAS board and 64GB MSATA storage to keep from pounding the SD card to an early death
  • Armbian OS
  • Poll Classic every minute via a Cron job to accrue history, which is stored on the MSATA card
  • The entire collected history is available for plotting
  • Real time data polling period is user-selected and clicking on the values in the schematic toggle plotting of selected field
  • It's only a week old, so I'm still scoping features and debugging; will figure out plot zooming eventually and also saving real time data to the server

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 3010
Re: YACCM - Yet Another Charge Controller Monitor
« Reply #1 on: August 03, 2021, 12:37:14 AM »
Is it going to work on a Raspberry Pi ?
I will be happy to give it a try when you release it . ( or test it out)
Yes the Whizbang additions are certainly needed since that has all the valuable battery and load data.
Also - will it be able to view two or more Classics in Follow Me ( or just two classics ?)

Larry
system one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

boB

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3634
Re: YACCM - Yet Another Charge Controller Monitor
« Reply #2 on: August 03, 2021, 02:12:32 AM »

Mr. Chowderhead,  here is an old document about Magnum's communications.

It is over 10 years old but I think the basic protocol is very similar.

This documentation used to be available on their web site.

Keep up the good work !

boB
K7IQ

chowderhead

  • Newby
  • *
  • Posts: 7
Re: YACCM - Yet Another Charge Controller Monitor
« Reply #3 on: August 03, 2021, 06:16:18 PM »
@Larry:

I'm not clear on the Follow Me protocol, but this should communicate with every classic on the network having a unique IP address. I'll need to make some minor modifications to facilitate that. Give me a while, this is just one of many irons in the fire.

It will work on anything running a recent version of Linux AFAIK.

#boB:

That is a little nugget there! Thanks!


ClassicCrazy

  • Hero Member
  • *****
  • Posts: 3010
Re: YACCM - Yet Another Charge Controller Monitor
« Reply #4 on: August 03, 2021, 10:08:04 PM »
No hurry !
Yes that is all that would be needed is different IP .
Larry
system one
Classic 150 , 5s4p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

chowderhead

  • Newby
  • *
  • Posts: 7
Re: YACCM - Yet Another Charge Controller Monitor
« Reply #5 on: August 05, 2021, 01:46:12 PM »
@boB:

That document is still valid. I'm communicating with the MagnaSine! Thank you very much!

paul alting

  • Jr. Member
  • **
  • Posts: 66
    • http://paulalting.com
Re: YACCM - Yet Another Charge Controller Monitor
« Reply #6 on: August 21, 2021, 10:08:16 PM »
I haven't been here on midnight for a while now, and was interested to see what was happening.

Looking at the developments of chowderhead reminds me when I first started my own project, QuadlogSCADA, which started some years ago and with the help of some of the good folks here on MidNite Solar.

Not wanting to highjack the thread, but I would like to give some details on how my own project has progressed and maybe to give some ideas for chowderhead, if he wishes.

So, quitely in the background I have been progressing my project and has some similarities to this project.
To give a brief overview of it, if I could:
QuadlogSCADA is pure Python, using Python 3.7+ as it uses async routines.
The application is made up of two coupled programs, one as the IO Device scanner, using Modbus RTU or TCP to do the communications to devices, whether that be solar controllers or industrial PLCs.
The other application is the lean and mean web server based on Sanic, based on asyncio.

The two Python programs are connected together by using a high speed no SQL data store, Redis.
Redis is also used to store time series data which is logged by the IO Device scanner and is accessed by the Sanic application for giving data to the web application, which is a single page javascript application.
The web application is fast and being a single page application works as if it were a local application, no re-loading of HTML or anything else after initial load.
The web application uses web sockets for very low data bandwidth of data to keep the web application alive with at the moment data as acquired from the Modbus device.
The web app allows the user to log in securely and view and alter data as well as setpoint data and also view various logs and historical data in charts using 'Ploty.js'

The project is really a framework, where the design allows for fitting it in to various applications by users. It is 'Open Source'.
I initially started the project as an alternative to propriety SCADA applications that only worked on Microsoft Windows operating systems.
QuadlogSCADA was designed to run very well on GNU/Linux, and I use Debian.
The system is set up such that both the IO Device scanner and Web Server applications are brought up on system startup using systemd.

It has proved to be reliable I have now operating in an industrial control situation where it controls the whole show and using industrial based Arduino controllers.
I have been really happy with how well this has all worked, and now am in love with Python, having initially started the project using C/C++.

If anybody is interested in the code or the web app screen captures, I can pop them up here for ideas, maybe in a new thread of course.
Just a little quick screen capture of one my own solar system showing the LiFePO4 battery attached.
6 x 200W PV into home-brew 6 stage MOSFET charge controller : Microhydro 220Vac 3 phase IMAG
8 x 400Ah LiFeYPO4 Winston : Latronics LS2412 inverter
QuadlogSCADA control and monitoring system : Tasmania, Australia : http://paulalting.com

boB

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3634
Re: YACCM - Yet Another Charge Controller Monitor
« Reply #7 on: August 21, 2021, 11:55:11 PM »

QuadlogSCADA is a cool name, Paul.

And excellent for the results, Chowderhead !


Good stuff !

boB
K7IQ

paul alting

  • Jr. Member
  • **
  • Posts: 66
    • http://paulalting.com
Re: YACCM - Yet Another Charge Controller Monitor
« Reply #8 on: August 22, 2021, 12:22:40 AM »
Thanks Bob,

When I was much younger and starting out in industrial control systems last century I was a trade show for such industry, and was very impress with a brand of industrial controller manufactured by Moore, the Moore APACS Quadlog system.
A link to their legacy system: https://www.classicautomation.com/Parts/moore-quadlog
That name stuck in my thoughts ever since and I thought it had a nice 'something' about it, and so used it.
Also, there was a possibility that the quad part of it would describe four discrete components that made up what I was doing with it.

I like how chowderhead has done their charting, with selection to grab data.

I am almost at a stage where I am looking for like minded people who are interested to contribute to this open source project, and this might be one avenue, here on MidNite.
Need to setup my github better, some learning there yet.

Chowderhead, I think I did something here on MidNite forums some years back with the MagnaSine to decode the data stream. It was one of my first Python works, called MagPy, I think the story starts from here: http://midniteftp.com/forum/index.php?topic=2458.msg24089#msg24089  :)
It would be possible to integrate the code from MagPy into QuadlogSCADA or maybe even your own code.
6 x 200W PV into home-brew 6 stage MOSFET charge controller : Microhydro 220Vac 3 phase IMAG
8 x 400Ah LiFeYPO4 Winston : Latronics LS2412 inverter
QuadlogSCADA control and monitoring system : Tasmania, Australia : http://paulalting.com