Supergiovane / node-red-contrib-knx-ultimate

Control your KNX intallation via Node-Red! A bunch of KNX nodes, with integrated Philips HUE control and ETS group address importer.
https://youtu.be/egRbR_KwP9I
MIT License
154 stars 34 forks source link

Errors in 2.2.27 at Startup #291

Closed RobertHerter closed 1 year ago

RobertHerter commented 1 year ago

Hello,

found some new Errors at startups of HueLights:

Nov 13 07:24:18 HomePi4 Node-RED[158780]: 13 Nov 07:24:18 - [error] knxUltimateHueLight: node.handleSendHUE = (_event): Cannot read properties of undefined (reading 'mirek') Nov 13 07:24:18 HomePi4 Node-RED[158780]: 13 Nov 07:24:18 - [error] knxUltimateHueLight: node.handleSendHUE = (_event): Cannot read properties of undefined (reading 'mirek') Nov 13 07:24:18 HomePi4 Node-RED[158780]: 13 Nov 07:24:18 - [error] knxUltimateHueLight: node.handleSendHUE = (_event): Cannot read properties of undefined (reading 'mirek') Nov 13 07:24:18 HomePi4 Node-RED[158780]: 13 Nov 07:24:18 - [error] knxUltimateHueLight: node.handleSendHUE = (_event): Cannot read properties of undefined (reading 'mirek') Nov 13 07:24:18 HomePi4 Node-RED[158780]: 13 Nov 07:24:18 - [error] knxUltimateHueLight: node.handleSendHUE = (_event): Cannot read properties of undefined (reading 'mirek') Nov 13 07:24:18 HomePi4 Node-RED[158780]: 13 Nov 07:24:18 - [error] knxUltimateHueLight: node.handleSendHUE = (_event): Cannot read properties of undefined (reading 'mirek') Nov 13 07:24:18 HomePi4 Node-RED[158780]: 13 Nov 07:24:18 - [error] knxUltimateHueLight: node.handleSendHUE = (_event): Cannot read properties of undefined (reading 'mirek')

Looks to me that this Error only rises on Lightgroups with only Non-Color Lights.

Supergiovane commented 1 year ago

Hi Yes. Group of light in the HUE API V2, exposes full properties, as if it was a hue color light. For mixed groups (color light + simple light) or for group with only brightness capable lights, it's challenging not to raise errors for undefined properties. Other than that, the properties non always are undefined. They could have a value, but this value is empty. The API V2 are still under development, so i guess Philips addresses all these issues soon. Thank you for point me this out, i'm still working on a way to reduce the error rate.