VE.Direct Arduino Library
An Arduino library for reading VE.Direct serial text protocol data
Here is a library i wrote for reading VE.Direct text protocol data from victron solar controllers. Supports hardware and software serial devices.
The Collect()
method listens for incoming serial data and returns as soon as the checksum matches. This results in a wait of less than 1 second for data. Now we can call GetValue()
to retrieve the different values we got from the collection.
Currently this is in use in a LoRa sensor connected to a smartsolar controller. It wakes up every 30 minutes, collects a ve.direct block, and transmits the data all in less than 5 seconds, optimizing battery life.
Based on a rewrite of the code found in physee/Victron.Arduino-ESP8266. This code is more fault tollerant and can handle unexpected garbage/start/stop from the uart communication. It is also now in a library form.
Alternatives
Looking for a Python alternative? Check out metrafonic/asyncio-vedirect-mqtt