ankohanse / hass-dab-pumps

Home Assistant Custom Integration for DAB Pumps via the DAB Live or DConnect service
MIT License
13 stars 2 forks source link

Some values need to be divided by 10 #3

Closed Djavdeteg closed 10 months ago

Djavdeteg commented 10 months ago

The temperature in integration shows 190 degrees, meanwile on the DConnect site is 19.0 Total Energy and Partial Energy in integration need to be divided by 10 too

CPU load is always 100-99% do not found the real value on the site, may be jus a dummy.

v2023.12.2

ankohanse commented 10 months ago

@Djavdeteg Can easily fix the Total and Partial energy.

Needed a bit of thinking on how to solve the temperature though. In your Esybox.mini data it comes back as "TE_HeatsinkTemperatureC": "208", with a meaning of 20.8 C In my own Esybox data it comes back as "TE_HeatsinkTemperatureC": "22", with a meaning of 22 C

So sometimes need to divide by 10, sometimes not. I've now coded that to depend on the device distro string contains the substring 'mini'. I may need to alter that condition when I get feedback from people with pumps other than ESybox and Esybox.mini

There is a new version v2023.12.3 available for download, please let me know if that resolves the issues with these properties.

Djavdeteg commented 10 months ago

Thank you for your work again!

The Total Energy, Partial Energy and Heatsink temperature are working now. There are some other values would be nice to fix:

Memory free 82,644 MB need to be 82,644 B Ram used 296 192 kB and Ram used max 303 776 kB need to be in Bytes too, I suppose

Last period energy counter (integration) 59 w/o units, Previous month energy consumption (site) 5.9 kWh Last period flow counter (integration) 10112 w/o units, Previous month water consumption (site) 10.112 mc

Anti lock (AE), Anti cycling (AY) and Anti Freeze (AF) in integration and online is working conversely. If Enabled online it shows the Disabled status and vice versa.

Anti Freeze (AF) is showing just numbers 1 or 0 instead of Disabled/Enabled

Anti cycling (AY) has the third state "Smart", integration shows the number 2 instead of string

ankohanse commented 10 months ago

@Djavdeteg Processed all your comments; a new v2023.12.4 is published.

Strange how the units of some values differ per pump type. For instance, MemFree is in bytes for Esybox.mini, but in kB for Esybox. The RamUsed and RamUsedMax are even more different. In kB for the Esybox.mini, but % for the Esybox.

I now also spotted that the installations.json returned by the DAB Pumps DConnect website actually contains information about units, weight and names of enumeration values. For instance:

{
  "name": "RamUsed",
  "groupPos": 450,
  "unit": "%",
  "type": "measure",
  "family": "gear",
  "group": "Debug",
  "view": [
    "R&D"
  ],
  "change": [],
  "log": [
    "R&D"
  ],
  "weight": 0.1
},

Which means that I can get rid of a huge hard coded table in my code and automatically detect units, weights and enumeration strings. And they will be immediately correct for other pump devices!

That one will be for after Xmas though..

P.S. thank you for your kind donation via BuyMeACoffee

Djavdeteg commented 10 months ago

v2023.12.4 is OK The last value I didnt notice earlier is "Actual period energy counter" it is 50 kWh now instead of 5.0 kWh.

Merry Xmas D.

ankohanse commented 10 months ago

Resolved the "Actual period energy counter" with a factor 10. Also adapted "Actual period flow counter" which was in liters while the installations.json indicates to use m3 with a factor of 0.001. That now makes it consistent with the "Last period flow counter"

Will both be in the next version v2023.12.5 (some days after Xmas)