-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Added support for Wooliis LCD Coulometer/Battery Monitor #21732
Conversation
Awesome, thanks |
And sorry for the confusion on the versions I reported in the checklist, they are Tasmota versions not "Tasmota core" ones. Anyway, I started using this code from v13.3 and now adjusted it to match the updates in v14.1. |
dtostrfd(Wooliis.energy_out, 1, float_str); | ||
ResponseAppend_P(PSTR("\"%s\":%s"), D_ENERGY, float_str); | ||
dtostrfd(Wooliis.energy_in, 1, float_str); | ||
ResponseAppend_P(PSTR("\"%s\":%s,"), D_ENERGY "_returned", float_str); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not make composite fieldnames. To keep using already known names and keeping code as small as possible I would suggest to use D_JSON_EXPORT
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, so for energy going into the battery I will use _IMPORT and for energy supplied by the battery I will use _EXPORT. Does that make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding these items, I could easily use the D_JSON_ ones, but the D_ ones are missing. E.g.
#define D_IMPORT "Import"
#define D_EXPORT "Export"
Should I add them to my sensor code or to the language files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arendst this is the last question for you, all the rest has been modified and tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh well, so if yes means sensor code, it's done, here are the definitions:
#define D_IMPORT "Import"
#define D_EXPORT "Export"
#define D_JSON_CAPACITY "Capacity"
#define D_JSON_CHARGING "Charging"
If that was the wrong interpretation, I will change it.
Anything else to be modified?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've done enough to make it work.
I'll merge this and will change some duplicates to lower the codebase.
Thx.
Description:
This commit adds the capability to gather data from Wooliis/Drok/AiLi battery monitors. They look like this:
These devices are quite useful to monitor offgrid systems with a battery.
The integration requires only one communication pin, to receive serial data from the metering device.
Binary data is decoded and mapped to the following properties (Web UI):
Checklist: