andreypopov / node-red-contrib-zigbee2mqtt

Zigbee2mqtt connectivity nodes for node-red
GNU General Public License v3.0
92 stars 24 forks source link

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

Open RedJohn14 opened 1 year ago

RedJohn14 commented 1 year ago

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 :-(

andreypopov commented 1 year ago

try run this command from .node-red folder npm i node-red-contrib-zigbee2mqtt@2.7.0-beta

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

RedJohn14 commented 1 year ago

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.

Zerrox0 commented 1 year ago

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 commented 1 year ago

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.

RedJohn14 commented 1 year ago

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.

Zerrox0 commented 1 year ago

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.

RedJohn14 commented 1 year ago

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 node-red-contrib-zigbee2mqtt@2.7.0-beta 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.

andreypopov commented 1 year ago

Updated, please check

Zerrox0 commented 1 year ago

Just checked. Works for me.

RedJohn14 commented 1 year ago

Updated, please check

Hi @andreypopov perfect !!! :-)

Works for me too.

Thank you for the quick support