question

cterwilliger avatar image
cterwilliger asked

VE.Direct library for Arduino

I created an Arduino library for VE.Direct. It reads all name/value pairs from the connected device and presents a public buffer of those pairs to the application. It is based on the Victron sample code from the FAQ.

https://github.com/cterwilliger/VeDirectFrameHandler

VE.Directarduino
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

2 Answers
biozor avatar image
biozor answered ·

Hi @cterwilliger ! Great lib !

I use it on my ESP01s to read value from my SmartSolar MPPT 75/15 with VE.Direct protocol (text mode).

I noticed that I receive a wrong value for the PID name. The value is always "HSDS" (this is the last name of the text frame (before the checksum). I don't know why ?!?!

Here is my project :
https://community.victronenergy.com/comments/77831/view.html

I added a frameCount (int) variable to your VeDirectFrameHandler class source code.

Great job ! I'm waiting for the HEX mode now :)

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

cterwilliger avatar image cterwilliger commented ·

I saw the same errors after you mentioned it. But only with a MPPT. My BMV-712 worked fine. Anyway, double checked the VE.DIrect-Protocol and the latest version (3.30) says the maximum number of fields sent is 22. The older one (3.27) said 18. I made the change and it works properly now. I will update the github repository. In the meantime, just set "

const byte frameLen = 22;" in VeDirectFrameHandler.h and recompile.

0 Likes 0 ·
biozor avatar image biozor cterwilliger commented ·

Great! That's it... 18 value names was not enough. The MPPT has 22 value names. It works fine now... You uppercased all received char, so I had to modify my GetStringProduct function to case insensitive compare PIDs ('0xA053' <> '0XA053', see the uppercased 'X').

Thanks

0 Likes 0 ·
biozor avatar image
biozor answered ·

esp01s-vedirect.png

Here is the view on a Internet browser connected to the ESP01s embedded web server (from outside in my case). It looks like the bluetooth screen (Android app) when it's connected to SmartSolar MPPT via bluetooth.


esp01s-vedirect.png (24.1 KiB)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources

VE.Direct protocol FAQ

Additional resources still need to be added for this topic