Conversation
|
@Koenkk any initial thoughts on this? |
|
@Nerivec similar to groups, I agree this also deserves to be in zigbee-herdman indeed, code looks good to me! |
61388f7 to
8ea3db6
Compare
766071e to
5c433fd
Compare
14fc79d to
98ad154
Compare
|
@Koenkk can you take a look at the code before I start working on missing coverage? Cleaned up quite a bit, improved typing. I think it's about right? For the Z2M/ZHC update, we're going to need new MQTT API endpoints ( |
|
LGTM! Only question; how are we going to publish an updated state? Basically what is now done through the |
|
Haven't gotten that far yet. Still need to figure out the details for Z2M/ZHC... 😅 Also have to handle the transition time better I think (should not publish scene state immediately when it won't be like that for possibly several seconds). I figure some devices will already report parts of the state on their own (stuff that's configured in reporting). Have to check what they do when transition time is involved (do they publish at start or end of timer, or several times in-between). Need to de-conflict this. |
9251a50 to
b1610e6
Compare
6be3d8e to
6502c5c
Compare
9d33ebf to
27ad2f2
Compare
|
This pull request is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
|
@Nerivec are you still working on this? |
|
Not stale 🍲 |
|
Need to go back to this when I have some time. It's rather time-expensive since we need to do a lot of testing with actual devices. There are also some pretty annoying barriers to overcome due to how the codebase is designed. |
Any ideas on this one? As far as I can tell:
|
|
I see no other way than z2m storing the state on a |
|
Not sure I get what you mean. I suppose we could add a // in controller.ts `recallEndpointScene`
const sceneState = endpoint.recallScene(...);
// ...
this.selfAndDeviceEmit(device, "scene_recalled", {sceneId, groupId, transTime, sceneState});// in Z2M on `scene_recalled` event
zhc.onSceneRecalled(...);// in ZHC index.ts
export async function onSceneRecalled(...) {
// trigger fz for defined clusters/attrs
} |
|
My two cents: We should however use this opportunity to make sure that only one combined state payload per device/group is published on scene recall. |
|
What about emitting a |
|
Would work, but that's what I mentioned above, would need to recreate the whole frame for each attribute of each cluster ( zigbee-herdsman/src/controller/controller.ts Lines 1129 to 1138 in a62a4d5 |
|
That's true, for LQI just put the last reported LQI |
|
Mocking attributeReport is not doable though. Or shouldn't be done. |
I would agree with this assessment. |
Move scene handling to ZH (spec).
Main goal is to better sync state/scenes so we don't get as many mismatches in e.g. frontend.
barrierControl&hvacThermostatclusters with respective scene-capable attributes (per R8 spec)clusterscache)clusterscache) from sceneviewcommand to save "as it is on device" [subject to change, may not be necessary, needs actual tests]viewrequests required otherwise).meta.scenesto.scenesfor databaseendpoint.clustersclone in Device (no cloning needed at all).TODO:
CC: @MfCrizz