1
0
mirror of https://github.com/bicnz/tristar-to-telegraf.git synced 2025-05-28 13:20:19 -07:00

Update README.md

This commit is contained in:
bicnz 2017-04-08 13:06:07 +12:00 committed by GitHub
parent 29f781f100
commit aa1bbb76c1

View File

@ -1,16 +1,28 @@
# tristar-to-telegraf
Python script to output data from Morningstar Tristar charge controllers in JSON format for Telegraph/InfluxDB/Grafana stack.
Python script to output data from ethernet enabled Morningstar Tristar charge controllers in JSON format for Telegraph/InfluxDB/Grafana stack.
Tested with Tristar TS-MPPT-60
Modified version of brocktice's tristar script https://github.com/brocktice/tristar-python-modbus
***
**Requirements**
**Usage:** python read_tsmppt.py `<ip address>` `<alias>`
Install Python and pymodbus library
```
apt-get install python python-pip
pip install -U pymodbus
```
***
### Usage
**Usage Example:** python read_tsmppt.py 192.168.1.100 Solar1
python read_tsmppt.py `<ip address>` `<alias>`
**Example:** python read_tsmppt.py 192.168.1.100 Solar1
Output:
`{"Solar1": {"battvoltmin": 26.52099609375, "battamps": 3.5791015625, "powerout": 96.0205078125, "battsense": 0.0, "arrayamps": 1.4111328125, "battwatts": 96.08131349086761, "batttempmin": 25, "state": 5, "arraywatts": 104.6773910522461, "heatsinktemp": 19, "battvolt": 26.8450927734375, "powerin": 104.8095703125, "battvoltmax": 26.9110107421875, "arrayvolt": 74.1796875, "batttempmax": 25, "batttemp": 25}}`
***
### Telegraf.conf
```
@ -25,7 +37,7 @@ Output:
name_suffix = "_SOLAR"
data_format = "json"
```
***
### Grafana Queries
**Voltage** `SELECT mean("SOLAR1_battvolt") FROM "exec_SOLAR" WHERE $timeFilter GROUP BY time($__interval) fill(linear)`