-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add support for Blitzwolf BW-SHP13...gets recognised as TuYa TS0121...how to proceed? #3812
Comments
There is a chance it is actually the rebrand of the TuYa device with some more optioned configured in the firmware... Perhaps a good start would be to append |
Thanks. Got that suggestion too on Tweakers forum. Also added In the
I have not been able to figure this out. Tried a lot of code that is used for other devices, can't get it to work. It seems to me that the output as shown in the first post is the cumulative power in decawatt. Needs to go times 10 to make sense for the device I am running on the plug. |
Just taking a stab in the dark here, the endpoint might be wrong. But based on the log entry i think EP1 is the good one. |
Thanks, this is the error it gives:
|
Lets try without reporting for genOnoff. |
Thanks. Next error is:
|
Interesting, so it doens't support reporting at all probably.
Lets try the absolute minimal then. |
The same error comes up. |
I'm guessing it's not liking the readMeteringPowerConverterAttributes also :( |
Thanks for the time. 👌 |
When did you receive |
That must have been after adding
|
But you don't get any power messages now? |
Reading with MQTT Explorer: Power field stays at "null". |
Can you try with: {
zigbeeModel: ['TS0121'],
model: 'TS0121',
description: '10A UK or 16A EU smart plug',
supports: 'on/off',
vendor: 'TuYa',
fromZigbee: [fz.on_off, fz.metering_power],
toZigbee: [tz.on_off],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
},
}, attach a load to the plug, stop zigbee2mqtt and share your debug log and To enable debug logging set in advanced:
log_level: debug |
Ok thanks. One of the Blitzwolf BW-SHP13 is called ac, the other has no friendly name yet. Filtered log:
The two db entries of the two plugs:
I see that the plug without friendly name has no 'power' field in MQTT. For the ac one I made an entry in HA (manually) to be able to read the power field. Maybe that caused the field to appear in MQTT Explorer while Zigbee2MQTT itself does not even publish anything to it yet and neither announces the field. Not sure, no MQTT expert. |
Can you try with: {
zigbeeModel: ['TS0121'],
model: 'TS0121',
description: '10A UK or 16A EU smart plug',
supports: 'on/off',
vendor: 'TuYa',
fromZigbee: [fz.on_off, fz.metering_power],
toZigbee: [tz.on_off],
meta: {configureKey: 3},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
await configureReporting.instantaneousDemand(endpoint);
},
}, attach a load and provide the complete log again? (from the point where you attached the load). |
Thanks. Here it is:
|
Can you try with: {
zigbeeModel: ['TS0121'],
model: 'TS0121',
description: '10A UK or 16A EU smart plug',
supports: 'on/off',
vendor: 'TuYa',
fromZigbee: [fz.on_off, fz.metering_power],
toZigbee: [tz.on_off],
meta: {configureKey: 4},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
endpoint.saveClusterAttributeKeyValue('seMetering', {
divisor: 100,
multiplier: 1,
});
},
}, with this I expect the |
Yes thanks that is working as you describe. 👌 As I have no experience with other electricity monitoring plugs...what else can it do? Or what can Z2M do with it? |
We need to check if the plug supports this. When running with the code below, does the device configure successfully? {
zigbeeModel: ['TS0121'],
model: 'TS0121',
description: '10A UK or 16A EU smart plug',
supports: 'on/off',
vendor: 'TuYa',
fromZigbee: [fz.on_off, fz.metering_power],
toZigbee: [tz.on_off],
meta: {configureKey: 4},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
endpoint.saveClusterAttributeKeyValue('seMetering', {
divisor: 100,
multiplier: 1,
});
await endpoint.read('seMetering', ['instantaneousDemand']);
},
}, |
Hi, Actually I got three of them today. Bought hoping they'll work like Innr SP 120, but supporting higher wattage. The device doesn't configure using this code
|
Here the added line of code from #3812 (comment) seems to do nothing. No error and no new features. Or is remove and pair again needed? |
@SaturnusDJ I suppose configuration takes place when pairing. I got the error when repairing the plug. |
deCONZ is somehow able to read the haElectricalMeasurement cluster of this device: dresden-elektronik/deconz-rest-plugin#2988 I'll try some tinkering on my own, but if you have any suggestions or snippets to test, I'll be happy to test them. |
It is also possible to force the configure via https://www.zigbee2mqtt.io/information/mqtt_topics_and_message_structure.html#zigbee2mqttbridgeconfigure and watch the logging at this moment.
Try with: {
zigbeeModel: ['TS0121'],
model: 'TS0121',
description: '10A UK or 16A EU smart plug',
supports: 'on/off',
vendor: 'TuYa',
fromZigbee: [fz.on_off, fz.metering_power, fz.electrical_measurement_power],
toZigbee: [tz.on_off],
meta: {configureKey: 4},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering', 'haElectricalMeasurement']);
// Return UNSUPPORTED_ATTRIBUTE upon reading divisor/multiplier
endpoint.saveClusterAttributeKeyValue('seMetering', {
divisor: 100,
multiplier: 1,
});
await readEletricalMeasurementPowerConverterAttributes(endpoint);
await configureReporting.activePower(endpoint);
},
}, |
Gives:
|
And: {
zigbeeModel: ['TS0121'],
model: 'TS0121',
description: '10A UK or 16A EU smart plug',
supports: 'on/off',
vendor: 'TuYa',
fromZigbee: [fz.on_off, fz.metering_power, fz.electrical_measurement_power],
toZigbee: [tz.on_off],
meta: {configureKey: 4},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering', 'haElectricalMeasurement']);
// Return UNSUPPORTED_ATTRIBUTE upon reading divisor/multiplier
endpoint.saveClusterAttributeKeyValue('seMetering', {
divisor: 100,
multiplier: 1,
});
await configureReporting.activePower(endpoint);
},
}, |
Gives:
|
do you get any power values when now attaching a load to the plug? @piotrekoo do you get the same error? |
I have just update from my previous dev branch to the master 1.15.0 version...and my three BW-SHP13 disappear from my Devices.....should I switch to dev branch? |
I also had connection issues, switching to the dev branch solved my issues. |
1.15.0-dev? a few days ago I tried with no luck |
I am not a programmer and I do not understand your conversation above exactly. So it is possible to get the kWh or Wh etc meassurement attribute from the socket or not? I am using zigbee2mqtt in Home assistant. |
In short. |
Short question: How :) |
I can confirm power measurement is working for me after updating to zigbee2mqtt 1.16.0! Thanks guys. |
will this work with HA and Deconz Conbee ii? I am interesting to buy 2-3 plugs |
Hey guys, Is the poll_interval still only at dev branch or also on master? |
Also master |
Thank you for new support of power metering. Any idea how to reset the meter to zero please? |
Where do I set measurement_poll_interval ? |
|
Sorry, I am new in Zigbee2mqtt. |
So you need to set it for every device where needed. |
Please can you explain step by step? I need to delete and add again? When I need long press? When the device was added as unsupported or when? |
From logs: Why it "Failed to interview"? Please, help! |
Steps I've done successfully:
|
I changed the channel from 11 to 25 in Zigbee2mqtt addon configuration and all is working OK now! |
would polling every second have significant downsides?
|
Power consumption should be nearly the same. |
because polling every 10 seconds might lead to inaccurate measurements imho. |
As you can see in the initial comments around the time support has been added, these plugs are not really reliable for accurate power measuring. You will see suggestion to allow for some sort of calibration as the measurements where off quite a bit for these plugs. So, given this information I would bother too much on 1 vs. 10 sec difference and its inaccuracy. These are not high-grade calibrated plugs and information coming from these should be considered as "nice to know" rather than "guaranteed facts" imho. |
Hey guys, sorry for the hijack: Does these plugs support grid frequency measurement by any chance? :) |
No it doesn't. |
Received the new Blitzwolf BW-SHP13 smart plugs today so I was starting up the procedure for adding the support (https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html).
Upon pairing they got recognised as TuYa TS0121. I did not test them further but from https://www.zigbee2mqtt.io/devices/TS0121.html it already becomes clear it does not support electricity monitoring. Please instruct me how to proceed.
Received Zigbee message from 'ac', type 'attributeReport', cluster 'seMetering', data '{"currentSummDelivered":[0,431]}' from endpoint 1 with groupID 0
The text was updated successfully, but these errors were encountered: