homebridge-rpi icon indicating copy to clipboard operation
homebridge-rpi copied to clipboard

Warning flooding log

Open fab7282 opened this issue 1 year ago • 6 comments

Dear all,

today I updated my system and ... ... now I get this warning every 10 seconds. [homebridge-rpi] This plugin generated a warning from the characteristic 'Load': characteristic was supplied illegal value: number Infinity exceeded maximum of 1.7976931348623157e+308. See https://homebridge.io/w/JtMGR for more info.

I checked if the getstate script or anything else has changed. I installed version 1.4.0 from plugin. Has anyone any clues how what is wrong? thank you for your efforts.

fab7282 avatar Sep 18 '22 12:09 fab7282

Could you please list the output of rpi -H ipaddess -D info?

Did you re-install Homebridge? Could also you please list the output of npm -g list homebridge and of npm -g list hap-nodejs?

ebaauw avatar Sep 18 '22 18:09 ebaauw

Hi, yes of course: rpi -H localhost -D inforpi info: read file /etc/os-release rpi info: read file /proc/cpuinfo rpi info: read file /sys/class/leds/led1/brightness rpi info: exec vcgencmd measure_temp rpi info: exec vcgencmd measure_clock arm rpi info: exec vcgencmd measure_volts rpi info: exec vcgencmd get_throttled { "gpioMask": "0x0FFFFFFC", "gpioMaskSerial": "0x0000C000", "id": "0000000011C620B4", "isRpi": true, "manufacturer": "Sony UK", "memory": "1GB", "model": "3B+", "modelRevision": "1.3", "prettyName": "Raspberry Pi 3B+ 1.3 (1GB)", "powerLed": true, "processor": "BCM2837", "revision": "A020D3", "usbPower": true, "state": { "date": "2022-09-18T18:21:16.000Z", "boot": "2022-09-18T14:51:36.810Z", "powerLed": 255, "load": 0.09, "temp": 49.4, "freq": 1400146000, "volt": 1.3188, "throttled": "0x00000000" } }

npm -g list homebridge /usr/local/lib └── [email protected]

npm -g list hap-nodejs /usr/local/lib ├─┬ [email protected] │ └── [email protected] └─┬ [email protected] └── [email protected]

I hope this helps…

Best regards

fab

fab7282 avatar Sep 18 '22 18:09 fab7282

The output of rpi info looks good. Are you only exposing the local Pi (on which Homebridge runs)?

What does the Homebridge RPi log message setting Load list as the new value?

Hm, the Xiaomi plugin has listed HAP-NodeJS as dependencies. It shouldn’t, but I don’t think that’s related to this issue.

By re-installing Homebridge, it picked up [email protected], which was released 5 days ago, and includes a change in validation, see https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.10.3. Maybe that’s causing an issue; could you install 0.10.2 manually to check that? From the command line, go to /usr/local/lib/node_modules/homebridge and issue sudo npm i [email protected]. Double-check with npm -g list hap-nodejs that the old version was installed.

ebaauw avatar Sep 18 '22 19:09 ebaauw

Ok, re-installed Homebridge on my test system, causing it to upgrade to [email protected] and now seeing the same error. After revering to [email protected], the warnings are gone again.

ebaauw avatar Sep 18 '22 20:09 ebaauw

Changes in v1.4.1 will stop the warning from happening, defining minValue and maxValue properties. Still don't understand what's causing the warning, though.

ebaauw avatar Sep 18 '22 20:09 ebaauw

@ebaauw In 0.10.2 HAP-NodeJS, the rounding algorithm couldn't handle recurring decimals and always assume the minimum value as integer which have no decimal points. However, new 0.10.3 algorithm provides recurring decimal supports, now the minValue is exact -Float.MAX_VALUE which have many decimal points. This is why your previous implementation had problem on newer version.

OrigamiDream avatar Sep 19 '22 07:09 OrigamiDream