foxharp / ve.direct

support for the VE.Direct serial protocol supported by many Victron Energy products
Other
20 stars 7 forks source link

Something is wrong: not enough data on a line #1

Open jke5 opened 5 years ago

jke5 commented 5 years ago

Hi, thanks for making this tool. Didnt dive into the script yet to figure out the prob myself. I assume datafields have changed in firmware v1.39. Device is a MPPT75/10, executing script on Ubuntu18.04.

user@pc: /tmp/ve.direct$ sudo ./run_ve.direct Taking input from device /dev/serial/by-id/usb-VictronEnergy_BV_VE_Direct_cable_VE3APONQ-if00-port0... Warning: unknown field name 'MPPT', value '2' Warning: unknown field name 'MPPT', value '2' Warning: unknown field name 'MPPT', value '2' Warning: unknown field name 'MPPT', value '2' Something is wrong: not enough data on a line line is ':4AAAAFD ' 00000000 6c 69 6e 65 20 69 73 20 27 3a 34 41 41 41 41 46 |line is ':4AAAAF| 00000010 44 09 20 27 0a |D. '.| 00000015 Something is wrong: not enough data on a line line is ':4AAAAFD ' 00000000 6c 69 6e 65 20 69 73 20 27 3a 34 41 41 41 41 46 |line is ':4AAAAF| 00000010 44 09 20 27 0a |D. '.| 00000015 Something is wrong: not enough data on a line line is ':4AAAAFD ' 00000000 6c 69 6e 65 20 69 73 20 27 3a 34 41 41 41 41 46 |line is ':4AAAAF| 00000010 44 09 20 27 0a |D. '.| 00000015 Something is wrong: not enough data on a line line is ':4AAAAFD ' 00000000 6c 69 6e 65 20 69 73 20 27 3a 34 41 41 41 41 46 |line is ':4AAAAF| 00000010 44 09 20 27 0a |D. '.| 00000015

foxharp commented 5 years ago

It's been several years since I've looked at this code. I'm not sure I'll be much help debugging on your hardware, but I'll try.

It seems that your device is being put into "hex mode". My script only works with "text mode".

I see from BlueSolar-HEX-protocol-MPPT.pdf that a hex mode response '4' indicates an error, and I see from that document and also from VE.Direct-Protocol.pdf that a payload of AAAA indicates an error.

Also, are you sure the 75/10 is supported? There's a note in the VE.Direct documentation pdf that says:

"The VE.Direct protocol is available in the MPPT 70/15 from firmware version v1.09 and up, and only in newer type MPPT 70/15s: the ones with a product id other than 0x300. The first batches, with PID 0x300, only support fields PID, SER and FW. 2 MPPT 75/15 and 100/15: From firmware version v1.15 onwards, the current reported under “I” is the battery current. Firmware version v1.14 and before report the current measured at the output of the converter, without detailing if this current was going to the battery or the loads."