Giter VIP home page Giter VIP logo

signalk-venus-plugin's Introduction

venus-signalk

This code is a Signal K Node Server plugin. It reads Victron data from a Venus-device, such as the Color Control GX or the Venus GX into Signal K.

Besides using those commercially available devices, it is also possible to run the Venus OS on a RaspberryPi2 or 3, for example.

Supported Victron products:

  • Inverter/Chargers: Multis, Quattros
  • Battery Monitors: any type that is supported by Venus. For example the BMV-700 series, or the Lynx Shunt VE.Can, as well as various integrated Lithium battery systems.
  • Solar Chargers: both the types with a VE.Direct and the types with a VE.Can connection
  • Tank senders: the resistive inputs on the Venus GX, as well as a tank sender connected to Venus over N2K

Instead of taking data from a Venus device over TCP, which is what this plugin is for when you install it, it is also possible to run Signal K server on the Venus device itself. Possibly reducing one less box from the boat. More information here: SignalK/signalk-server#517

Support

Use the #victron channel on the Signal K Slack.

Plugin installation & configuration

Installing is simple: the plugin is available in the signalk app store. Simply click to install.

Then there are two settings. The first is how to connect to the Venus communication bus, called D-Bus. Choose between these two:

A. Connect to localhost B. Connect to a Venus device over tcp

Use option one when signalk-server is installed on to Venus itself. Use option 2 in case that signalk is one device, for example a raspberrypi running Raspbian, which needs to connect to for example a Venus GX or Color Control GX elsewhere on the network.

When using option B, also put in the ipaddress and port.

When using option B, its also necessary to open up the port on the Venus device. It must be configured to allow D-Bus connections via tcp, as its by default not binding its D-Bus daemon to tcp. To make it do so, add these three lines to /etc/dbus-1/system.conf (above the <policy context="default"> section) on the Venus device:

  <listen>tcp:host=0.0.0.0,port=78</listen>
  <auth>ANONYMOUS</auth>
  <allow_anonymous/>

Reboot afterwards. And also remember that any update of the Venus device will override these (and any other) changes to the rootfs. Perhaps someday this can be added to Venus as a real setting instead of a hack. Make sure to only do this on a trusted network.

To make above change, you'll need root access to the Venus device.

Test harness

To see data, without having actual Victron or other Venus compatible hardware setup, get and run below explained Dummy data script. Or, clone dbus-recorder and run play.sh.

Note that using the test harness will cause for some errors during init, as it doesn't support doing a GetValue on the root item (/). See https://github.com/mpvader/venus-signalk/issues/8 for details. For testing, there errors are harmless.

How to develop this plugin outside of Signal K

First run npm install.

Use ./demo.sh to run the code with full debug logging and the produced delta serialised to stdout.

When not tested on an actual Venus device, there will be no output since there is no data coming in. Use a dummy data script to test / develop on a pc:

https://gist.github.com/mpvader/94672c05d68bb6762859ba70240ea887

dbus-listener.py is an example of how similar data would be read in Python. It is not required to use the plugin.

signalk-venus-plugin's People

Contributors

sbender9 avatar mpvader avatar tkurki avatar webmasterkai avatar jepefe avatar

Watchers

 avatar

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.