In the case of the script is started without any dummy hardware in Domoticz, this ons crash with
TypeError: Cannot read property 'filter' of undefined
at Request._callback (/mnt/mmcblk0p3/plugins/Meross2Domoticz/meross2domoticz.js:73:40)
at Request.self.callback (/mnt/mmcblk0p3/plugins/Meross2Domoticz/node_modules/request/request.js:185:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/mnt/mmcblk0p3/plugins/Meross2Domoticz/node_modules/request/request.js:1154:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/mnt/mmcblk0p3/plugins/Meross2Domoticz/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
In the case of the script is started without any dummy hardware in Domoticz, this ons crash with
At line 73 there is a control doing too late :
Fixed code :