deconz-rest-plugin icon indicating copy to clipboard operation
deconz-rest-plugin copied to clipboard

Improvement : Remove the auto power of for some tuya switch

Open Smanar opened this issue 3 years ago • 28 comments

It seem there is a problem in the firmware on some model like

  • _TZ3000_fvh3pjaz
  • _TZ3000_9hpxg80k
  • _TZ3000_wyhuocal

This PR just disable the auto power off, see https://github.com/dresden-elektronik/deconz-rest-plugin/issues/3693

Smanar avatar Jul 14 '21 07:07 Smanar

The manufacturer names are not yet listed in product_match.cpp. I'd suggest to add them there and use R_GetProductId().

manup avatar Jul 17 '21 15:07 manup

Done, but the problem is it s not possible to find something specific to device, some of them haven't model reference or mutiple brand (X711A, X712A, Lonsonho or tuya or Zemismart, ect ...) and some model have same reference, but 2 versions, the bugged one and the not bugged (with different manufacture name)

So have used a standard description and a suffix, to not mix them with not bugged one.

    {"_TZ3000_fvh3pjaz", "TS0012", "Tuya", "Tuya_SWITCH 2 Gangs (T)"},
    {"_TZ3000_9hpxg80k", "TS0011", "Tuya", "Tuya_SWITCH 1 Gangs (T)"},
    {"_TZ3000_wyhuocal", "TS0013", "Tuya", "Tuya_SWITCH 3 Gangs (T)"},

Smanar avatar Jul 17 '21 17:07 Smanar

@manup Is there something holding up the merge of this patch? as it can be seen in the related incident there is a number of people affected by this issue and DDF has not proven to be helpful to fix it (at least when I tried)

mpeterson avatar Jan 11 '22 06:01 mpeterson

@mpeterson It probably gets merged right before 2.14.0 comes out

Mimiix avatar Jan 11 '22 07:01 Mimiix

Hi @Mimiix, like @mpeterson I'm waiting for the merge. Anything we can do to speed this up ?

donok1 avatar Feb 07 '22 10:02 donok1

@donok1 please check #5733

Mimiix avatar Feb 07 '22 11:02 Mimiix

@donok1 please check #5733

Thanks for the link, I missed it. I completely support the idea. Hard coding each device is definitely not the way to go

But it's too bad this 7 month request was not met before the change of strategy, specially knowing that all tests using DDF for these switches have failed until now...

donok1 avatar Feb 07 '22 11:02 donok1

@manup Is the only one able to answer here.

Mimiix avatar Feb 07 '22 11:02 Mimiix

@Mimiix @manup Here we have an issue with functionality that affects many people, for which DDF has not been enough (I can check again if there were updates to DDF since my tests), and for which a verified fix exists (this PR).

I agree with @donok1 points of view. This could have fixed users pains a long time ago and because of other considerations was decided to not be merged, while not providing a viable alternative.

From my side, I have a full house of this switches sitting in a box waiting for this fix and it's a blocker for being installed at home.

Could we consider merging this if DDF is not a viable alternative at this point?

mpeterson avatar Feb 07 '22 15:02 mpeterson

I have no clue why it's not merged yet. Asked Manuel to reply here.

Nevertheless : what stops you from compiling yourself?

Mimiix avatar Feb 07 '22 15:02 Mimiix

@Mimiix I'm using deconz as a Home-Assistant Supervisor Add-On. That would break the flow that me and many others are using. Manually compiling moves the flow from stable and maintained deployment to a custom one.

Plus, not everyone has the knowledge to compile and maintain their own deployments.

mpeterson avatar Feb 07 '22 15:02 mpeterson

@Mimiix I'm using deconz as a Home-Assistant Supervisor Add-On. That would break the flow that me and many others are using. Manually compiling moves the flow from stable and maintained deployment to a custom one.

Plus, not everyone has the knowledge to compile and maintain their own deployments.

The only thing i'm saying is that if you are waiting for it that badly, you can solve it with compiling yourself.
This is the reason i stopped using the addon though. I can still use HA With my deCONZ but it just is installed on another VM. That's what the integration is for.

Other than advicing that there's nothing i can do now. Manuel will respond later on.

Mimiix avatar Feb 07 '22 15:02 Mimiix

Honestly this is also quite frustrating for me too. I did a lot of testing with smanar ages ago and I have been patiently waiting for it to be merged.

jonnipee avatar Feb 27 '22 17:02 jonnipee

And we have tried, it don't work using DDF (make a DDF without the binding part)

Smanar avatar Feb 28 '22 15:02 Smanar

@manup is there a chance you can chip in here? This is a very frustrating issue for both users and contributors like @Smanar that dedicated own time for the improvement that never saw the light

mpeterson avatar Mar 27 '22 07:03 mpeterson

Hi the code in the PR shouldn't be needed anymore. If the DDF is active for these manufacturer names the function bails out directly:

https://github.com/dresden-elektronik/deconz-rest-plugin/blob/6ec6ff46e4ca1b7563e967490a1bd75c92aa9dbf/bindings.cpp#L2488-L2492

manup avatar Mar 27 '22 10:03 manup

@manup I just tried today using deconz 2.14.1 and the DDF still doesn't seem to be working. Either I'm doing something wrong or the DDF is not behaving like expected.

The following screenshot shows how the DDF was configured. After doing that I did a hot reload. Is there a way to know if it was in fact loaded as configured? Because the device still behaves incorrectly after removing those bindings.

image

mpeterson avatar Mar 27 '22 12:03 mpeterson

@manup I see that it seems to have loaded it (as per screenshot), yet the bad behavior still replicates

image

mpeterson avatar Mar 27 '22 13:03 mpeterson

Ha yes the code need to work as it Perhaps it s because the binding is already done before. Have you tried with a new inclusion ?

Smanar avatar Mar 27 '22 13:03 Smanar

Perhaps it s because the binding is already done before. Have you tried with a new inclusion ?

Yes that would also be my assumption, to test this the easiest way the device could be deleted + reset and joined again.

manup avatar Mar 29 '22 16:03 manup

I’ll test this on Friday and report back.

On Tue, Mar 29, 2022, at 19:40, Manuel Pietschmann wrote:

Perhaps it s because the binding is already done before. Have you tried with a new inclusion ?

Yes that would also be my assumption, to test this the easiest way the device could be deleted + reset and joined again.

— Reply to this email directly, view it on GitHub https://github.com/dresden-elektronik/deconz-rest-plugin/pull/5118#issuecomment-1082109600, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAC4XVT4GHI545YRL7DP7DVCMW77ANCNFSM5AK3V66A. You are receiving this because you were mentioned.Message ID: @.***>

-- Michel Peterson

mpeterson avatar Mar 29 '22 18:03 mpeterson

TS0013 by _TZ3000_wyhuocal Lonsonho I'm using a Conbee stick via Home Assistant. How can I fix my light-switch?

HA-Jon avatar Apr 16 '22 21:04 HA-Jon

Hello can you try to make a DDF file to use with your device ? https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/DDF-cheat-sheet

If I m right you just need to select "edit DDF" and all values will be filled (and bind are not created on DDF) So after that set the status to gold, save the file and re-include the device.

Smanar avatar Apr 17 '22 10:04 Smanar

How? I've not got access to the physical item.

HA-Jon avatar Apr 17 '22 10:04 HA-Jon

Ha ? the device is not reconized by deconz ? This issue if for the "auto power off" problem.

Smanar avatar Apr 17 '22 11:04 Smanar

It is the "Auto power off after 2 minutes PROBLEM". I was just explaining how I use the switch.

HA-Jon avatar Apr 17 '22 12:04 HA-Jon

So try with a DDF, theorically the use of a DDF can solve the issue.

Smanar avatar Apr 17 '22 13:04 Smanar

Hmm I need to try this and see if it works also.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Smanar @.> Sent: Sunday, April 17, 2022 4:28:02 PM To: dresden-elektronik/deconz-rest-plugin @.> Cc: Jonathan Prasad @.>; Manual @.> Subject: Re: [dresden-elektronik/deconz-rest-plugin] Improvement : Remove the auto power of for some tuya switch (#5118)

So try with a DDF, theorically the use of a DDF can solve the issue.

— Reply to this email directly, view it on GitHubhttps://github.com/dresden-elektronik/deconz-rest-plugin/pull/5118#issuecomment-1100875407, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AN2UGUN2N5NR7H7KZWRZEMLVFQGWFANCNFSM5AK3V66A. You are receiving this because you are subscribed to this thread.Message ID: @.***>

jonnipee avatar Apr 17 '22 13:04 jonnipee