bwp91 / homebridge-ewelink

Homebridge plugin to integrate eWeLink devices into HomeKit.
MIT License
384 stars 126 forks source link

Dual R3 errors in homebridge #503

Closed rafht closed 11 months ago

rafht commented 1 year ago

I'm using Sonoff Dual R3 in the motor mode for the Garage door I'm just getting this error message in the log every time

Setup: Raspberry Pi 4 B v1.5, Homebridge 1.6.1, node.JS [18.16.1] homebridge-ewelink version - 10.4.0

Config: "multiDevices": [ { "label": "Garage", "deviceId": "1001d8eaeb", "deviceModel": "dualr3_motor", "showAsMotor": "garage", "overrideLogging": "default" }

[02/07/2023, 18:58:53] [eWeLink] [Garage] receiving update {"current_00":0,"voltage_00":21131,"actPow_00":0,"online":true,"updateSource":"WS"}. [02/07/2023, 18:58:53] [eWeLink] [Garage] device update failed as Cannot read properties of undefined (reading 'value') at default.externalUpdate (file:///var/lib/homebridge/node_modules/homebridge-ewelink/lib/device/motor.js:284:28).

bwp91 commented 1 year ago

Hi @rafht

Could you update to the beta version of the plugin to see if you still get this message in the logs?

https://github.com/bwp91/homebridge-ewelink/wiki/Beta-Version

Ideally you will no longer see this in the logs!

rafht commented 1 year ago

same with the beta version: [04/07/2023, 20:44:49] [eWeLink] [Garage] receiving update {"current_00":0,"voltage_00":20915,"actPow_00":0,"online":true,"updateSource":"WS"}. [04/07/2023, 20:44:49] [eWeLink] [Garage] device update failed as Cannot read properties of undefined (reading 'value') at default.externalUpdate (file:///var/lib/homebridge/node_modules/homebridge-ewelink/lib/device/motor.js:284:28).

image image
rafht commented 11 months ago

Can you take a look, please? @bwp91 Thanks in advance

bwp91 commented 11 months ago

@rafht your latest logs still show that the error is happening on line 284 of the file, which means that the beta version has not installed properly.

Please make sure that you have installed the beta version using the link I provided above and restart homebridge, and let me know if you still have the issue

rafht commented 11 months ago
image image
rafht commented 11 months ago

It's on beta @bwp91

rafht commented 11 months ago
image
bwp91 commented 11 months ago

thanks for confirming @rafht

can you try the newest beta?

rafht commented 11 months ago

Now it's like this @bwp91

image
bwp91 commented 11 months ago

Hi @rafht

Please try new beta 10.4.1-beta.12

Sorry this may be a bit of trial and error since I don't own this device

rafht commented 11 months ago

Hi @bwp91 I found what was the problem, I added my username and password of ewelink to the plugin and also by mistake added the device ID in multi-channel devices. I cleared added devices and now that error message is gone, but the Garage door is now replaced with a curtain 😆 (I mean R3 motor mode by default from ewelink showing as a curtain)

bwp91 commented 11 months ago

You probably had it correct in the first place, but please still update to the new beta version.

Multi channel device config is correct for this device, you can add a config like this:

Screenshot 2023-07-14 at 19 51 54

and choose garage door

rafht commented 11 months ago

Now it works correctly, thank you very much! On the latest beta, everything is ok

bwp91 commented 11 months ago

awesome good to hear it’s working!