Code Monkey home page Code Monkey logo

tracermppt's Introduction

tracermppt

This is a Python module for interacting with the Tracer-2210RN solar charge controller via serial. It should also work with other charge controllers that can use the MT-5 remote monitoring accessory.

The RM (remote monitoring) port should be connected to a 3.3V TTL serial port, such as this SparkFun adapter board. It should be wired as follows. Ethernet wire colors correspond to the T-568B standard found on most common patch cables:

Charger pin Ethernet color Function FTDI adapter pin
5 white/blue Transmitted data 5 (RXD)
6 green Received data 4 (TXD)
7 or 8 brown or white/brown Ground 1 (Ground)

Basic usage is as follows:

In [1]: import tracermppt

In [2]: t = tracermppt.Tracer("/dev/ttyUSB2")

In [3]: t.read_realtime()
Out[3]: 
{'battery_full': True,
 'battery_full_voltage': 14.27,
 'battery_overload': False,
 'battery_temperature': 31,
 'battery_voltage': 14.31,
 'charge_current': 0.68,
 'charging': True,
 'load_current': 0.16,
 'load_on': True,
 'load_short': False,
 'over_discharge': False,
 'overdischarge_voltage': 11.15,
 'overload': False,
 'pv_voltage': 16.26}

You can also switch the output on and off:

In [4]: t.set_load_on(False)
Out[4]: {'load_on': False}

In [5]: t.set_load_on(True)
Out[5]: {'load_on': True}

The command for setting the timer parameters is not currently implemented, as my application does not require it.

tracermppt's People

Contributors

bmayton avatar

Stargazers

 avatar Massimiliano Minnella avatar

Watchers

 avatar

tracermppt's Issues

TypeError

Hi Brian, this looks like one of the neatest implementations I've seen. However I'm getting a Type Error on line 118:

TypeError: Can't convert 'bytes' object to str implicitly

which version of Python are you running ? I'm trying 3.4.2

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.