helgeerbe / OpenDTU-OnBattery

Software for ESP32 to talk to Hoymiles Inverters and Victrons MPPT battery chargers (Ve.Direct)
GNU General Public License v2.0
290 stars 62 forks source link

adding POST on web api calls for /api/vedirectlivedata/status and api calls to configure and turn the dynamic power limiter on/off #252

Open Yoeky opened 1 year ago

Yoeky commented 1 year ago

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

helgeerbe commented 1 year ago

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.

schlimmchen commented 5 months ago

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

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.

For non-Victron users, it would be really helpful if there was a way to somehow inject the MPPT charger live data

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?

Yoeky commented 5 months ago

For non-Victron users, it would be really helpful if there was a way to somehow inject the MPPT charger live data

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...

schlimmchen commented 5 months ago

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.