Hi,
Question: is a MPPT hex answer =1 a confirmation of good data upload?
Long story:
I made a python script that uses BMV Hex Protocol to read battery temperature (0xEDEC) and voltage (0xED8D) from BMV-702 (with a temperature sensor) and sends them to a MPPT (BlueSolar 100/50) using MPPT Hex Prorocol (0x2002 Battery voltage sense and 0x2003 Battery temperature sense). The script runs on Raspberry-Pi 4 (Rasbian Buster), connected to the devices by VE.Direct to USB interface cables.
However, when sending the values to the MPPT (with temperature converted from K to C), the answers I'm receiving are not "Acknowledgements with the new value returned" (as per 1.3 Message examples in MPPT Hex Protocol whitepaper), the answers are basically equal to '1'.
- for :820030002E09F3\n (temp 0x92E or 23.5C) the answer is :820030129\n
- for :82002000260500\n (voltage 0x526 or 13.18V) the answer is :82002012A\n
This 'issue' has been already mentioned by @Epicycler in his question about 0x200A, unfortunately without any answers.
Testing:
I have uploaded three scripts and one spreadsheet (with extension changed to .txt, otherwise there were not accepted as attachments).
- The hex_BMV_to_MPPT.txt script is identifying Victron devices, configuring ports for BMV and MPPT, reading values from the 1st, adding checksums and forwarding them to the 2nd. It can be run as sudo python hex_BMV_to_MPPT.py or with extra parameters -info or -debug for extra verbosity). It's certainly a bit difficult to understand (and still a beta), so I have prepared two simple scripts build from it's parts:
- The find_victron.txt script will identify BMV and MPPT devices and output their ports to the console (run simply as sudo python find_victron.py)
- The hex_test.txt script will send a hex command to a given port and read the answer, e.g. sudo python hex_test.py /dev/ttyUSB0 82002000260500 (command should be without ':' and '\n')
- The checksum of the commands can be checked with this spreadsheet Victron HEX protocol Checksum calc spreadsheet.txt (change .txt to .xlsx)