GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - metrafonic/arduino-vedirect: Arduino library for reading ve.direct text protocol messages

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
README.md
README.md
 
 

Repository files navigation

Arduino-vedirect

Arduino library for reading ve.direct text protocol messages. Supports hardware and software serial

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

Example usage

We connect to the smartsolar device via Serial1 and print the values as soon as they are collected.

#include "VEDirect.h"

VEDirect vedirect(Serial1);

void setup()
{
  Serial1.begin(19200);
}

void loop(){
  while (!vedirect.Collect()){
    Serial.println("Getting victron data timed out");
  }
  float batteryVoltage = atof(vedirect.GetValue(3));
  vedirect.PrintValues();
}

About

Arduino library for reading ve.direct text protocol messages

Topics

arduinoarduino-librarysmartsolarvedirectvictron

Resources

Readme
Activity

Stars

6 stars

Watchers

2 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.