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

Target temp 'NaN' #42

Open
Jorick-tv opened this issue Sep 17, 2022 · 7 comments
Open

Target temp 'NaN' #42

Jorick-tv opened this issue Sep 17, 2022 · 7 comments

Comments

@Jorick-tv
Copy link

Hoi Robert,

I'm repeatedly (every so often) getting the message:

[9/17/2022, 8:49:52 PM] [homebridge-nefit-easy] This plugin generated a warning from the characteristic 'Target Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://homebridge.io/w/JtMGR for more info.

Target temp is set to 16 right now, as it's still fair weather in the Netherlands, but it won't be long.

@robertklep
Copy link
Owner

If you run Homebridge in debugging mode it should log the actual value it's receiving (plus a whole bunch of other stuff). I'm interested to know what exactly gets sent back by the Nefit when it received a NaN (although I realise it might be difficult to "catch" such an occurrence).

@Jorick-tv
Copy link
Author

In debugging mode this is what I get:

[9/20/2022, 8:56:44 PM] [thermostat] Getting current state.. [9/20/2022, 8:56:44 PM] [thermostat] Getting current temperature... [9/20/2022, 8:56:44 PM] [thermostat] Getting target temperature... [9/20/2022, 8:56:44 PM] [thermostat] ...current temperature is 21.6 [9/20/2022, 8:56:44 PM] [thermostat] ...target temperature is 17 [9/20/2022, 8:56:44 PM] [thermostat] ...current state is off

so that seems fine.
This also shows up a lot, bit I don’t think it’s related:
processLeAdvertisingReport: Caught illegal packet (buffer overflow): TypeError: Cannot read properties of undefined (reading 'slice')

hope this helps

@robertklep
Copy link
Owner

Now you'll have to wait until you get a NaN ;)

And yes, the processLeAdvertisingReport warning is unrelated, looks to be an internal Homebridge thing.

@Jorick-tv
Copy link
Author

[9/22/2022, 12:36:08 PM] [thermostat] Getting current state.. [9/22/2022, 12:36:08 PM] [thermostat] Getting current temperature... [9/22/2022, 12:36:08 PM] [thermostat] Getting target temperature... [9/22/2022, 12:36:08 PM] [thermostat] ...current temperature is 23 [9/22/2022, 12:36:08 PM] [thermostat] ...target temperature is 17 [9/22/2022, 12:36:08 PM] [thermostat] ...current state is off [9/22/2022, 12:36:08 PM] [thermostat] Getting current temperature... [9/22/2022, 12:36:08 PM] [thermostat] Getting target temperature... [9/22/2022, 12:36:08 PM] [thermostat] Getting current state.. [9/22/2022, 12:36:09 PM] [thermostat] ...current temperature is NaN [9/22/2022, 12:36:09 PM] [homebridge-nefit-easy] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://homebridge.io/w/JtMGR for more info. [9/22/2022, 12:36:09 PM] [homebridge-nefit-easy] Error: at CurrentTemperature.Characteristic.characteristicWarning (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2142:105) at CurrentTemperature.Characteristic.validateUserInput (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2030:14) at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1617:24 at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:10:18 at /usr/lib/node_modules/homebridge-nefit-easy/index.js:50:12 at tryCatcher (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:729:18) �[90m at Promise._fulfill (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:673:18) at Promise._resolveCallback (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:466:57) at Promise._settlePromiseFromHandler (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:559:17) at Promise._settlePromise (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:729:18) [9/22/2022, 12:36:09 PM] [thermostat] ...target temperature is NaN [9/22/2022, 12:36:09 PM] [homebridge-nefit-easy] This plugin generated a warning from the characteristic 'Target Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://homebridge.io/w/JtMGR for more info. [9/22/2022, 12:36:09 PM] [homebridge-nefit-easy] Error: at TargetTemperature.Characteristic.characteristicWarning (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2142:105) at TargetTemperature.Characteristic.validateUserInput (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2030:14) at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1617:24 at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:10:18 at /usr/lib/node_modules/homebridge-nefit-easy/index.js:50:12 at tryCatcher (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:729:18) at Promise._fulfill (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:673:18) at Promise._resolveCallback (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:466:57) at Promise._settlePromiseFromHandler (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:559:17) at Promise._settlePromise (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/usr/lib/node_modules/homebridge-nefit-easy/node_modules/bluebird/js/release/promise.js:729:18) [9/22/2022, 12:36:09 PM] [thermostat] ...current state is null

@robertklep
Copy link
Owner

[9/22/2022, 12:36:08 PM] [thermostat] Getting current state..
[9/22/2022, 12:36:08 PM] [thermostat] Getting current temperature...
[9/22/2022, 12:36:08 PM] [thermostat] Getting target temperature...
[9/22/2022, 12:36:08 PM] [thermostat] ...current temperature is 23
[9/22/2022, 12:36:08 PM] [thermostat] ...target temperature is 17
[9/22/2022, 12:36:08 PM] [thermostat] ...current state is off
[9/22/2022, 12:36:08 PM] [thermostat] Getting current temperature...
[9/22/2022, 12:36:08 PM] [thermostat] Getting target temperature...
[9/22/2022, 12:36:08 PM] [thermostat] Getting current state..
[9/22/2022, 12:36:09 PM] [thermostat] ...current temperature is NaN
[9/22/2022, 12:36:09 PM] [thermostat] ...target temperature is NaN
[9/22/2022, 12:36:09 PM] [thermostat] ...current state is null

One second it works fine and the next it receives bogus values 🤔

I never used this plugin myself, but it's also unexpected that it makes that many calls in close succession. It may require some sort of throttling, I doubt it's useful to retrieve updates that often.

@Jorick-tv
Copy link
Author

Can you give me some hints on how to do that?

but also; it does read values most of the time, so it’s not a critical error, right?

@robertklep
Copy link
Owner

As long as Homebridge is just complaining about it but everything is looking good on iOS it's not a critical issue, no.

In terms of throttling, that's something I'll have to implement into the code, but since I don't use Homebridge and don't have a Nefit Easy anymore it's going to be difficult 😬

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

No branches or pull requests

2 participants