gruijter / com.gruijter.enelogic

GNU General Public License v3.0
3 stars 2 forks source link

Rounding of capabilities (amperage and m³/h) #29

Open murderbeard opened 1 year ago

murderbeard commented 1 year ago

In the capabilities list of a youless device it always 'rounds' the values of m³/h and amperage, same when viewing the items on the insights webpage.

I only ever see full digit steps in amperage. Often being just 0 when not much power is being drawn. (A side note: it doesn't display a minus sign when PV is supplying the net)

As for m³/h it's been stuck at 0 for months, as it never exceeds 1.0. I know from my heater that it does exceed 0.5 on cold days so I assume any digit after the decimal point is omitted, not rounded.

Otherwise, love the app, works great. Thanks for making it!

Cheers, Ralph

murderbeard commented 1 year ago

Hiya,

Been looking into a bit more and debug running the app revealed some stuff.

First off the decimal count of the Amperage makes sense. I've noticed the Youless itself simply shows it as a single digit. I guess you could just divide the wattage by the voltage to get a more accurate number, but in homey automation using wattage is the more reasonable option anyway. So it's just that way by design.

image

The reason for my m3/h not updating seems to be related to 'isValidReading' stating 'gas and power time differ too much'. Which also triggers the watchdog restarting the polling thing every 10 tries. Not sure why it needs to compare the two timestamps (which indeed are way different) so I've just commented out that check and will leave it running for a while to see if something happens.

At each update I also get the following message, though it seems to continue running just fine.

2023-05-18T12:23:28.787Z [err] TypeError: this.animation.updateFrames is not a function at Ledring.change (/app/ledring.js:82:19) at LS120Device.handleNewReadings (/app/drivers/LS120/device.js:411:75) at LS120Device.doPoll (/app/drivers/LS120/device.js:230:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

By the way it's running on HP23 and uses a Youless 120.

Best regards, Ralph

gruijter commented 1 year ago

The LED ring screensaver was removed on HP2023. In the latest app store release I fixed that so it doesnt crash the app.

The validity checks can be simply switched off in the advanced device settings. No need to create your own app version for that😉