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.
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.
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.
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.
@arendst this is the last question for you, all the rest has been modified and tested.
There was a problem hiding this comment.
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.
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: