-
Notifications
You must be signed in to change notification settings - Fork 697
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] BlitzWolf BW-SHP13 smart plug (aka Tuya TS0121) #605
Comments
Hi, yes it would be great if it was fully supported as you describ it. {
"node_descriptor": "NodeDescriptor(byte1=1, byte2=64, mac_capability_flags=142, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=0)",
"endpoints": {
"1": {
"profile_id": 260,
"device_type": "0x0051",
"in_clusters": [
"0x0000",
"0x0004",
"0x0005",
"0x0006",
"0x0702",
"0x0b04"
],
"out_clusters": [
"0x000a",
"0x0019"
]
}
},
"manufacturer": "_TZ3000_g5xawfcq",
"model": "TS0121",
"class": "zigpy.device.Device"
} |
Z2M polls them every 60 seconds: https://github.com/Koenkk/zigbee-herdsman-converters/blob/c9ed6bb75a9682cf60b41e4e7647c653480f9a6c/devices.js#L1490-L1503 because they don't support attribute reports apparently (or at least don't do it properly). |
ZHA already polls the electrical measurement cluster. Is this not an EM cluster? |
It should be. Perhaps it's missing these constant attributes (https://github.com/Koenkk/zigbee-herdsman-converters/blob/c9ed6bb75a9682cf60b41e4e7647c653480f9a6c/devices.js#L1479-L1483) (or the binding above that)? (Just guessing at this point though). |
I just re-read the issue. It looks like the electrical power measurement (W) is working correctly, right? Only voltage and current do not have entities created for them. The total "smart" (?) energy meter isn't updated. |
Yes, if that’s the case. We currently only support 1 sensor per cluster. This is currently a limitation in ZHA. |
Got my Blitzwolf plugs today. They seem to work well so far. (On/off + current consumption). Edit: This would be addressed by #742 |
Any plans to extend ZHA to support more than one sensor per cluster?
Hope to see full support for these Tuya smart plugs as there are few inexpensive Zigbee plugs featuring power/energy-metering. Lonsonho also has Tuya model TS0121 branded variant which also features support. for power-metering and energy-metering: https://zigbee.blakadder.com/Lonsonho_TS0121.html https://www.aliexpress.com/item/4001118546894.html Really like that and BlitzWolf BW-SHP13 because power/energy-metering and fact that they are both inexpensive and very small. Here are some pictures of Lonsonho TS0121 version: |
And this one from "Rehentele" looks to be yet another Tuya TS0121 variant with power-metering and energy-metering support: https://www.aliexpress.com/item/4000449939329.html Note that Rehentele seem to sell a TS0121 version with power-metering as well as a TS0111 version without that looks the same. |
It shows consumption in kWh (energy metering) as "unknow"... any solution about? |
Please, add the missing entities so i can move from z2m to ZHA. |
same request from my side, this plug is perfect as size and power capability, so having the chance to see the consumption in ZHA will be the perfect match. I really hope this feature can be implemented, thanks. |
What exactly needs to be "changed" in the ZHA integration to overcome the limit of 1 sensor per cluster? How many sensors per cluster does other Zigbee implementations like example Zigbee2MQTT support? |
It would be nice to know if there is a roadmap for this "fix" (more than 1 sensor per cluster) or else we should make a decision to steer away from Zigbee power plugs. |
+1. Bought a Tuya TS0121 from aliexpress to measure consumption of different devices. On/Off switch works and Electrical power measurement (W) updated correctly. I can retrieve the total usage from the device in the Metering cluster (0x0702) using the current_summ_delivered attribute ( 0x0000), but unfortunately there is no sensor for this. manufacturer: _TZ3000_rdtixbnu |
I did some research with my BW-SHP13 in Home Assistant via ZHA: The current_summ_delivered attribute @rklomp mentioned gets written to zigbee.db. You could use a sql sensor to read the value from there. You have to multiply that value by 10 to get Wh or by 0.01 to get kWh.
So, the data is there. What needs to be done to show that via the device sensor? Sidenote: |
FYI, there is a developers/development discussion about this "issue" in this related PR by @stattin42 -> home-assistant/core#50471 There are also two problem discussion about the root cause in HA, see home-assistant/core#44539 and home-assistant/core#34090 Users tested/confirmed issue on BlitzWolf BW-SHP13, Innr SP 120 / SP120, Schwaiger ZHS15, Lonsonho 16A Energy Monitoring Plug |
You are correct, current_summ_delivered in in zigbee db, BUT it updates there very rarely ( once per day) SQL query may be used if we could somehow force db value update. |
While sql sensors or events for attribute changes could be a way to handle multiple attributes per cluster, I am still struggling a little with the rationale behind selecting an optional attribute as the base entity/sensor for a cluster or channel. Wouldn't it be more useful to use a mandatory attribute for the sensor? Now that things are what they are, I have some sympathy for not breaking things by changing existing behaviour. I cannot help thinking, though, that there is a sense of urgency finding a solution. Hopefully a solution which does not require templating for commonly used mandatory attributes. Support is currently broken for many compliant devices unless they support a certain optional attribute. |
Is your energy sensor kWh updating correctly? |
@Celer21 please try if reconfiguring your plug fixes total consumption 😃 |
Works as expected since last HA update! Consumption (kWh) seems still not reliable |
I can confirm now BlitzWolf plug kWh is updating, but Shwaiger and Innr SP120 are still freezed. |
#1131 adds the correct divisor for rms_current. |
Yes, for a different device I had to re-set up the zigbee device in HA to get the new scaling. |
In which standard version of HA will it be distributed? I only have one instance of HA and cannot use dev or beta channel. |
No one can tell until a new release and it has been bumped in HA so keep an eye on https://github.com/zigpy/zha-device-handlers/releases in combination with "Bump ZHA quirks version" in https://github.com/home-assistant/core/pulls?q=zha then wait for it to appear under "All changes" in https://rc.home-assistant.io/latest-release-notes/ |
@Hedda Thank you for links. |
My plug shows wrong current value too. |
What values do you get for attributes ac_current_divider and ac_current_multiplier in the TuyaZBElectricalMeasurement cluster? |
I think repairing its needed or reading the "new" added (in the quirk) attribute then its |
FYI: The new version of zha quirks (0.0.66) is included in the HA 2022.02 release :) |
My device total usage readings (metering_summation_delivered) still appear to be wrong in HA (after reconfigure). I don't know what steps to take to fix this? Amperage, voltage and wattage readings all seem fine, but summation shows a lot of kWh's which should be Wh i think. So probably a wrong multiplier somewhere? But the TuyaZBElectricalMeasurement attributes seem fine. (ac_current_divider: 1000; ac_current_multiplier: 1) |
Try setting the values of the attributes divisor (0x0302) and multiplier (0x0301) in the TuyaZBMeteringCluster cluster. Divisor should be set to 100 and multiplier should be set to 1. |
Those are already set to 100 (divider) and 1 (multiplier), but I set them both anyway and now the values seem much more reasonable! Thanks! 😊 |
I tried the same and it also fixed the issue for me completely! |
I'm currently trying to get an Blitzwolf BW-SHP15 to work with ZHA (connected through ConbeeII). I can seem to receive the amp and volt, but not the watt and kWh. The history of the sensor shows me it's not updating. Anyone has a clue on how I can fix this? I want to know the watt to integrate it in to automations which need watt to determine if a machine is running or not. |
Hi, can I ask you. Is it possible to delete sum consumption (power)? I have Zigbee2mqtt. |
@radek-foltyn zha-device-handlers (zha-quirks) is for Home Assistant ZHA, not for Zigbee2MQTT. For Zigbee2MQTT see instead: |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions. |
Is your feature request related to a problem? Please describe.
BlitzWolf BW-SHP13 smart plug 16A EU version, same device as TuYa TS0121 smart plug.
Device joins zigbee network and it's recognized by home-assistant.
Entities are created for:
This entities are missing:
Describe the solution you'd like
Please consider adding support for the missing values and fixing the electrical power measurement value.
Device signature - this can be acquired by removing the device from ZHA and pairing it again from the add devices screen. Be sure to add the entire content of the log panel after pairing the device to a code block below this line.
Additional context
This device doesn't support reporting of electrical measurement values, so it needs to be polled. It's supported on zigbee2mqtt, they fixed this by polling the values every 10 seconds.
Voltage value is correctly reported if I manually get the attribute value:
The text was updated successfully, but these errors were encountered: