Closed gdotp01 closed 2 years ago
(Accidentally responded before I finished with writing an answer; it turns out shift+return
submits the comment ;) )
Hi, thanks for the report!
What version of this plugin are you using?
Following are a few notes for me to get an overview:
I am guessing that the following characteristic is triggering the warning: https://github.com/datMaffin/homebridge-tesla-powerwall/blob/fe71c940a22e67689822e1f6ec139f22cbef7952/src/accessories/powermeter.js#L80-L83
However, the code looks like it can not return undefined: https://github.com/datMaffin/homebridge-tesla-powerwall/blob/fe71c940a22e67689822e1f6ec139f22cbef7952/src/accessories/powermeter.js#L159-L163
When a recent version is used, it may use _fastGetter; check if undefined is possibly returned from there https://github.com/datMaffin/homebridge-tesla-powerwall/blob/fe71c940a22e67689822e1f6ec139f22cbef7952/src/helper/fast-getter.js.
Characteristic is defined here: https://github.com/datMaffin/homebridge-tesla-powerwall/blob/fe71c940a22e67689822e1f6ec139f22cbef7952/index.js#L493-L505
Message seems to be created by this code: https://github.com/homebridge/HAP-NodeJS/blob/03431b8f93137f4c969888a3d631f52da5b787b6/src/lib/Characteristic.ts#L1966-L1969
Thanks for getting back. I’m on v2.2.0 of the plug-in which is the latest I think.
Hello.Any updates as to what is causing this? The warning is signalled just under every hour in the log file.
I currently do not have a good setup for testing and debugging.
However, I took a second look at my notes. I noticed that it is pretty likely that
actually does contain a bug. The callback takes (error, value)
as arguments. Meaning that the calculation is passed to the error
field, while the value
field will be undefined
.
In the following days, I will try to prepare a version that should fix this issue, which can then be installed for testing purposes.
Great thanks. I can test it if you need
There is now a version uploaded to npm that contains the change that may fix this issue.
Use sudo npm install -g homebridge-tesla-powerwall@3.0.0-Beta
to install it.
Ok I’ll give it a try. Thanks
All seems to be working well.
Ok. Thanks for reporting back 👍
A great plugin, thanks for writing it. I recently updated a few dependencies and I’m now getting an u defined characteristic warning regularly in the homebridge logs.
Homebridge 1.3.8 Node 16.13.1 Non 8.1.2