Giter Site home page Giter Site logo

mppttomqtt's Introduction

MpptToMqtt

Description

This script sends the data from the SRNE SR-MT2410 solar charge controller to an MQTT server. I only tested this with this device, but maybe it also works for other charge controllers. SRNE SR-MT2410

Requirements

Wiring

Pin RJ12 RJ12 function PIN TTL Cable TTL function
1 TX 5 RX
2 RX 4 TX
3 GND 1 GND

Configuration

All configuration values can be found in the MpptToMqttConfig.py:

import logging

serialPort = "/dev/tty.usbserial-FTBBWTC9"
logFileName = "MpptToMqtt.log"
logLevel = logging.ERROR
controllerName = "MpptController01"
mqttServer = "172.17.2.21"
mqttPort = 1883
reportInterval = 15

MQTT topics

Subscribable topics

Topic Description
/controllername/Led Solarpanel led
Bit 8: led on
Bit 8 & Bit 7: blink fast
Bit 8 & Bit 6: blink slow
/controllername/ErrorCode Error code
/controllername/Icons Bit 8: Lamp symbol
Bit 7: Battery led blink slow
Bit 6: Battery led blink fast
/controllername/BatteryVoltage Battery voltage
/controllername/PvVoltage PV voltage
/controllername/ChargeCurrentAmpere Current charge in ampere
/controllername/LoadCurrentAmpere Current load in ampere
/controllername/Temperature Temperature
/controllername/ChargeAmpere Total ampere charged
/controllername/DischargeAmpere Current discharge in ampere

Command topics

Topic Description
/controllername/Command Topic for commands. Only command at the moment is ResetChargeAmpere to reset the total ampere charged.

mppttomqtt's People

Contributors

thenetstriker avatar

Watchers

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