homebridge-plugins / homebridge-ewelink

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

NS-Panel switch power state sync #363

Closed ihinaie closed 1 year ago

ihinaie commented 2 years ago

Im having issue with NS-Panel Home App sync. If I use the physical button on the panel or the Ewelink app to switch on/off the light, the power statues is not reflected on the Home App. Using the Home App the switch works without issues. Note that this issue is only with the right button while the left button works and sync correctly to the home app. I noticed that left and right button are some how related when it comes to reporting state. So when the left button is on the right button reports the "on" state correctly to the home app. However when the left button is off no power statues change in the home app.

stale[bot] commented 2 years ago

This issue has been automatically marked as inactive because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically closed.

ondrejkrivan commented 2 years ago

Hi, i am facing the same problem. I wanted to use HW buttons as trigger for some actions, but in current state it is not usable.

bwp91 commented 2 years ago

Hi @ihinaie

apologies it's taken a while to look at this. is this something that is still an issue for you?

ondrejkrivan commented 2 years ago

Hi, I am using work around. My use case is to control shutters in each room through buttons on NS panel. Now I am able to do that. But I have to set button to default state after every action with shortchut. So for me it is OK.

bwp91 commented 2 years ago

@ondrejkrivan id rather get this fixed is possible!

Are you able to use the plugin settings to turn on debug mode, restart, then press the right hand button on the nspanel and show me the logs that appear in the homebridge log?

ondrejkrivan commented 2 years ago

I tried. Now it seems OK for me.

[25/07/2022, 11:11:38] [eWeLink] [NSPanel2] receiving update {"switches":[{"switch":"off","outlet":0},{"switch":"on","outlet":1}],"online":true,"updateSource":"LAN"}.
[25/07/2022, 11:11:40] [eWeLink] [NSPanel2] receiving update {"switches":[{"switch":"off","outlet":0},{"switch":"off","outlet":1}],"online":true,"updateSource":"LAN"}.
[25/07/2022, 11:11:40] [eWeLink] [NSPanel2] [Channel 2] current state [off].
[25/07/2022, 11:11:40] [eWeLink] [NSPanel2] receiving update {"switches":[{"switch":"off","outlet":0},{"switch":"off","outlet":1}],"online":true,"updateSource":"WS"}.
ihinaie commented 2 years ago

Thank u for following up. What i noticed for NS Panel is as follows. Left button - CH-1 Right button - CH-2

The issue seems to be in HK app reporting, when exiting and re-opening the app the following happens:

Conclusion: CH-2 follows the status of CH-1

bwp91 commented 2 years ago

Hi @ihinaie thanks for noting this.

Are you able to provide me with homebridge logs with the plugin debug setting on.

Start off with both channels off. Then turn channel 1 on, then off, Then turn channel 2 on, then off.

I need to see all logs that appear during this process if possible!

Thanks!

ihinaie commented 2 years ago

Log:

31/07/2022, 11:32:50] [eWeLink] [NSPanel] current temperature [24°C]. [31/07/2022, 11:32:50] [eWeLink] [NSPanel] [Channel 1] current state [on]. [31/07/2022, 11:32:53] [eWeLink] [NSPanel] [Channel 1] current state [off]. [31/07/2022, 11:32:56] [eWeLink] [NSPanel] [Channel 2] current state [on]. [31/07/2022, 11:32:58] [eWeLink] [NSPanel] [Channel 2] current state [off].

As i said the issue is in Apple Home app status reporting.

ihinaie commented 2 years ago

@bwp91

[08/09/2022, 17:41:55] [Homebridge UI] Homebridge log truncated by ihinai. [08/09/2022, 17:42:29] [eWeLink] [NSPanel] receiving update {"temperature":22,"humidity":"blank","online":true,"updateSource":"WS"}. [08/09/2022, 17:42:29] [eWeLink] [NSPanel] current temperature [22°C]. [08/09/2022, 17:42:39] [eWeLink] [NSPanel] receiving update {"temperature":21,"humidity":"blank","online":true,"updateSource":"WS"}. [08/09/2022, 17:42:39] [eWeLink] [NSPanel] current temperature [21°C]. [08/09/2022, 17:43:22] [eWeLink] [NSPanel] sending update {"switches":[{"outlet":0,"switch":"on"}]}. [08/09/2022, 17:43:22] [eWeLink] [NSPanel] [Channel 1] current state [on]. [08/09/2022, 17:43:22] [eWeLink] [NSPanel] receiving update {"switches":[{"switch":"on","outlet":0},{"switch":"off","outlet":1}],"online":true,"updateSource":"LAN"}. [08/09/2022, 17:43:22] [eWeLink] [NSPanel] receiving update {"switches":[{"switch":"on","outlet":0},{"switch":"off","outlet":1}],"online":true,"updateSource":"WS"}. [08/09/2022, 17:43:42] [eWeLink] [NSPanel] sending update {"switches":[{"outlet":0,"switch":"off"}]}. [08/09/2022, 17:43:42] [eWeLink] [NSPanel] [Channel 1] current state [off]. [08/09/2022, 17:43:43] [eWeLink] [NSPanel] receiving update {"switches":[{"switch":"off","outlet":0},{"switch":"off","outlet":1}],"online":true,"updateSource":"WS"}. [08/09/2022, 17:43:43] [eWeLink] [NSPanel] receiving update {"switches":[{"switch":"off","outlet":0},{"switch":"off","outlet":1}],"online":true,"updateSource":"LAN"}. [08/09/2022, 17:43:49] [eWeLink] [NSPanel] sending update {"switches":[{"outlet":1,"switch":"on"}]}. [08/09/2022, 17:43:49] [eWeLink] [NSPanel] [Channel 2] current state [on]. [08/09/2022, 17:43:50] [eWeLink] [NSPanel] receiving update {"switches":[{"switch":"off","outlet":0},{"switch":"on","outlet":1}],"online":true,"updateSource":"LAN"}. [08/09/2022, 17:43:50] [eWeLink] [NSPanel] receiving update {"switches":[{"switch":"off","outlet":0},{"switch":"on","outlet":1}],"online":true,"updateSource":"WS"}. [08/09/2022, 17:43:50] [eWeLink] [NSPanel] sending update {"switches":[{"outlet":1,"switch":"off"}]}. [08/09/2022, 17:43:51] [eWeLink] [NSPanel] [Channel 2] current state [off]. [08/09/2022, 17:43:51] [eWeLink] [NSPanel] receiving update {"switches":[{"switch":"off","outlet":0},{"switch":"off","outlet":1}],"online":true,"updateSource":"LAN"}. [08/09/2022, 17:43:51] [eWeLink] [NSPanel] receiving update {"switches":[{"switch":"off","outlet":0},{"switch":"off","outlet":1}],"online":true,"updateSource":"WS"}.

ihinaie commented 2 years ago

Hello Ben @bwp91 did u get the chance to look at this issue

bwp91 commented 1 year ago

Hi, Closing this just as been a little overwhelmed with issues recently. If this is still an issue or a feature you would like implemented then please do re-open this ticket! Thanks for your understanding!