ChrisHobson wrote: Hi I am a South African rancher
Hi, Chris, welcome to the forum.
Johnny posted protocols for the PIP and I was wondering how does one go about communicating with the PIP using these protocols and whether anyone had practical experience using the protocols?
Most users would use the WatchPower software to control their inverters. It's a GUI front end for the protocol. You can do most things with the WatchPower that you can by talking to the inverter directly. The necessity for calculating a CRC for each command when communicating directly with the inverter makes the GUI option infinitely easier.
Whatever USB to RS232 converter you use to connect the WatchPower software to your inverter is all you need hardware wise. You just need a terminal emulator program. The one Weber and I use for this and all our serial communications needs is Tera Term
. It's free and has all the features we need. You need to do some editing of the configuration file to allow sending of characters with the high bit set, for some of the CRCs; see the end of this post on the fan upgrade
. Actually, for completeness, I'll repeat it here:
To enable sending of characters with the high bit set (e.g. 0xA8), you need to edit TERATERM.INI in the Tera Term program folder. Change MetaKey=??? to MetaKey=right, and Meta8Bit=??? to Meta8Bit=raw . Restart Tera Term to take effect. Tera Term is a free terminal emulation program, allowing you to talk to an RS232 serial port. You need to select 2400 bps speed: choose Setup/Serial port... and set Baud rate to 2400.
For the CRC calculation, we use this handy page: Online CRC calculation
. Enter the command you want (e.g. QPIGS) into the text box just to the left of the "Calculate CRC" button; leave the Input Type as ASCII. Press the Calculate CRC button, and it produces all 10 CRCs at once. The one you want is labelled "CRC-CCITT (XModem)". For the QPIGS command (Device General Status Parameters Inquiry) the result is B7 A9. Both of these have the high bit set (the first hexadecimal digit is greater than 7). You need to be able to do a little hex arithmetic, and you may need an ASCII table as well. Let's take the first CRC character, B7. B is 11, which is 8+3, so subtracting 0x80 from 0xB7 gives 0x37. Looking up an ASCII table, like this one
, we see that 0x37 is the '7' character. So once the meta key has been set up as above, we can send the character whose binary representation is 0xB7 by using the right-alt key like a shift key and pressing the '7' key. 0xA9 - 0x80 is 0x29, the ')' key. So we can send the QPIGS command as follows:
(on my keyboard, the ')' key is shift-zero; it may be something else on international keyboards).
Phew! That's a lot of work. You can see why most people use the GUI WatchPower program. But the QPIGS command, for example, gives you some information (such as heat sink temperature) that the WatchPower program does not (unless it's hidden somewhere, and I don't use it regularly).
For completeness, the protocol manual is available here: uploads/293/HS_MS_MSX_RS232_Protocol_20 ... pgrade.pdf
. [ Edit: there is a more complete protocol manual available now; see the first post index under Documentation. ]
[ Edit: added the following ]
This gives the following output:
(231.0 50.0 000.0 00.0 0000 0000 000 000 00.00 00 000 0021 0000 000.0 00.00 00000 00000000È
(The above has a copyright symbol for me at the end of the QPIGS command (typed by the user), and an E with a diacritical mark above it after the response. These may vary depending on your browser and language settings. They are the representation of the CRC characters.)
The response is long and unfriendly; it's not designed to be human readable, but machine parseable. The temperature in this output is 0021 (21 Celsius). You need the protocol manual to find out what information is where. Note that the above is from a test machine that doesn't even have a battery or the SCC (Solar Charger) connected, so there are more zeroes than usual. The open round bracket at the start of the response appears at the start of almost all responses; it seems to indicate "start of text". There is no close bracket to go with it.
[ Edit2: Mention set to 2400 bps; sign bit -> high bit; reworded CRC phrasing ]
Nissan Leaf 2012 with new battery May 2019.
5650 W solar, PIP-4048MS inverter, 16 kWh battery.
1.4 kW solar with 1.2 kW Latronics inverter and FIT.
160 W solar, 2.5 kWh 24 V battery for lights.
Patching PIP-4048/5048 inverter-chargers.