Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding some more tuya dimmers #1010

Merged
merged 2 commits into from
Aug 25, 2021
Merged

Adding some more tuya dimmers #1010

merged 2 commits into from
Aug 25, 2021

Conversation

MattWestb
Copy link
Contributor

Adding more tuya dimmers:

            ("_TZE200_whpb9yts", "TS0601"),
            ("_TZE200_ebwgzdqq", "TS0601"),
            ("_TZE200_9i9dt8is", "TS0601"),
            ("_TZE200_swaamsoy", "TS0601"),
            ("_TZE200_0nauxa0p", "TS0601"),

And fixes #964

@coveralls
Copy link

coveralls commented Aug 25, 2021

Pull Request Test Coverage Report for Build 1166966837

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 82.734%

Totals Coverage Status
Change from base Build 1166619979: 0.0%
Covered Lines: 4025
Relevant Lines: 4865

💛 - Coveralls

@dmulcahey dmulcahey merged commit 6db7f12 into zigpy:dev Aug 25, 2021
@MattWestb MattWestb deleted the patch-1 branch August 25, 2021 19:15
@itsolon
Copy link

itsolon commented Apr 5, 2022

Hello Matt,
thank you for giving me some hints in other posts about the support for my Tuya Zigbee Dimmer _TZE200_3p5ydos3 TS0601.
But due to lack of knowledge of my side following questions arise:

  1. is this package (at the moment 0.0.69) already installed in standard home assistant and with luck someone integrates support for my dimmer somewhen later?
  2. or do i have to install the zha-device-handler package by myself and hopefully then it supports more "non-Standard" devices?
  3. or do i simply have to activate it in my configuration.yaml and then the 0.0.6.9 package hast "additional support" for this ready quirked hardware?
  4. or last possibility do i have to write a quirk in every case?.. i tried to but i was not successful so far.

Best regards & thank you

@MattWestb
Copy link
Contributor Author

Your device _TZE200_3p5ydos3 is not added in the quirk in the dev branch ;-((
You can configure local quirk #693 (comment) and adding one copy if the original quirk https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/ts0601_dimmer.py i the new local quirk directory. Than adding your device ID in this section on one new line in the end of the ID (after line 43)

MODELS_INFO: [
("_TZE200_dfxkcots", "TS0601"),
("_TZE200_whpb9yts", "TS0601"),
("_TZE200_ebwgzdqq", "TS0601"),
("_TZE200_9i9dt8is", "TS0601"),
("_TZE200_swaamsoy", "TS0601"),
("_TZE200_0nauxa0p", "TS0601"),
("_TZE200_la2c2uo9", "TS0601"),
],
and restarting HA.
If its working is the system loading the quirk for your device and working and if not we need little more help.

@itsolon
Copy link

itsolon commented Apr 6, 2022 via email

@itsolon
Copy link

itsolon commented Apr 6, 2022

Screenshot 2022-04-06 092157
Screenshot 2022-04-06 091959

@MattWestb
Copy link
Contributor Author

The last line in the device signature "class": "zigpy.device.Device" is saying the the system have not loading the quirk for your device.
And you have doing all OK but i was missing that your device is having one Zigbee GreenPower Proxy Cluster.

You need adding it in the signature like this:

# <SimpleDescriptor endpoint=242 profile=41440 device_type=97
# device_version=0
# input_clusters=[]
# output_clusters=[33]>
242: {
PROFILE_ID: 41440,
DEVICE_TYPE: 97,
INPUT_CLUSTERS: [],
OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
},
},
}

and also (not inportent for the function but shall being made) in the replacement:
# <SimpleDescriptor endpoint=242 profile=41440 device_type=97
# device_version=0
# input_clusters=[]
# output_clusters=[33]>
242: {
PROFILE_ID: 41440,
DEVICE_TYPE: 97,
INPUT_CLUSTERS: [],
OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
},
},
}
.
Look how its made in the TS011F and doing the same and keep the lines and indenting it shall working OK.
If you like fixing the formation use black playground https://black.vercel.app/.

If you is only having one type you can doing the changed in the same device class for testing.
If its working we need doing one new class for your device so we can merging it in ZHA without braking other devices.

@itsolon
Copy link

itsolon commented Apr 7, 2022

image

HE COMPLAINS ABOUT GREEN POWER PROXY NOT DEFINED HAVE ALOOK

+Logger: homeassistant.config_entries
Source: custom_zha_quirks/ts0601_dimmer.py:62
First occurred: 10:18:03 (1 occurrences)
Last logged: 10:18:03

Error setting up entry USB Serial, s/n: n/a for zha
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/zha/init.py", line 99, in async_setup_entry
setup_quirks(config)
File "/usr/local/lib/python3.9/site-packages/zhaquirks/init.py", line 409, in setup
importer.find_module(modname).load_module(modname)
File "", line 529, in _check_name_wrapper
File "", line 1029, in load_module
File "", line 854, in load_module
File "", line 274, in _load_module_shim
File "", line 711, in _load
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/config/custom_zha_quirks/ts0601_dimmer.py", line 28, in
class TuyaSingleSwitchDimmer(TuyaDimmerSwitch):
File "/config/custom_zha_quirks/ts0601_dimmer.py", line 62, in TuyaSingleSwitchDimmer
OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
NameError: name 'GreenPowerProxy' is not defined

@itsolon
Copy link

itsolon commented Apr 7, 2022

FYI that you have an idea what the product does look like
https://www.bseed.com/collections/dimmer-switch-zigbee/products/bseed-eu-russia-new-zigbee-touch-wifi-light-dimmer-smart-switch?variant=42116733501595

By the way i dont know it it is ok to post external links to manufacuters. if not please remove..
i have more ot these BSEED Devices im sure many people will buy them and are happy that homeassistant will support them in future. But for a name for the new devices .. i think that bsseed buys some hardware from different manufacutrers
the dimmer we talk about
"manufacturer": "_TZE200_3p5ydos3",
"model": "TS0601",

ADDDITIONALLY and i have one 1 gang switch mains powered
TS0011
von _TZ3000_hafsqare (this is shown as battery powered which is not true, because the router function will then not be included?)

they are from different manufacturers? at least the electronic inside

@MattWestb
Copy link
Contributor Author

@itsolon The NameError: name 'GreenPowerProxy' is not defined is coming from its not defined in the local quirk or its not imported in the quirk.
Adding it as import in your customer quirk like is being mad in the ts0113 quirk:

from zigpy.zcl.clusters.general import (
Basic,
GreenPowerProxy,
Groups,
Identify,
OnOff,
Ota,
Scenes,
Time,
)

Only the new line added in the general and the system shall not complaining.

I like the design of the touch dimmer switches but they is using tuya MCU / DP commands and cant being bound to light groups so its not working then the system is down so its on no go for my production system.

Some switches with no neutral (or optional neutral) is end devices and cant routing traffic without doing one new firmware for the device that we cant (normally) doing.
The battery is one defect in the firmware but can being fixed in one device quirk for it but not that is one end device and not one router.

@itsolon
Copy link

itsolon commented Apr 7, 2022 via email

@MattWestb
Copy link
Contributor Author

That is great !!

@javicalle is working on some problematic tuya dimmers but hi have not getting all in the right place but i think its only matter or time.

look on this issue #1302 and see how its going and then its working we can trying if you device is working the same way and adding it if its working OK or diggig deeper for getting yours working 2.
For the moment i think its not helping spamming the issue then hi is having one very good user for testing the code (Hi dont have the device self).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Device Support Request] Lonsonho Zigbee Smart Touch Dimmer [_TZE200_0nauxa0p]-[TS0601]
4 participants