question

Trevin Corkery avatar image
Trevin Corkery asked

Suggestion for the VE.Direct protocol - Batching

I've been working with the VE.Direct protocol for a little bit and I really like how it works and was actually hoping I could propose something I felt that is missing.

The whole idea is bulk/batch set/get commands. It would be super convenient to request multiple registers at once instead of pulling them individually.

I've been trying to do it batch style by sending multiple VE.Direct commands at once but usually anything more than 4-5 the Victron device will actually be missing a response for one or more responses.

Example:

If i were to send

:154\n:154\n:154\n:154\n:154\n 

(You shouldn't do this as it has no real purpose obviously)

Response might be something like this:

:51641F9\n
:51641F9\n  
:51641F9\n 
^--- missing 2 more responses

Anyways, I've noticed there are plenty of reserved requests so perhaps make it something like this as the request

<frame start> <bulk request> <register count> <register1> <register2> <...> <flags> <checksum> <frame end> :902BCEDBBED00FC\n

The example above shows asking for two registers 0xEDBB and 0xEDBC. The response should give either the registers back in the same order. The requested data should be in the same order as the requested registers.

<frame start> <bulk request> <register count> <register1> <register2> <...> <flags> <data1> <data2> <...> <checksum> <frame end>

To continue on the previous example because we asked for 0xEDBB first the response should be in the first data buffer (data1).

VE.Direct
2 |3000

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

0 Answers

Related Resources