GithubHelp home page GithubHelp logo

synogen / mpp Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 150 KB

MPPSolar Java (Solar Inverter to MQTT for Home Assistant)

Java 99.32% Dockerfile 0.46% Shell 0.22%
hass mppsolar mqtt mqtt-smarthome serial-communication voltronic docker home-assistant java mpp-solar

mpp's Introduction

General

Reads data from a Voltronic/MPPSolar inverter and publishes it to MQTT. Supports Home Assistant MQTT auto discovery. Right now this is still incomplete but the following works:

  • publishing QPIGS, QPIRI, QDOP and QMOD values
  • raw command receiver
  • setting battery trigger capacities via PBCC, PBDC and PSDC
  • setting output and charging source priorities
  • setting maximum charging current

See https://github.com/jblance/mpp-solar/tree/master/docs/protocols for different Voltronic protocols and commands

Tested with a MPPSolar PIP5048GEW, an OrangePi Zero 2W and a CH340 USB to serial adapter from Aliexpress.

Build

  1. mvn clean
  2. mvn package

Docker

(Check docker-build.sh if you want to build & docker build at the same time) Run build first. Then for running on a PI/ARM device:

  1. docker build -t mpp-test-arm --platform linux/arm64 .
  2. docker save mpp-test-arm -o mpp-test-arm.tar
  3. Copy mpp-test-arm.tar file to device
  4. Run docker load -i mpp-test-arm.tar on device
  5. Copy mqtt.properties to device and adapt configuration to your MQTT broker
  6. Copy docker-compose.yml to device and adapt devices section, first port should match your host port
  7. docker-compose up on device in the directory where docker-compose.yml is
  8. You should see the log with something like "Published MQTT discovery configurations for Home Assistant"
  9. If everything is alright quit the application with CTRL+C and run in daemon mode with docker-compose -d to keep it running

Home Assistant

Requirements:

  • Home Assistant MQTT integration installed and connected to a MQTT broker
  • mqtt.properties configured to connect to that same MQTT broker
  • topicPrefix in mqtt.properties set to homeassistant

HA should then automatically pick up the different published entities through its MQTT integration.

TODO

  • implement more commands from inverter protocol manual

mpp's People

Contributors

synogen 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.