Simple RS485 monitoring of Magnum Energy Inverter/Charger

Started by cpfl, May 01, 2015, 04:15:04 PM

Previous topic - Next topic

cpfl

Having setup my Raspberry Pi to monitor and control my Classic 150 via its ethernet modbus interface, I was very happy with the results. What was missing was the ability to monitor my MS4448PAE Magnum Energy Inverter. Anyone who owns or who has looked at this inverter knows that you can buy an ethernet or a wireless network interface for around $300 and $400 respectively.

Rather than pay out that kind of money and given that the physical interface to the inverter is stock RS485, I decided to try connecting my Pi to the inverter via an RS485-USB adapter. I purchased such a device direct from China on ebay for $1.39. To cut a long story short, I can now monitor both my charge controller and inverter with the Pi.

My software, written in Python, although basic and limited in scope has been working perfectly for the last week. Something worth bearing in mind is that the data stream from the inverter is sent in repeated bursts. The RS485-USB interface cannot detect the start of a burst, so it starts reading at any point in the stream. A certain amount of detective processing is required to work out where the start of the data is located in the stream. Once it has been located, the data can be extracted.

The following link is to the only known Magnum Energy network communications protocol document.

http://static.us-inverters.com/docs/support/

Document named: Magnum-Networking-Communications-Protocol-(2009-10-15).pdf

Since each device residing on the RS485 network is transmitting data, the Pi (or any other connected computing device) can read it. This includes data from the inverter itself, the battery monitor kit (BMK), the auto generator start (AGS), the remote control (RC), advanced remote control (ARC) and the router (RTR).

I have not tried, but it should be possible to spoof the existence of a remote control so, for example, a Pi (or other computing device) could control the inverter.

The advantage of collecting data directly from the inverter, is that a constant internet connection that is a requirement of the Magnum Energy solution, is not required. The data can be collected locally on the Pi and written to a database from which data tables and/or graphs can be produced at any time.

Attached are a couple of examples showing data from the Classic 150 and the MS4448PAE on the same graph. The third image shows the inverter output closely tracking the solar input as the Pi tweaks the AUX2 settings for maximum output to the water heater, but that's another story.

If anyone is interested, I purchased the adapter from the Ebay seller golden.supplier, item number 281345074995. There are most certainly other sellers of similar devices, but I can confirm that in my experience, this one works.
Off-Grid in a 320 sqft tiny home (plus 320 sqft attached workshop) in Texas, USA: Midnite Solar Classic 150, Magnum Energy MS4448PAE, 9 x Kyocera KD240 (2160 watts) + 9 x Kyocera KU265 (2385 watts), 16 x GC2 (400AH 48V), Raspberry Pi (ethernet & RS485 monitoring).

boB

Hey, great stuff, cpfl !

The Magnum protocol uses the dead space between packets to tell when one packet stops and a new one starts.

Just add a time counter that is reset every byte received and when it accrues a few (couple ?) milliseconds
of dead space, reset your packet byte counter to zero and the next byte will be the first of the new packet.

Kind of like modbus does  over RS232/RS485.

This looks pretty cool !

boB
K7IQ 🌛  He/She/Me

cpfl

Thanks boB!

Working on improving the code now.

Chris.
Off-Grid in a 320 sqft tiny home (plus 320 sqft attached workshop) in Texas, USA: Midnite Solar Classic 150, Magnum Energy MS4448PAE, 9 x Kyocera KD240 (2160 watts) + 9 x Kyocera KU265 (2385 watts), 16 x GC2 (400AH 48V), Raspberry Pi (ethernet & RS485 monitoring).

paul alting

#3
Hi Chris,

I would be very interested to learn more of your Python code you use to decode the data stream from the inverter, if you are willing to share?
The reason I ask is that I am wanting to integrate the ability to read this data stream in my Quadlog application.
This application is written in C.

I don't have a Magnum inverter, but I am working with a chap that does, and who has a Cubieboard connected to to the Magnum via a EIA-485 to USB converter.
I have a remote ssh connection into the Cubie and using picocom, a simple command line communications program, I can see the data is coming into the USB port of the Cubie just nicely.

The data is human unreadable as it is 8 bit binary, but I see the reoccurring data pattern, so I know it will just be a matter to decode this.
I'm about to make a start with writing a stand-alone C program to do this work, and should be able to nut it out given some time.
But, if I were able to see how you did it in Python, that would be a tremendous help for me.

EDIT: also, can you tell me exactly which port you plugged the EIA-485 from the USB converter into, was it the RTR or AGS and does it matter or make any difference.
I have a capture file with the binary data and can not find any of the constants that should be present, such as the inverter model number, which should be seen as 0x73.
I don't yet seem to see any recognisable data that is talked about in the Magnum networking document, though I do see reoccurring data blocks in the captured data.

And just to confirm, the port settings are 19200, no parity, 8 data bits, yes ?
Thanks
____
Paul
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

cpfl

Hi Paul,

Attached is my code. It needs cleaning up, but is functional and can be modified to suit your needs.

I am currently using a secondary Pi dedicated to communicating with the inverter, which sends the data back to my primary Pi using HTML. The primary Pi opens the URL to the secondary Pi which executes the python code to collect the data on demand.

A problem that I had when first connecting the RS485 wires to the inverter was that the wires were the wrong way round. As soon as I swapped A and B, the data looked better. It definately sounds like your wires are crossed.

I put a two-way RJ11 splitter on the GREEN inverter port where the BMK is normally connected. Both the BMK and the Pi connectors are plugged into it.

Chris
Off-Grid in a 320 sqft tiny home (plus 320 sqft attached workshop) in Texas, USA: Midnite Solar Classic 150, Magnum Energy MS4448PAE, 9 x Kyocera KD240 (2160 watts) + 9 x Kyocera KU265 (2385 watts), 16 x GC2 (400AH 48V), Raspberry Pi (ethernet & RS485 monitoring).

paul alting

Thank you Chris,
Indeed, the EIA-485 lines needed to be switched over for it to work correctly, not sure why though.
But is does give the correct data, and I have a captured hex file to work with at present.

What I am doing is programming up a small Arduino UNO to act as a Magnum inverter MagNet simulator, together with remote and BMK and AGS data.
This will then be used to test my main C application that will do the decoding.

I have looked over your code and it has provided some useful hints and thoughts for me, knowing that you get reliable data from it.

I have studied the Magnum MagNet protocol document pretty well now and think I have most of it understood in terms of the weirdness of how they do things.
By week's end, I hope to have something that is displaying data from inverter, remote, BMK and AGS units.

It is a stand alone program initially and I'll make it available to those that would like it.
After that, I should be able to modify this program so that it can operate in an Arduino with an EIA-485 converter connected to the mail serial async port.

Thanks again Chris for your assistance, my appreciated.
____
Paul
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

cpfl

Paul,

I would be very interested in your C source code.

Chris.
Off-Grid in a 320 sqft tiny home (plus 320 sqft attached workshop) in Texas, USA: Midnite Solar Classic 150, Magnum Energy MS4448PAE, 9 x Kyocera KD240 (2160 watts) + 9 x Kyocera KU265 (2385 watts), 16 x GC2 (400AH 48V), Raspberry Pi (ethernet & RS485 monitoring).

paul alting

#7
Hi Chris,
Yes, for sure.

I'm wonder if it is best for me to put it up on Github and anybody can copy it from there ?

What I have done so far is to create the Magnum MagNet simulator, which I coded up and have running in a small Arduino UNO.
It simply presents static data in the correct packet sequence with correct packet timing.
It has packets for inverter, remote with all 6 different tail sections, the BMK and AGS and RTR.

Actually, here is the Arduino simulator code  ;D
I code in Eclipse and use tabs for my indentation, so I don't know how nice it will appear below, but it is neat in my IDE.

As you can see, I used actual data as captured by a serial terminal program which has been saved as Hex file.
I worked out all the individual packets and each data parameter.

After the inverter packet there appears to be a terminating byte, typically FF, and is mentioned in the network spec, but not shown in the inverter table.

It's quick code, not a lot to it.

Now that I have this, I can code up and test the next stage, and that is the main C application to receive and decode and then display all this data on a computer.
When I complete this code, I will hope to have it running and tested on Mac OSX and GNU/Linux.
I expect it will also work for Microsoft windows as well.

I have made a start on the code, but it is at its early stage of just grabbing serial data in a non-blocking method and detecting for specified bytes at specified bye positions in the buffer.

Chris, if you have an Arduino to test this on, maybe could you test it with your Python code to see if it work sat this level?
If you don't I can try it later on.

____
Paul


/* ---------------------------------------------------------------------------------------------------------------------------
* Data capture from actual MagNet with MS4448PAE, RTR, AGS and BMK devices:
*
* Inverter 40 00 01 F8 00 04 77 00 01 00 33 17 2E 22 73 01 00 01 02 58 00 FF
* Remote_B+A0+A1 00 05 50 94 64 1E 16 08 00 D5 9B 84 07 19 17 26 14 00 73 00 A0 A1 02 35 FC 00 7D
*
* Inverter 40 00 01 F8 00 04 77 00 01 00 33 17 2E 22 73 01 00 01 02 58 00 FE
* Remote_B+A1+A2 00 05 50 94 64 1E 16 08 00 D5 9B 84 07 19 20 20 90 3C 3C 78 A1 A2 01 00 00 00 00
*
* Inverter 40 00 01 F8 00 04 77 00 01 00 33 17 2E 22 73 01 00 01 02 58 00 FF
* Remote_B+A2+RTR 00 05 50 94 64 1E 16 08 00 D5 9B 84 07 19 00 64 00 3C 0A 3C A2 91 01
*
* Inverter 40 00 01 F8 00 04 77 00 01 00 33 17 2E 22 73 01 00 01 02 58 00 FF
* Remote_B+A3 00 05 50 94 64 1E 16 08 00 D5 9B 84 07 19 50 28 00 20 0A 00 A3
*
* Inverter 40 00 01 F8 00 04 77 00 01 00 33 17 2E 22 73 01 00 01 02 58 00 FE
* Remote_B+A4 00 05 50 94 64 1E 16 08 00 D5 9B 84 07 19 3C 3C 00 00 00 00 A4
*
* Inverter 40 00 01 F8 00 04 77 00 01 00 33 17 2E 22 73 01 00 01 02 58 00 FF
* Remote_B+Z0 00 05 50 94 64 1E 16 08 00 D5 9B 84 07 19 17 26 00 00 00 00 00
*
* Inverter 40 00 01 F8 00 04 77 00 01 00 33 17 2E 22 73 01 00 01 02 58 00 FF
* Remote_B+80+81 00 05 50 94 64 1E 16 08 00 D5 9B 84 07 19 17 26 00 00 28 00 80 81 61 13 AF FF D2 12 4C 18 BB FF E9 FF FF 00 5E 0A 01
* ---------------------------------------------------------------------------------------------------------------------------
*
*
*
* buffer pos   size data description value
* ----------------------------------------------------------------------------------------
* Inverter Packet
*  0 0 8 0x40 Inverter status Invert mode
*  1 1 8 0x00 Inverter fault No fault
*  2 2 h8 0x01 DC Volts 256: (1 * 256 + 248) ÷ 10 = 50.4Vdc
*  3 3 l8 0xF8 DC Volts 248:
*  4 4 h8 0x00 AC Amps (not implemented)
*  5 5 l8 0x04 AC Amps (not implemented)
*  6 6 8 0x78 AC Volts output 120Vac
*  7 7 8 0x00 AC Volts input 0Vac
*  8 8 8 0x01 Inverter LED On
*  9 9 8 0x00 Charger LED Off
*  10 10 8 0x33 Inverter revision 3.3
*  11 11 8 0x17 Battery temp 23ËšC
*  12 12 8 0x2E Transformer temp 46ËšC
*  13 13 8 0x22 FET temp 34ËšC
*  14 14 8 0x73 Inverter model ID MS4448PAE
*  15 15 8 0x01 Stack mode Parallel stack - master
*  16 16 8 0x00 AC Input Amps 0 Amp
*  17 17 8 0x01 AC Output Amps 1 Amp
*  18 18 h8 0x02 AC Hertz 02: (02 * 256 + 88) ÷ 10 = 60
*  19 19 l8 0x58 AC Hertz 88:
*  20 20 8 0x00 No used
*  21 21 8 0xFF End of Packet marker
*
* Remote Packet
*  22 0 8 0x00
*  23 1 8 0x05
*  24 2 8 0x50
*  25 3 8 0x94
*  26 4 8 0x64
*  27 5 8 0x1E
*  28 6 8 0x16
*  29 7 8 0x08
*  30 8 8 0x00
*  31 9 8 0xD5
*  32 10 8 0x9B
*  33 11 8 0x84
*  34 12 8 0x07
*  35 13 8 0x19
*  36 14 8
*  37 15 8
*  38 16 8
*  39 17 8
*  40 18 8
*  41 19 8
*  42 20 8
*  43
*  44
*  45
*  46                this part needs completing to show all packet possibilities
*  47                first number will be buffer position in main C application
*  48
*  49
*  50
*
*/

#include "Arduino.h"
//#define debug

int count = 0;
int buflen = 0;
uint32_t  last_loop = 0; // current value of loop timer:
const uint32_t period_loop = 100; // loop timer preset value, every 100mSec:

// on periodic 100mSec send buffer_inverter as start of data stream:
uint8_t buffer_inverter[] = {0x40, 0x00, 0x01, 0xF8, 0x00, 0x04, 0x78, 0x00, 0x01, 0x00, 0x33, 0x17, 0x2E, 0x22, 0x73, 0x01, 0x00, 0x01, 0x02, 0x58, 0x00, 0xFF};

// after buffer_inverter sent, pause 10mSec, then send buffer_remote_base followed by selected tail buffer:
uint8_t buffer_remote_base[] = {0x00, 0x05, 0x50, 0x94, 0x64, 0x1E, 0x16, 0x08, 0x00, 0xD5, 0x9B, 0x84, 0x07, 0x19};
uint8_t buffer_remote_A0[] = {0x17, 0x26, 0x14, 0x00, 0x73, 0x00, 0xA0}; // add buffer_AGS_A1
uint8_t buffer_remote_A1[] = {0x20, 0x20, 0x90, 0x3C, 0x3C, 0x78, 0xA1}; // add buffer_AGS_A2
uint8_t buffer_remote_A2[] = {0x00, 0x64, 0x00, 0x3C, 0x0A, 0x3C, 0xA2}; // add buffer_RTR
uint8_t buffer_remote_A3[] = {0x50, 0x28, 0x00, 0x20, 0x0A, 0x00, 0xA3};
uint8_t buffer_remote_A4[] = {0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0xA4};
uint8_t buffer_remote_Z0[] = {0x17, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00};
uint8_t buffer_remote_80[] = {0x17, 0x26, 0x00, 0x00, 0x28, 0x00, 0x80}; // add buffer_BMK

uint8_t buffer_BMK[]       = {0x81, 0x61, 0x13, 0xAF, 0xFF, 0xD2, 0x12, 0x4C, 0x18, 0xBB, 0xFF, 0xE9, 0xFF, 0xFF, 0x00, 0x5E, 0x0A, 0x01};
uint8_t buffer_AGS_A1[]    = {0xA1, 0x02, 0x35, 0xFC, 0x00, 0x7D}; // send after buffer_remote_A0
uint8_t buffer_AGS_A2[]    = {0xA2, 0x01, 0x00, 0x00, 0x00, 0x00}; // send after buffer_remote_A1
uint8_t buffer_RTR[]       = {0x91, 0x01}; // send after buffer_remote_A2

void setup() {
Serial.begin(19200, SERIAL_8N1);
}

void loop() {
if (millis() - last_loop >= period_loop)
{
#ifdef debug
Serial.print("\nInverter\t\t");
#endif
buflen = sizeof(buffer_inverter); // send inverter data:
for(int i = 0; i < buflen; i++)
Serial.write(buffer_inverter[i]);

#ifdef debug
Serial.print("\nRemote\t\t");
#endif
delay(10); // delay after inverter data:

buflen = sizeof(buffer_remote_base);
for(int i = 0; i < buflen; i++) // send remote bytes 0 - 13:
Serial.write(buffer_remote_base[i]);

if (count == 0) // packet remote_A0 + AGS_A1:
{
#ifdef debug
Serial.print("\nA0 + A1\t\t");
#endif
buflen = sizeof(buffer_remote_A0);
for(int i = 0; i < buflen; i++)
Serial.write(buffer_remote_A0[i]);

delay(10); // small delay to separate remote data from AGS data:

buflen = sizeof(buffer_AGS_A1);
for(int i = 0; i < buflen; i++)
Serial.write(buffer_AGS_A1[i]);
}

if (count == 1) // packet remote_A1 + AGS_A2:
{
#ifdef debug
Serial.print("\nA1 + A2\t\t");
#endif
buflen = sizeof(buffer_remote_A1);
for(int i = 0; i < buflen; i++)
Serial.write(buffer_remote_A1[i]);

delay(10); // small delay to separate remote data from AGS data:

buflen = sizeof(buffer_AGS_A2);
for(int i = 0; i < buflen; i++)
Serial.write(buffer_AGS_A2[i]);
}

if (count == 2) // packet remote_A2 + RTR:
{
#ifdef debug
Serial.print("\nA2 + RTR\t\t");
#endif
buflen = sizeof(buffer_remote_A2);
for(int i = 0; i < buflen; i++)
Serial.write(buffer_remote_A2[i]);

delay(10); // small delay to separate remote data from RTR data:

buflen = sizeof(buffer_RTR);
for(int i = 0; i < buflen; i++)
Serial.write(buffer_RTR[i]);
delay(8); // dead time of 8mSec as per spec (both 8 and 18 are mentioned):
}

if (count == 3) // packet remote_A3
{
#ifdef debug
Serial.print("\nA3\t\t");
#endif
buflen = sizeof(buffer_remote_A3);
for(int i = 0; i < buflen; i++)
Serial.write(buffer_remote_A3[i]);
}

if (count == 4) // packet remote_A4
{
#ifdef debug
Serial.print("\nA4\t\t");
#endif
buflen = sizeof(buffer_remote_A4);
for(int i = 0; i < buflen; i++)
Serial.write(buffer_remote_A4[i]);
}

if (count == 5) // packet remote_A1 + Z0:
{
#ifdef debug
Serial.print("\nA1 + Z0\t\t");
#endif
buflen = sizeof(buffer_remote_A1);
for(int i = 0; i < buflen; i++)
Serial.write(buffer_remote_A1[i]);

buflen = sizeof(buffer_remote_Z0);
for(int i = 0; i < buflen; i++)
Serial.write(buffer_remote_Z0[i]);
}
if (count == 6) // packet remote_80 + BMK
{
#ifdef debug
Serial.print("\n80 + 81\t\t");
#endif
buflen = sizeof(buffer_remote_80);
for(int i = 0; i < buflen; i++)
Serial.write(buffer_remote_80[i]);

delay(10); // small delay to separate remote data from BMK data:

buflen = sizeof(buffer_BMK);
for(int i = 0; i < buflen; i++)
Serial.write(buffer_BMK[i]);
delay(14); // dead time of 14mSec as per spec:
}

count++;
count = count%7;

last_loop = millis();
}
}

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

cpfl

Paul,

I do have an Arduino Uno but I am out of town right now and won't be back for another week at least.

Looks like you are making excellent progress!

Chris.
Off-Grid in a 320 sqft tiny home (plus 320 sqft attached workshop) in Texas, USA: Midnite Solar Classic 150, Magnum Energy MS4448PAE, 9 x Kyocera KD240 (2160 watts) + 9 x Kyocera KU265 (2385 watts), 16 x GC2 (400AH 48V), Raspberry Pi (ethernet & RS485 monitoring).

paul alting

#9
After some days with head down, fingers burning, I've taken your program Chris and massage it a little, well, ok, a lot :)
It is coming up close to 1000 lines of Python code and should break past that figure very soon before it is complete.

The program, which I have given the name 'MagPy' (a bird we also have in Australia), is designed to decode pretty well everything in the Magnum protocol document.
Earlier today, I ftp'd it up to a Cubieboard II which I am setting up in North America and tested it on a real live MS4448PAE, and to my surprise, it spat out actual data very quickly.
I had to try a few times to make sure the data was actual and changing, yes it was :)

I'm hoping to get it complete in the next day or two, as I've spent the best part of a week on it now I think.
I even tinkered with the built in GUI TKinker, and also Python 3, but have all that on hold for another day.
It's my first Python program, and I quite like the language.

As soon as I finish it, I'll pop it up here and would really appreciate it if you were able to try sometime on your setup.
____
Paul
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

cpfl

Paul,

Excellent! I look forward to testing it on my system.

Chris.
Off-Grid in a 320 sqft tiny home (plus 320 sqft attached workshop) in Texas, USA: Midnite Solar Classic 150, Magnum Energy MS4448PAE, 9 x Kyocera KD240 (2160 watts) + 9 x Kyocera KU265 (2385 watts), 16 x GC2 (400AH 48V), Raspberry Pi (ethernet & RS485 monitoring).

paul alting

#11
Finally I think I have this MagPy program fairly well sorted now.

The setup I tested on was both an Arduino acting as Magnum network simulator and then final tests on a remote system via ssh.
I will continue more testing, to check all data is valid at all ranges.

The code as of right now is attached below.

To install, your system needs, of course Python, which comes with GNU/Linux as well as BSD systems like Mac OSX.
It was developed on Python 2.7.1, and should work on Python 3 as well, though I need to run those checks yet.

You will also need to import the pyserial module, which you can look here to read all about it.
http://pyserial.sourceforge.net/pyserial.html

From there you will read to download it from
http://pypi.python.org/pypi/pyserial

Then to install
python setup.py install


To run MagPy you have a few options.
Running the program without arguments will use a default communications port of "/dev/ttyUSB0'
You can override this with the -p or --port argument, so for example;
cubie@Cubian:~$ python MagPy.py -p /dev/ttyUSB1

or for my Mac, I use
prompt$ python MagPy.py -p /dev/tty.usbmodem621
Notice the period '.'

Microsoft users, I guess you'll nut it out fine :)

Below is a sample from the live system:

cubie@Cubian:~$ python MagPy.py
MagPy Magnum Energy MagnaSine Data Protocol Decoder

Debug level : 0
serial port : /dev/ttyUSB0

Decoding Packets Remote_Base, A2, RTR
Decoding Packets Remote_Base, A3
Decoding Packets Remote_Base, A4
Decoding Packets Remote_Base, Z0
Decoding Packets Remote_Base, BMK80, BMK81
Decoding Packets Remote_Base, A0, A1
Decoding Packets Remote_Base, A1, A2

Live Data
Clock                     08:33
Inverter Mode:            Invert
Fault:                    No Faults

Inverter Input Volts:     55.2 Vdc
Inverter Input Amps:      0 Amps DC

Inverter Output AC Volts: 120 Vac
Inverter Output AC Amps:  0 Amps
External Input AC Volts:  0 Vac
External Input AC Amps:   0 Amps
Inverter Line Frequency   60.0 Hz

Temperature Battery       25 C
Temperature Transformer   42 C
Temperature FETs          35 C
Battery State of Charge:  100 %

Generator Run Time        0.2 Hrs
Generator Last Run        3 Days

Remote - ver(2.2)
Status:                   Remote Command Clear

Router - ver(0.1)

BMK - ver(1.0)
Fault Status:             No Faults
Battery Volts DC:         55.26 Vdc
Amps DC:                  52 Amps
Battery Max:              63.31 Vdc
Battery Min:              46.84 Vdc
Battery Amp Hour Net      1 AmpHr
Battery Amp Hour Trip     6553 AmpHr
Battery Amp Hour Total    9800 AmpHr

AGS - ver(5.3)
Status:                   Ready
Gen Start Mode:           Off
Quiet Hours:              Off
Quiet Time Start  20.0 Hrs
Quiet Time Stop   10.0 Hrs

Auto Start                Disabled
Start Time        8.0 Hrs
Stop Time         8.0 Hrs

Start Delay               60 Sec
Stop Delay                60 Sec
Warm Up Time              60 Sec
Cool Down Time            60 Sec
SOC Start                 0 %
SOC Stop                  100 %
Amps Start                0 Amps
Amps Stop                 10 Amps
Amps Start Delay  60 Sec
Amps Stop Delay   60 Sec

Maximum Run Time          12.0 Hrs
Top Off Time              0 Min
Exercise Day Period       0 Days
Exercise Start Time       8.0 Hrs
Exercise Run Time         1 Hrs
Start Temperature         0 F
Start Volts               46.0 Vdc
Stop Volts                57.6 Vdc

Inverter - ver(5.1)
Inverter Model ID:        0x73
System Buss Voltage:      48 Vdc
Inverter Stack Mode:      Master in Parallel Stack
Search Watts:             5 Watts
Charger Amps:             100 %
Shore AC Amps:            30 Amps
Parallel Threshold:       60 %
AC Volts Trip:            80 Vac

Battery Settings
Battery Size, remote:     800 AmpHr
Battery Size, BMK:        400 AmpHr
Battery Type:             Custom
Battery Efficiency:       0 %
Float Volts:              52.8 Vdc
Absorb Volts:             58.8 Vdc
Equalise Volts:           62.0 Vdc
Battery Low Trip:         42.6 Vdc
cubie@Cubian:~$


Again, many thanks to Chris.
If you find errors, which I'm sure will be found, please let me know so I can fix
____
Paul
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

cpfl

Paul,

It is looking good!!

Can your code cater for systems that have none, or few, of the optional hardware components (AC, ARC, RTR, AGS, BMK)?

Chris.
Off-Grid in a 320 sqft tiny home (plus 320 sqft attached workshop) in Texas, USA: Midnite Solar Classic 150, Magnum Energy MS4448PAE, 9 x Kyocera KD240 (2160 watts) + 9 x Kyocera KU265 (2385 watts), 16 x GC2 (400AH 48V), Raspberry Pi (ethernet & RS485 monitoring).

paul alting

Thank you Chris,

To answer your question, I believe so, because of the way it looks for the individual packets from various devices.
It is something i thought about, but I have no idea what the range of possibilities are for different systems.
I guess some may have the AGS component, though, I'm uncertain of the possible combinations allowed or available.

After some more testing, it appears that there are certain values that are displayed by the actual system that don't actually get put onto the network.
For example, it appears data for AGS SOC start and stop are not the same as being displayed on the actual unit, rather, the data on the network tends to be default values, not actual presets.
There are a few that are like this and we'll be getting onto to Magnum Energy to make contact with them to ask some questions in the next day or so.
____
Paul
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

paul alting

I did have thoughts of putting in an HTTP server in the MagPy code.
Then all the data would be available via HTTP requests.
But if I do, it will need to wait a little while as I need to catch up on helping a few other folks with projects.
One day I'll get around to connecting my new LiFePO4 25.6Volt bank to the inverter and moving off and selling the dead weights :)
____
Paul
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