Skip to content

Communicate with VE.Direct compatible devices and get current measurement values.

License

Notifications You must be signed in to change notification settings

logreposit/ve-direct-reader-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ve-direct-reader-service

branch CI build test coverage
master CircleCI codecov.io
develop CircleCI codecov.io

Service Description

The ve-direct-reader-service reads measurement and fault data from Victron Energy VE.Direct devices and pushes it to the Logreposit API.

The implementation has been tested with a BMV-700 battery monitor and a SmartSolar MPPT 100/50 solar charge controller along with a VE.Direct to USB cable.

It also has been tested and works nicely with Victron Energy devices with a TTL (serial) interface such as the BMV600S and the Victron Energy Blue Smart IP22 Charger. Just be sure to only connect the three pins TX, RX and GND when connecting a USB-to-TTL Adapter to those devices.

All Victron Energy devices which speak the VE.Direct port should be supported.

All measurement values described in the official VE.Direct text protocol documentation, as of beginning of about December 2021, have been implemented and can be found here.

The ve-direct-reader-service is a Spring Boot project and the library com.fazecast.jSerialComm is in use for the serial communication.

Configuration

This service ships as a docker image and has to be configured via environment variables.

Environment Variable Name default value
VEDIRECT_COMPORT /dev/ttyUSB0
LOGREPOSIT_APIBASEURL https://api.logreposit.com
LOGREPOSIT_DEVICETOKEN INVALID needs to be changed!
LOGREPOSIT_INCLUDELEGACYFIELDS false set to true to enable backwards-compatibility to bmv-reader-service
LOGREPOSIT_IGNOREDFIELDS empty comma separated list of logreposit field names to ignore / not report at all. The names are referring to the logrepositName of the VeDirectField in the file which can be found here.
LOGREPOSIT_MINIMUMUPDATEINTERVALINMILLIS 10000 minimum update interval in milliseconds, set to 0 to push on every VE.Direct Text update.
LOGREPOSIT_ADDRESS 1 set to some other value if you have multiple devices

Docker

The latest images can be found on Dockerhub.

Place the following docker-compose.yml file in a new folder, then run docker-compose up -d.

version: '2.4'

services:
  ve-direct-reader-service:
    container_name: logreposit-ve-direct-reader-service
    image: logreposit/ve-direct-reader-service:<VERSION>
    restart: always
    devices:
      - "/dev/ttyUSB0:/dev/ttyUSB0"
    environment:
      LOGREPOSIT_DEVICETOKEN: your-logreposit-device-token
      # uncomment the next line in order to prevent publishing rather static fields
      #LOGREPOSIT_IGNOREDFIELDS: "bmv_model,firmware_version_16,firmware_version_24,product_id,serial_number,bluetooth_cap"

About

Communicate with VE.Direct compatible devices and get current measurement values.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages