node-red-contrib-zigbee2mqtt icon indicating copy to clipboard operation
node-red-contrib-zigbee2mqtt copied to clipboard

"TypeError: Cannot use 'in' operator to search for 'position' in null"

Open RedJohn14 opened this issue 2 years ago • 10 comments

Hello everyone,

I have newest NodeRed with installed node-red-contrib-zigbee2mqtt.

After upgrade to 2.6.4 I can not controll ALL my devices :-(

I tested single lights and groups always:

"TypeError: Cannot use 'in' operator to search for 'position' in null"

I tested command Zigbee2mqtt ON/OFF and TOGGLE.

Please help me :-(

RedJohn14 avatar Jan 30 '23 21:01 RedJohn14

try run this command from .node-red folder npm i [email protected]

Do you have more specific logs, I need file name and line number.

andreypopov avatar Jan 31 '23 04:01 andreypopov

Hello @andreypopov thanks for fast reply! Do you have information / date for release the 2.7.0 version final?

Currently I have nodered in docker and would hate to install packages via "npm -i" :-( Bildschirm­foto 2023-01-31 um 21 29 29

The error is visible if I touch some switch to control lights. I used "out" for this.

RedJohn14 avatar Jan 31 '23 20:01 RedJohn14

I ~~was~~ am running into the same issue. ~~It seems to be fixed in 2.7.0-beta.~~ It behaves very inconistently and I got it to work some times but not other times.

Currently I have nodered in docker and would hate to install packages via "npm -i"

I am also running node-red inside a docker container. As long as your entire /data directory is perstistent using npm i is fine, because node_modules is stored in that directory as well.

Zerrox0 avatar Jan 31 '23 23:01 Zerrox0

Alright, I figured it out:

The issue is in nodes/out.js:105

device.current_values is null. A simple null-check prevents this error from happening. This might be an issue in other places of the code as well, because current_values is never checked for null values.

Zerrox0 avatar Feb 01 '23 00:02 Zerrox0

Alright, I figured it out:

The issue is in nodes/out.js:105

device.current_values is null. A simple null-check prevents this error from happening. This might be an issue in other places of the code as well, because current_values is never checked for null values.

Thank you for the fast reply :-). Do you have information / date for release the 2.7.0 version final? Because it would be nice to have installed "a stable" version via the node red installer.

RedJohn14 avatar Feb 01 '23 14:02 RedJohn14

Thank you for the fast reply :-). Do you have information / date for release the 2.7.0 version final? Because it would be nice to have installed "a stable" version via the node red installer.

Sorry, you must be mistaking me for someone else. I'm not a contributor for this project, just a random person that ran into the same issue and tried to help with the debugging.

Zerrox0 avatar Feb 01 '23 15:02 Zerrox0

It behaves very inconistently and I got it to work some times but not other times.

Oh sorry my mistake ^^ You "solved" the problem by using npm i [email protected] inside the node red container?

@andreypopov Do you have information / date for release the 2.7.0 version final? Because it would be nice to have installed "a stable" version via the node red installer.

RedJohn14 avatar Feb 01 '23 15:02 RedJohn14

Updated, please check

andreypopov avatar Feb 01 '23 16:02 andreypopov

Just checked. Works for me.

Zerrox0 avatar Feb 01 '23 16:02 Zerrox0

Updated, please check

Hi @andreypopov perfect !!! :-)

Works for me too.

Thank you for the quick support

RedJohn14 avatar Feb 01 '23 17:02 RedJohn14