treban / pimatic-raspbee

This plugin provides a raspbee interface for pimatic.
GNU General Public License v2.0
5 stars 5 forks source link

Error with Xiaomi Smart Plugs #49

Open fennsen64 opened 4 years ago

fennsen64 commented 4 years ago

I've tested two of the new Smart Plugs (lumi.plug.mmeu01) with the plugin. If I switch them I get serios errors in pimatic:

error [pimatic]: An uncaught exception occurred: TypeError: Cannot read property 'on' of undefined at RaspBeeSwitch.parseEvent (/usr/local/pimatic-app/node_modules/pimatic-raspbee/raspbee.coffee:934:29) at RaspBeePlugin.<anonymous> (/usr/local/pimatic-app/node_modules/pimatic-raspbee/raspbee.coffee:918:12) at RaspBeePlugin.emit (events.js:203:15) at RaspBeeConnection.<anonymous> (/usr/local/pimatic-app/node_modules/pimatic-raspbee/raspbee.coffee:252:10) at RaspBeeConnection.emit (events.js:198:13) at WebSocket.<anonymous> (/usr/local/pimatic-app/node_modules/pimatic-raspbee/raspbee-connector.coffee:65:14) at WebSocket.emit (events.js:198:13) at Receiver.receiverOnMessage (/usr/local/pimatic-app/node_modules/pimatic-raspbee/node_modules/ws/lib/websocket.js:720:20) at Receiver.emit (events.js:198:13) at Receiver.dataMessage (/usr/local/pimatic-app/node_modules/pimatic-raspbee/node_modules/ws/lib/receiver.js:414:14) at Receiver.getData (/usr/local/pimatic-app/node_modules/pimatic-raspbee/node_modules/ws/lib/receiver.js:346:17) at Receiver.startLoop (/usr/local/pimatic-app/node_modules/pimatic-raspbee/node_modules/ws/lib/receiver.js:133:22) at Receiver._write (/usr/local/pimatic-app/node_modules/pimatic-raspbee/node_modules/ws/lib/receiver.js:69:10) at doWrite (_stream_writable.js:415:12) at writeOrBuffer (_stream_writable.js:399:5) at Receiver.Writable.write (_stream_writable.js:299:11) at Socket.socketOnData (/usr/local/pimatic-app/node_modules/pimatic-raspbee/node_modules/ws/lib/websocket.js:795:35) at Socket.emit (events.js:198:13) at Socket.emit (/usr/local/pimatic-app/node_modules/pimatic/startup.coffee:64:24) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11) at Socket.Readable.push (_stream_readable.js:224:10) at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) This is most probably a bug in pimatic or in a module, please report it!

I've tested different things, but nothing works. This error occurs if I switch via pimatic or via the deconz GUI/phoscon app. The device is included via automated discovery and it has the correct IDs (so in general it works. The additional Power Sensor in this switch is working flawless in pimatic) Also there is created a 'Presence' circle in the GUI which never changes to 'full' / present.

the same happens with a Osram Smart + Switch. So I guess that the main 'on/off' attribute from these zigbee devices isn't working.

All releases are on the last version (pimatic and plugins). The deconz II adapter / deconz has also the latest release (2.05.78) tested on two different pimatic installations: same behavior.

Something seems to be missing in the RaspbeeSwitch device schema. I also tried the RasbeeSwitchSensor but this didn't work at all.