-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Ubisys C4 UNSUPPORTED_ATTRIBUTE on writing configure_device_setup #2552
Comments
I just tried it on some of my S1 and S2, it now also gives UNSUPPORTED_ATTRIBUTE. I have also updated those. |
Unfortunately I currently do not have an environment at hand to test this myself, but would you be able to provide logs containing the ZigBee bytes (including header) being sent? From the back of my head I think I remember that the ubisys devices used to be quite picky on whether the manufacturer specific bit in the ZigBee header needed to be set or needed not to be set and that this behavior even was not always aligned with the official ZigBee ZCL specification. Therefore it could also be that something within z2m has been changed in the meantime to do things right but that this now leads to problems with the ubisys devices (who might expect this to not be done "right")... |
So send the same command while having wireshark running to check the payload? |
This comment has been minimized.
This comment has been minimized.
Seems the old saying is right, 3rd try I got both. The write
The response:
|
@sjorge Thanks! The dump shows that the bit "Manufacturer specific" is set in the ZCL frame control field (0x14) and that the manufacturer code also gets sent in the ZCL header (which needs to be done if the bit is set). And looking at some of my older notes and also at this issue here it seems that ubisys will really only accept the write attributes command when the flag has not been set (which probably used to be the case or at least used to be possible in the past). Also, I already tried to contact ubisys twice on this incompatibility, but I never received any response from them - so I guess there is very little chance that they will ever change this. @Koenkk Do you see any chance to send a write attributes command to a non-standard cluster without the ZCL manufacturer bit being set in the header from the converters? This is the line where it currently happens: zigbee-herdsman-converters/converters/toZigbee.js Lines 3248 to 3249 in f67c255
Sorry for asking without searching through the code more thorougly myself, but due to the current pandemic situation here in Germany with two little kids, home-schooling and a full-time job my time is unfortunately very, very limited at the moment. |
Yeah from my experience they are usually quick to verify something is wrong or broken, but don't actually fix it. (.e.g. genOnOff.startupOnOff is broken when the input is configured a momentum switch but works OK when using it as a normal switch) ... although it is also a hit and miss on getting a response at all when writing to them in English.
Understandable! Good luck. https://github.com/Koenkk/zigbee-herdsman/blob/be70088a148f9cb7fea9dcc2d81fd4851d0dc8f3/src/controller/model/endpoint.ts#L272 seems to indicate we can send an options param and perhaps set manufacturerCode but I don't see how we can unset it. I think the lookup for manuSpecificUbisysDeviceSetup would also fail then. |
You could try to pass an options object with a manufacturerCode property set to 0 (zero) or null - that might work (the options properties are added to the defaults with the … operator, so the mere presence of the property should override the defaults). The cluster lookup seems to be performed without any reference to the manufacturer (but in contrast return the default manufacturer code to be used), so that could still work. |
That didn't seem to help
The line now reads
When I did the same for the reads, i now tries to use |
That being said... it did seem to have applied the change to the C4...
And it was able to read the data, @Koenkk do we somehow need a extra flag we still use the manufacturerCode to find the right info in cluster.ts but send it without the value set like Felix sugested? |
The As for interpreting the response with the correct cluster, this had never really worked (also discussed in Koenkk/zigbee-herdsman#52). The problem is - AFAIR - that zigbee-herdsman can only use information directly contained in the response packet to lookup the correct cluster structure and name and assign it to the cluster id in the packet (i.e. it has no idea that 0xfc01 sometimes means "ubisys" and sometimes "philips"). And as the ubisys devices respond without a manufacturer id (which is correct if the request also did not contain one) zigbee-herdsman probably just takes the first cluster where the number matches (at least it used to be like this when I implemented it last year). So my suggestion would be the following:
Does that sound ok? And would you be able to create a pull request with these changes? |
Another note: The code that deals with the ubisys J1 (i.e. calibration) does not need the modification as it accesses custom attributes inside a standard cluster and ubisys requires for the manufacturer id to be sent in the packet for these operations. |
Taking a look at this now, I only have S1, S2 and C4 as of now. |
Would it be possible to expose those settings to the frontend, or would that be a lot of extra work? |
AFAIK there is no way to describe an array of objects, where the objects have a set of flexible attributes. |
Seems to work, I reconfigured all my S1, S2 and C4 by adding 'no_onoff', that is how i noticed it was broken in the first place, trying to change that :) |
@felixstorm I got a C4 to play with, but it's not taking the configuration of the inputs, it gives UNSUPPORTED_ATTRIBUTE. After that, the device is 'bricked' until it is power cycled.
I have not yet upgraded the device, I will do so and try again.
Edit: there was no update available, so maybe they changed how this works on the newer firmwares?
The text was updated successfully, but these errors were encountered: