-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
[Request] HTTP POST endpoints for solar charge controller data and DPL mode #252
Comments
Hi @Yoeky , there is a PR #232 pending, that would enable/disable solar pass through via mqtt. Maybe this would be helpfull for you. At the moment I don't have any plans to implement a remote interface for MPPTs. If someone is going to implement this, I would support the integration. But if the chargers are remote, you could also do the power limiting remote. There are several activities ongoing, implementing this. |
You can disable the DPL using the mode switch (MQTT), see the Wiki. HomeAssistant knows this switch. You can then set a limit on the inverter using MQTT/HomeAssistant.
That would be done in #457 using MQTT. Is there something else that you are asking for which is not covered by the DPL mode switch and the MQTT solar power input? |
I think that should work. I have Renogy MPPTs and get their data in home assistant (using esphome), ideally I could just push those values to opendtu directly from my esphome once the interface exists. although, after thinking about this another few minutes: Ideally I could do this via HTTP (API) directly from my esphome. That would make the whole solution independent from the MQTT broker and more stable in case the home assistant server is down... |
Yeah, I tried setting up my smart switches this way as well, so I would not need a broker. Turns out the user experience is much better with MQTT, as HTTP requires a lot of back and forth, while MQTT is made for such environments and is very lightweight. |
@AndreasBoehm Would you like to keep this open? I tend to close it because I think that such a paradigm shift (POST'ing to OpenDTU-OnBattery suddenly becomes a thing) is not the right choice for OpenDTU in general. |
I agree that we should not add POST endpoints to inject data into OpenDTU. In my opinion we can close this. |
While I agree that it would require to have a separate REST API for ODOB which you would have to support then. I would like to point out that there already are a small set of endpoints upstream, See the official documentation on POST Information here: expand OpenAPI for APL and Power Details
/api/limit/config:
post:
tags:
- Inverter
responses:
"200":
description: "OK"
security:
- BasicAuth: []
/api/limit/status:
get:
tags:
- Inverter
responses:
"200":
description: "OK"
content:
application/json:
schema:
type: object
properties:
inverter-serial:
type: string
properties:
limit_relative:
type: integer
max_power:
type: integer
limit_set_status:
type: string
example:
114173212345:
limit_relative: 100
max_power: 600
limit_set_status: Ok
...
/api/power/config:
post:
tags:
- Inverter
responses:
"200":
description: "OK"
security:
- BasicAuth: []
/api/power/status:
get:
tags:
- Inverter
responses:
"200":
description: "OK"
content:
application/json:
schema:
type: object
properties:
inverter-serial:
type: string
properties:
power_set_status:
type: string
example:
114173212345:
power_set_status: Ok I have documented the REST API upstream using a OpenAPI/Swagger file. There is also a version for ODOB if you want to use it for the ODOB changes to the upstream endpoints. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns. |
Is your feature request related to a problem? Please describe.
For non-Victron users, it would be really helpful if there was a way to somehow inject the MPPT charger live data into
OpenDTU-OnBattery every few seconds in order to be able to use solar passthrough.
I would also love to be able to remotely (via web API) configure and turn the dynamic power inverter on/off, so I could have Home Assistant turn it off and manually set the power limit on the inverter for a few hours for whatever reasons (or change settings from time to time based on the weather forecast)...
Describe the solution you'd like
for the MPPT data: an API call that could easily be made by some esphome or Home Assistant installation would be great. I assume the only relevant values needed would be "V" and "I" as shown by /api/vedirectlivedata/status, so if a new API POST call would allow only to update those two fields, the whole existing logic would "just work" like it does with Victrons. Is that assumption correct?
for the dynamic power limiter, the api call to /api/powerlimiter/status should just be writable
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: