mirror of
https://github.com/bicnz/tristar-to-telegraf.git
synced 2025-05-28 12:40:20 -07:00
Update README.md
This commit is contained in:
parent
5e9a57eab0
commit
79f7c4c3c4
31
README.md
31
README.md
@ -1,2 +1,33 @@
|
||||
# tristar-to-telegraf
|
||||
Python script to output data from Morningstar Tristar charge controllers in JSON format for Telegraph/InfluxDB/Grafana stack
|
||||
|
||||
**Usage:** python read_tsmppt.py `<ip address>` `<alias>`
|
||||
|
||||
**Usage 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
|
||||
|
||||
```
|
||||
[[inputs.exec]]
|
||||
commands = [
|
||||
"python /home/jigsaw/read_tsmppt.py 192.168.1.100 Solar1",
|
||||
"python /home/jigsaw/read_tsmppt.py 192.168.1.101 Solar2",
|
||||
"python /home/jigsaw/read_tsmppt.py 192.168.1.102 Solar3"
|
||||
]
|
||||
interval = "60s"
|
||||
timeout = "5s"
|
||||
name_suffix = "_SOLAR"
|
||||
data_format = "json"
|
||||
```
|
||||
|
||||
### Grafana Queries
|
||||
|
||||
**Voltage** `SELECT mean("SOLAR1_battvolt") FROM "exec_SOLAR" WHERE $timeFilter GROUP BY time($__interval) fill(linear)`
|
||||
|
||||
**Current** `SELECT mean("SOLAR1_battamps") FROM "exec_SOLAR" WHERE "SOLAR1_battamps" < 100 AND $timeFilter GROUP BY time($__interval) fill(linear)`
|
||||
|
||||
**Batt Temp** `SELECT mean("SOLAR1_batttemp") FROM "exec_SOLAR" WHERE "SOLAR1_batttemp" < 100 AND $timeFilter GROUP BY time($__interval) fill(linear)`
|
||||
|
Loading…
x
Reference in New Issue
Block a user