Code Monkey home page Code Monkey logo

ve.direct-python's Introduction

VE.Direct Python

Python 3 parser for Victron VE.Direct protocol.

This project is designed to run on raspberry pi connected to the VE.Direct port of an MPPT device and then post the data to an influx DB instance.

Raspberry pi serial port is GPIO 14 + 15 and is available at /dev/ttyAMA0.

Installation

  • Clone this repository on your raspberry-pi to /home/pi/ve.direct-pyton
  • Copy .env.example to .env.installed
  • Configure INFLUX_HOST and INFLUX_DB in .env.installed
  • Run the setup.sh.
cp .env.example .env.installed
./install.sh

Detailed install commands

sudo cp ./lib/systemd/system/vedirect.service /lib/systemd/system/
sudo chmod 644 /lib/systemd/system/vedirect.service

sudo systemctl daemon-reload
sudo systemctl enable vedirect.service
sudo systemctl start vedirect.service

sudo reboot

Running the parser directly

/usr/bin/python3 -u -m vedirect --influx=pi.hole --database=solar --port=/dev/ttyAMA0

Example InfluxDB Measurement

[
    {
      "time": "2019-10-27T01:48:32.729954+00:00", 
      "tags": {
        "sensor": "victron", 
        "location": "outdoors"
      },
      "fields": {"IL": 600, "PPV": 9, "V": 25.7, "I": -270, "VPV": 33.55}, 
      "measurement": "power"
    }, 
    {
      "time": "2019-10-27T01:48:32.729954+00:00", 
      "tags": {
        "sensor": "victron", 
        "location": "outdoors"
      }, 
      "fields": {
        "H21": 25, "H20": 0.07
      }, 
      "measurement": "today"
    },
    {
        "time": "2019-10-27T01:48:32.729954+00:00", 
        "tags": {
          "sensor": "victron",
          "location": "outdoors"
        }, 
        "fields": {
            "MPPT": 2, 
            "CS": 3, 
            "LOAD": 1, 
            "ERR": 0
        }, 
        "measurement": "status"
  }
]

References

VE.Direct

Victron Manuals/VE.Direct-Protocol-3.27.pdf

VE.Direct parser inspired by https://github.com/karioja/vedirect/blob/master/vedirect.py

vcgencmd

Systemd

Python

ve.direct-python's People

Contributors

jessedc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ve.direct-python's Issues

install and configure requirements

Hi
looks like a very exiting project.

tried to get this setup but do not know how to configure.

influx user and password.
influx special port
mqtt user and password

any hints?

Thanks t

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.