-
Notifications
You must be signed in to change notification settings - Fork 712
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
[Device Support Request] TS011F Smart Plug (_TZ3000_cehuw1lw) #2573
Comments
@TheJulianJES https://gist.github.com/erkr/5d4addf1b4c8e18d68d2adb154c6be93 I wonder if that quirk also works for this device, and if so can be added to the official distribution. Best Eric |
when is it likely this will be resolved? Ive just got 5 of these sitting here doing nothing |
I guess It will take a while to resolve this. Someone needs to test new code before it will included in the release. Why don't you try my custom quirk? Comment out the model part (regering my plug) and uncomment models_info set with your device info. It will help the developers to know if that works. As the zigbee signature is equal, that would not surprise me. |
i have no idea how to implement quirk.
…On Wed, 13 Sept 2023 at 21:40, Eric ***@***.***> wrote:
I guess It will take a while to resolve this. Someone needs to test new
code before it will included in the release.
Why don't you try my custom quirk? Comment out the model part (regering my
plug) and uncomment models_info set with your device info. It will help the
developers to know if that works. As the zigbee signature is equal, that
would not surprise me.
Success Eric
—
Reply to this email directly, view it on GitHub
<#2573 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA325VPR5B442NHMJX4DOJTX2GZUPANCNFSM6AAAAAA4OIAL2M>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Step 1 is to enable custom quirks in your configuration.yaml: Step 2 is to copy the custom quirk file inthe configured folder Step 3 is restart HA and check your log for errors. If no errors, check in the zigbee info of the device is the quirk is loaded |
Please try this custom quirk: Possible custom quirk to try"""TS011F plug."""
from zigpy.profiles import zgp, zha
from zigpy.zcl.clusters.general import (
Basic,
GreenPowerProxy,
Groups,
Identify,
OnOff,
Ota,
Scenes,
Time,
)
from zigpy.zcl.clusters.homeautomation import ElectricalMeasurement
from zigpy.zcl.clusters.lightlink import LightLink
from zigpy.zcl.clusters.smartenergy import Metering
from zhaquirks.const import (
DEVICE_TYPE,
ENDPOINTS,
INPUT_CLUSTERS,
MODEL,
MODELS_INFO,
OUTPUT_CLUSTERS,
PROFILE_ID,
)
from zhaquirks.tuya import (
TuyaZBE000Cluster,
TuyaZBElectricalMeasurement,
TuyaZBMeteringClusterWithUnit,
TuyaZBOnOffAttributeCluster,
)
from zhaquirks.tuya.mcu import EnchantedDevice
class Plug_v3(EnchantedDevice):
"""Tuya TS011F plug. One plug is _Tz3000_0Zfrhq4I."""
signature = {
MODEL: "TS011F",
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
INPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
OnOff.cluster_id,
Time.cluster_id,
Metering.cluster_id,
ElectricalMeasurement.cluster_id,
LightLink.cluster_id,
0x1888,
TuyaZBE000Cluster.cluster_id,
],
OUTPUT_CLUSTERS: [
Ota.cluster_id,
],
},
242: {
PROFILE_ID: zgp.PROFILE_ID,
DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
INPUT_CLUSTERS: [],
OUTPUT_CLUSTERS: [
GreenPowerProxy.cluster_id,
],
},
},
}
replacement = {
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
INPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
TuyaZBOnOffAttributeCluster,
Time.cluster_id,
TuyaZBMeteringClusterWithUnit,
TuyaZBElectricalMeasurement,
LightLink.cluster_id,
0x1888,
TuyaZBE000Cluster,
],
OUTPUT_CLUSTERS: [
Ota.cluster_id,
],
},
242: {
PROFILE_ID: zgp.PROFILE_ID,
DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
INPUT_CLUSTERS: [],
OUTPUT_CLUSTERS: [
GreenPowerProxy.cluster_id,
],
},
},
} |
Also note that this is all/mostly community-maintained. At least I'm doing this in my free time. So it's always possible that your devices may never be supported. If you need help installing the custom quirk I've posted above, let me know. |
Thankyou I will try it today. I've followed guides for creating quirks but I'm not strong on programming at all and whilst I get the general structure of the Jason file, the specifics just hurt my head. I appreciate this is community run and thank all that contribute.
Regards
Ozhound
…
On 17 Sept 2023 at 10:20, TheJulianJES ***@***.***> wrote:
>
>
> when is it likely this will be resolved? Ive just got 5 of these sitting here doing nothing
>
>
Also note that this is all/mostly community-maintained. At least I'm doing this in my free time. So it's always possible that your devices may never be supported.
Tuya is notorious for explicitly making it hard to have their devices work on third-party hubs. If they followed Zigbee spec, it would just work without any quirks.
If you need help installing the custom quirk I've posted above, let me know.
(Basic steps are: put the content in a file called something like tuya_plug.py, put that file in your custom quirks directory that should be located in the /config directory of your HA installation. Then, make sure the custom quirk directory is set in your HA configuration.yaml, restart HA after that and see if the quirk applies to your device.
If everything works, let me know and we'll merge the quirk for the next major HA release. You should remove the custom quirk by then.)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I tried that quirk and the LOGS say that its loaded custom quirks but it isn't applied to that device. Is there a reason we cant take an inbuilt quirk , create a custom quirk, changing the model to make it work? I have 5 or these exact same units that work beautifully and have a quirk applied to it automatically. These last 5, bought from the same supplied 2 weeks later have the different model code but are the same unit? This is the working unit showing the quirk being applied by ZHA automatically Thanks again for responding initially. |
I've updated my above comment. Please try the updated quirk.
Yes, it's not the model that is different. The exposed clusters are different. It's basically an entirely different plug (under the hood) (or at least running different firmware). |
@TheJulianJES Brilliant, that worked!. Power delivered looks right, the other sensors seem to have registered properly. Ill do some more testing but it looks like its working. Thankyou so much. |
I can confirm that this custom quirk mentioned earlier works perfectly, so should be integrated in the main code. |
Thanks for testing! This PR adds support for the plug: #2592 |
I'm (kind of?) in the same boat as OP. I got two batches of plugs labelled as "_TZ3000_cehuw1lw TS011F" however only one batch works with zha, the one I ordered first. The batch of plugs I ordered after that all don't work, even though they look the same and show the same device info in Homeassistant. The one in the first picture is working fine. All data is being reported correctly and there is no connection loss whatsoever. The one in the second picture only works during pairing, where I can turn if on and off for some time until the light on the plugs stops blinking (= pairing mode stops). Here are the diagnostics from one plug of each batch. Device Info from broken Plug
Device Info from Working Plug
|
Following home-assistant/core#98624 (comment) fixed this issue for me |
Hello. I have this power plug from another manufacturer : _TZ3000_okaz9tjs
I don't mind the wrong current measurement, but is is annoying to be forced to use it as a light. I tried the custom quirk linked above: no change. Extract of the device diagnostics
Anything else I could try ? |
@alka79 Measurement is correct and the control is a switch type. |
Thanks. So there is hope :) Whatever I do, it is always a light. My plug must be different. I could see that the released quirk for TS011F has already 3 versions ! this might be the 4th. I have to figure out what the differences are and I don't really know where to look. BTW, printed on my plug: |
@alka79 I have exactly the same brand and firmware. Try to remove them. Restart en add them again. |
Unbeliveable ! |
I tried again with no success. I started the log before pairing. As I understand, your plug matches with the tuya.ts011f_plug.Plug_v2 quirk. For my plug, the matching attempts fail with all the ts011f quirks, mostly "because endpoint list mismatch".
Attached is the full diagnostics of my plug. Maybe you could share the full diagnostics of one of yours matching the Plug_v2 quirk so that I can compare and possibly write a custom quirk based on Plug_v2 that would match my plug ? |
I found a work around mentioned in the doc ! https://www.home-assistant.io/integrations/zha/#modifying-the-device-type/ zha:
device_config:
84:71:27:ff:fe:93:17:24-1: # format: {ieee}-{endpoint_id}
type: "switch" # corrected device type The current metering is still wrong but at least it is recognized as a switch. Good enough for me. |
I'm running out of suggestions. Sorry |
the fully working quirk for my devices is here #1764 (comment) |
I seem to have a different variant of cehuw1lw which is missing the 242 endpoint. I've only tested it briefly but all looks correct with current and summation power returning sane values. Here's the code: """TS011F plug."""
from zigpy.profiles import zgp, zha
from zigpy.zcl.clusters.general import (
Basic,
GreenPowerProxy,
Groups,
Identify,
OnOff,
Ota,
Scenes,
Time,
)
from zigpy.zcl.clusters.homeautomation import ElectricalMeasurement
from zigpy.zcl.clusters.lightlink import LightLink
from zigpy.zcl.clusters.smartenergy import Metering
from zhaquirks.const import (
DEVICE_TYPE,
ENDPOINTS,
INPUT_CLUSTERS,
MODEL,
MODELS_INFO,
OUTPUT_CLUSTERS,
PROFILE_ID,
)
from zhaquirks.tuya import (
TuyaZBE000Cluster,
TuyaZBElectricalMeasurement,
TuyaZBMeteringClusterWithUnit,
TuyaZBOnOffAttributeCluster,
)
from zhaquirks.tuya.mcu import EnchantedDevice
class Plug_v3(EnchantedDevice):
"""Tuya TS011F plug, _TZ3000_cehuw1lw variant."""
signature = {
MODEL: "TS011F",
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
INPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
OnOff.cluster_id,
Time.cluster_id,
Metering.cluster_id,
ElectricalMeasurement.cluster_id,
LightLink.cluster_id,
0x1888,
TuyaZBE000Cluster.cluster_id,
],
OUTPUT_CLUSTERS: [
Ota.cluster_id,
],
},
},
}
replacement = {
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
INPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
Groups.cluster_id,
Scenes.cluster_id,
TuyaZBOnOffAttributeCluster,
Time.cluster_id,
TuyaZBMeteringClusterWithUnit,
TuyaZBElectricalMeasurement,
LightLink.cluster_id,
0x1888,
TuyaZBE000Cluster,
],
OUTPUT_CLUSTERS: [
Ota.cluster_id,
],
},
},
} |
I’ve got this unit, but none of the quirks above seem to work, amp is the issue, reporting incorrectly as 1000x that is 84amps instead of 0.84
Anyone got suggestions? |
Problem description
I have a frustrating issue with this power plug. The first lot of 5 that I installed worked great and the power measurement sensors work accurately and consitently
So 2 weeks later i purchased another 5 from the same seller (sixwgh store on Aliexpress) and when they came, they look and function identically. when installed in HA however, they are missing the Child Lock and the Backlight Settings, and the amperage is approximately 100 times what it is supposed to be (220 AMPS for a fridge?) power draw and Voltage seems accurate.
The difference i can see is that the new plugs mfg code is different and it isnt being picked up correctly by ZHA and the class is "zigpy.device.Device"
Solution description
For it to work the same way as the existing TS011F Plugs that look indentical
Screenshots/Video
Screenshots/Video
Existing (working correctly) Plug
New - Partially Functioning Plug
Device signature
Device signature
Partly-working Device Sig
Correct Signature
Diagnostic information
Diagnostic information
[zha-0c688e36739db66388192a6b6d74d7b7-_TZ3000_0zfrhq4i TS011F-479ba64ed9e6ce5acde8be5383d9c027.json.txt](https://github.com/zigpy/zha-device-handlers/files/12544417/zha-0c688e36739db66388192a6b6d74d7b7-_TZ3000_0zfrhq4i.TS011F-479ba64ed9e6ce5acde8be5383d9c027.json.txt)Logs
Logs
Custom quirk
Custom quirk
Additional information
No response
The text was updated successfully, but these errors were encountered: