Skip to content
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

Feature: support JSON payload in MQTT battery provider #1127

Merged
merged 2 commits into from
Jul 31, 2024

Conversation

schlimmchen
Copy link
Member

this changeset adds support for parsing the MQTT battery provider's SoC and voltage topics' payloads as JSON to extract a numeric value at a configurable path.

closes #897.

this changeset adds support for parsing the MQTT battery provider's SoC
and voltage topics' payloads as JSON to extract a numeric value at a
configurable path.
@schlimmchen schlimmchen force-pushed the mqtt-battery-json-parsing branch from b03039b to 44ffe82 Compare July 23, 2024 20:44
@schlimmchen schlimmchen changed the title Feature: support JSON payload ni MQTT battery provider Feature: support JSON payload in MQTT battery provider Jul 23, 2024
@schlimmchen
Copy link
Member Author

@apss-fuchs @Dani1802 @danny1605 @r06-m @teste123456987 @TvT73 Care to test this? Be aware of #1025. If you are on an ESP32 with 4MB of flash and need OTA, you are out of luck, as this firmware requires an ESP32-S3 (old or new partition scheme) or an ESP32 with a new partition scheme. Please have a look at the firmware build as part of this PR's action.

@vaterlangen
Copy link

vaterlangen commented Jul 30, 2024

@schlimmchen Thanks for that update!
Just tried it out and was able to gather the battery level of my Solarflow battery directly from the Hub's JSON topics. For the battery voltage, I think we will additionally need some kind of scaling, as 49,5V is reported as 4950 (so some kind of divider or unit setting, as for the smartmeter)

Update:
Already implemented this on top of your branch - please refer #1143

@schlimmchen schlimmchen merged commit cb5e7e5 into development Jul 31, 2024
10 checks passed
@schlimmchen schlimmchen deleted the mqtt-battery-json-parsing branch July 31, 2024 13:05
@TvT73
Copy link

TvT73 commented Aug 1, 2024

@apss-fuchs @Dani1802 @danny1605 @r06-m @teste123456987 @TvT73 Care to test this? Be aware of #1025. If you are on an ESP32 with 4MB of flash and need OTA, you are out of luck, as this firmware requires an ESP32-S3 (old or new partition scheme) or an ESP32 with a new partition scheme. Please have a look at the firmware build as part of this PR's action.

@schlimmchen I can´t test yet cause of still using an 4mb ESP Version and my knowledge is not good enough for compiling it by myself.
At the moment my priority is to get rid of the anoying misscalculation of dailies power production, when using an Hoymiles inverter together with an Zendure Hub.

But I will follow it here to see what is possible in the future. It´s great to see whats possible. Good work !

@spcqike
Copy link

spcqike commented Aug 2, 2024

At the moment my priority is to get rid of the anoying misscalculation of dailies power production, when using an Hoymiles inverter together with an Zendure Hub.

even so its offtopic, whats your problem? and, why are you using "daily yield" in the first place?

IMO its way easier to use "total yield" all along and let your monitoring software calculate, what you want to see.
daily yield? value_now - value_midnight. weekly yield? value_now - value_monday_00.00. no need for crazy calculation, adding up of values, hassle around with resetting "daily" values etc.

if that's your case and as the problem with resetting daily values comes quite often: @schlimmchen, do you think it would be possible (or even a good idea in general?) to change the "daily yield" value? afaik right now its a response from the inverter itself, which will reset to 0, if the inverter looses DC power. there are quite a few options that try to correct these resets. wouldn't it be easier to also use totalyield DTU internal and just calculate totalyield_now - totalyield_midnight?

Copy link

github-actions bot commented Sep 2, 2024

This pull request 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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Request] MQTT battery provider JSON parsing (Zendure SolarFlow hub support)
4 participants