-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: feed values from API to inverter? #15
Comments
Thanks!
Sure, a script which uses the requests library to grab a JSON object from an API endpoint should be easy to implement. I recommend you have a look at the already implemented devices to get a feel for what needs to be collected.
I'm afraid not. The inverter only communicates with meters over the RS485 bus. |
Alright awesome! I could write something in go to be able to generate a JSON with those values you have in the other devices.
Damnit! |
It feels like you're overcomplicating things. Given an API you should be able to retrieve its data using a library such as requests. This yields JSON/XML/CSV which should be simple to insert into the dictionary as documented in generic.py. This method should be trivial to adapt to any existing API or device which speaks HTTP and returns JSON/XML/CSV.
I'm currently collecting data from my inverter using solaredge_modbus via Modbus TCP. At the same time I am providing meter values to the inverter over RS485 using this |
There seems to be a Python library for Tibber (on GitHub) but to get realtime consumption, it's needed to have a graphql subscription. I don't know how to integrate that fully.. but you might want to look? There is an API explorer on their developer page, where you can get a demo token and then paste following JSON: subscription {
liveMeasurement(homeId: "cc83e83e-8cbf-4595-9bf7-c3cf192f7d9c") {
timestamp
power
powerProduction
powerFactor
voltagePhase1
voltagePhase2
voltagePhase3
currentL1
currentL2
currentL3
}
} The return looks something like this (and gets updated very frequently): {
"liveMeasurement": {
"timestamp": "2022-01-14T17:19:40.000+01:00",
"power": 2207,
"powerProduction": 0,
"powerFactor": 0.979,
"voltagePhase1": 218,
"voltagePhase2": 221,
"voltagePhase3": 221,
"currentL1": 1.98,
"currentL2": 5.87,
"currentL3": 3.02
}
} Or is there a major lack of values that would need to be provided? 🤔 |
It isn't obvious which values are absolutely required by the inverter to do what it needs to do. The voltage and current will also give you the power values, and I suspect you will need to get the cumulative import and export kWh from somewhere. The Tibber API is heavily focussed on pricing, which makes sense, but light on actual grid and quality data. |
Nice project @nmakel!
I got two questions:
Is it possible to add an "api-device", where you can point to a data source providing measurements similar to the devices you support. And with this I am thinking to parse my providers load-monitor (Tibber Pulse (Swedish page)) and return that data back to this application in a giant JSON file or so. This could of course also be adapted to other providers, if there is some data available, as long as it's correct formatted.
What you think?
Is it possible to both read modbus over tcp from the inverter (to collect metrics) and feed the inverter with information over tcp (add measurements at the mainfuses) at the same time?
Kind regards,
Tobias
The text was updated successfully, but these errors were encountered: