-
Notifications
You must be signed in to change notification settings - Fork 530
DDF : add support for Innr 250 #6667
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
Conversation
Note you can use a hack in DDF to make this automatic. By adding a bogus item (any numeric item that isn't already used) and add zcl read/write functions and interval to it to set the value, the write function just returns 63. Then set the item to It's not pretty but works, I've used that for another device ;) |
|
Ha ? you have the device link ? And it's "deconz rules" compliant ? |
|
This happens in deconz-rest-plugin/device_ddf_init.cpp Lines 247 to 277 in d66b6c8
If I remember correctly it's at least used by the Philips Hue Dimmer to write initial attributes of the manufacturer specific cluster. Initially with the default value from the DDF and if the item is changed later on via API, on successive deCONZ starts the new value is taken as it's loaded from the database. Quite handy... |
|
I don't found the sample, but If I have understand need to use something like : But I don't understand why it don't make that for all "write" field ? (I don't see what is the specific thing we need to use in the DDF compared with classic "write" command that don't need to be used at start) |
|
This is only a special case which doesn't need any extra C++ code. It's a bit difficult to describe, but basically if a item has a default value and has a write function this code will trigger on startup. |
A right, have forget that, so the "magic" code need to be |
|
Ok so not working, IDK what is missing ? |
|
Use the Force, Luke ^^
|
|
@SwoopX You think it's because of the missing "read" one ? from the code it look only for the write ? Perhaps with a "state.timeout" ? |
|
@Smanar Even better, I know it. The state machine just acts upon known states and since you never read, you have an undefined state and nothing will ever happen. |
|
Ok so we give up with the automatic attribute write. Don't want to work. |
|
@Smanar I'm afraid you overlook the obvious and I haven't paid any attention to what attribute/cluster you're working with I have to say. Write functions do the obvious (quelle surprise 🙂). For the internal state machine to work, the bare minimum is a parse and write function (that case assumes the device sends reports)! |
|
So to resume you mean we need to use parse/read/ and write, to use this feature ? But I don't need pool or interpret report, and from the code it check only for write, but can make a test. |
Yes, indeed.
You absolutely need it, as explained above. All posts in this PR are about automatically setting a certain value, right? |
Yeah, but only at inclusion. |
|
Right. And it also fires upon deconz restart... As we do not have anything like "do stuff just once", a refresh interval of 86400 is kind of a compromise to "just do it once a day". As I recall, I also had a use case for completely prohibiting any polling with something like |
This device is a router, not a problem, and with a refresh interval of 86400 .... Need to test it now |
|
Is the PR ready to merge yet? |
|
Yep, users still need to use the GUI to enable it, but the DDF is working. |
Ok so long story, with the @Idaho947 help, see #6618
This device can work with button map, but not possible for all buttons, thoses one just cycle some vlaues.
@kasteleman that know a lot this device have found a solution.
Need to use the GUI, to update the attribute 0x0004 in the cluster 0xfd01 with the value 63
After that the device use the special cluster to send special command. So the DDF can work without the buttonmap file.
The manufacture number of the device is 0x1166 but need to use 0x1169 in the request .....