Code Monkey home page Code Monkey logo

trannergy2mqtt's Introduction

Trannergy MQTT

MQTT client for Trannergy solar inverter (PVL5400). Written in Python 3.x This program might also work for Ginlong and Omnik inverters. The inverter has to be connected to the LAN network where this script is running.

Includes Home Assistant MQTT Auto Discovery.

Usage:

  • Copy systemd/trannergy-mqtt.service to /etc/systemd/system
  • Adapt path in trannergy-mqtt.service to your install location (default: /opt/iot/trannergy)
  • Copy config.rename.py to config.py and adapt for your configuration (minimal: mqtt ip, username, password)
  • sudo systemctl enable trannergy-mqtt
  • sudo systemctl start trannergy-mqtt

The are 2 clients integrated:

TCP CLIENT

  • Works with a specific set of wifi enabled inverters
  • You need to have the wifi s/n
  • Ability to read values every few seconds

LISTEN Client

(I could not think of a better name)

  • Inverter will broadcast every 5 minutes all parameters
  • You have to configure the inverter; in this example, 192.168.1.48 is my Raspberry Pi configure

Use http://mqtt-explorer.com/ to test & inspect MQTT messages

Requirements

  • paho-mqtt
  • python 3.x

Tested under Linux; there is no reason why it does not work under Windows.

Licence

GPL v3

Versions

1.2.6

  • Exit on Socket Connect error (and systemd will restart)

1.2.5:

  • Exit after maxretries to connect to inverter (and systemd will restart)

1.2.4:

  • Fix exit code (SUCCESS vs FAILURE)

1.2.2:

  • Initial version on github

trannergy2mqtt's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

trannergy2mqtt's Issues

Meedere instanties

Hi Hans,

Dank voor het maken van deze tool. Ik heb een huis gekocht met vier Trannergy inverters. Ik heb de eerst nu aan de praat, en voor de overige drie heb ik drie kopieën van deze tool gemaakt met bijbehorende systemd daemons, en in het betreffende python script heb ik de listen poort uniek gemaakt voor elk.
In MQTT verschijnen de inverters correct, maar de autodiscovery in HA werkt niet lekker, omdat ik dan meerdere sensoren met dezelfde naam dreig te krijgen.

Weet jij een eenvoudige oplossing?

Hartelijk dank,
Patrick

UTF-8 error: trannergy-mqtt.trannergy_tcpclient

Thanks for this component.
I receive the statistics from my Trannergy inverter succesfully.

Unfortunately I received the following error.

trannergy-mqtt.trannergy_tcpclient WARNING: FUNCTION:run LINE:178: Exception 'utf-8' codec can't decode byte 0xe9 in position 14: invalid continuation byte

Any Idea how I can fix this?

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.