Skip to content
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

v0.10.3 breaks FLOAT characteristic with minStep of 0.01 #971

Closed
ebaauw opened this issue Sep 18, 2022 · 2 comments
Closed

v0.10.3 breaks FLOAT characteristic with minStep of 0.01 #971

ebaauw opened this issue Sep 18, 2022 · 2 comments
Labels

Comments

@ebaauw
Copy link
Contributor

ebaauw commented Sep 18, 2022

Analysis

See ebaauw/homebridge-rpi#143. I'm getting:

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.

When setting Load to a valid value, like 0.12, 0.2, or 0.07.

The characteristic is defined with type FLOAT and minStep 0.01. No maxValue nor minValue. I don't recognise Infinity, nor the maximum value mentioned in the warning.

After manually reverting to v0.10.2, the warning is gone.

Expected Behavior

Accept valid values, as v0.10.2.

Steps To Reproduce

Re-install Homebridge, so it installs hap-nodejs@0.10.3. Run Homebridge RPi.

Logs

[9/18/2022, 10:15:00 PM] [RPi] pi10: set Frequency from 800MHz to 700MHz
[9/18/2022, 10:15:00 PM] [RPi] pi10: set Load from 0.12 to 0.09
[9/18/2022, 10:15:00 PM] [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.
[9/18/2022, 10:15:00 PM] [homebridge-rpi] Error: 
    at Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2138:105)
    at Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2054:14)
    at Characteristic.updateValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1457:20)
    at CharacteristicDelegate.set value [as value] (/Users/ebaauw/GitHub/homebridge-rpi/node_modules/homebridge-lib/lib/CharacteristicDelegate.js:317:28)
    at Object.set (/Users/ebaauw/GitHub/homebridge-rpi/node_modules/homebridge-lib/lib/ServiceDelegate/index.js:256:50)
    at RpiService.checkState (/Users/ebaauw/GitHub/homebridge-rpi/lib/RpiService.js:111:22)
    at RpiAccessory.heartbeat (/Users/ebaauw/GitHub/homebridge-rpi/lib/RpiAccessory.js:306:25)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at RpiAccessory.<anonymous> (/Users/ebaauw/GitHub/homebridge-rpi/lib/RpiAccessory.js:231:11)

Configuration

n/a

Environment

  • OS: macOS Monterey 12.6.0 (21G115)
  • Software: Homebridge v1.5.0 (HAP v0.10.3)
  • Node: v16.17.0
  • npm: 8.19.2

Process Supervisor

not applicable

Additional Context

No response

@ebaauw ebaauw added the bug label Sep 18, 2022
@ebaauw
Copy link
Contributor Author

ebaauw commented Sep 18, 2022

The warnings are also gone after defining minValue and maxValue properties.

@ebaauw
Copy link
Contributor Author

ebaauw commented Sep 19, 2022

Thanks, folks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant