Comments (1)
Code to output a json file:
f = open('solariot.json','w')
f.write(json.dumps(inverter))
f.close()
The use case of Telegraf ingesting the json allows Telegraf to handle external communications, say to InfluxDB. Telegraf should cache the input and is more resilient to network comms failures.
Sample telegraf conf.d file for those interested:
[[outputs.influxdb_v2]]
urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]
token = "SECRET!"
organization = "MyOrg"
bucket = "Your Bucket"
[outputs.influxdb.tagpass]
influxdb_database = ["sungrow"]
[[inputs.exec]]
commands = [
"cat /path/to/solariot.json"
]
interval = "30s"
timeout = "15s"
data_format = "json"
[inputs.exec.tags]
influxdb_database = "sungrow"
The exposed json endpoint can also be used by other services that allow json parsing, such as a Momentum dashboard:
from solariot.
Related Issues (20)
- RPi4 HA Docker - MQTT No sensor/intergration - modbus proxy?
- sungrow-sg5kd Modbus connection failed HOT 2
- Sungrow SG10RT inverter modbus HOT 10
- WiFi vs Ethernet HOT 9
- python 3.9.2 issues? HOT 1
- Not working with InfluxDB 2.0 HOT 2
- Sungrow SG10RT - "unable to decode request" HOT 17
- InfluxDB and Grafana HOT 1
- SG15RT support HOT 2
- Command errored out with exit status 1 HOT 4
- Adding in the custom user to the Dockerfile broke existing permissions HOT 1
- Failed to scrape inverter: sg8kd HOT 1
- InfluxDBClientError: 400: {"error":"unable to parse 'Sungrow,location=XXXXX ': invalid field format HOT 1
- Error loading config.py HOT 2
- How to create a new device from template
- Quick update
- Sungrow SH5K HOT 1
- Solariot + SMA Inverters xx000TL-20
- WARNING:Modbus connection failed WARNING:Failed to scrape inverter, sleeping until next scan HOT 1
- WARNING:root:Failed to scrape inverter, sleeping until next scan HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solariot.