Skip to content
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

Question: fromZigbee.js type 'devChange' vs. 'attReport'? #289

Closed
felixstorm opened this issue Feb 19, 2019 · 3 comments
Closed

Question: fromZigbee.js type 'devChange' vs. 'attReport'? #289

felixstorm opened this issue Feb 19, 2019 · 3 comments

Comments

@felixstorm
Copy link
Sponsor Contributor

When trying to take first steps to implement support for ubisys J1 (window cover) devices, I noticed that I get identical notifications of type 'devChange' and 'attReport' whenever an attribute configured for reporting changes.

2/18/2019, 9:39:54 PM - warn: No converter available for 'J1' with cid 'closuresWindowCovering', type 'attReport' and data '{"cid":"closuresWindowCovering","data":{"currentPositionLiftPercentage":0}}'
2/18/2019, 9:39:54 PM - warn: No converter available for 'J1' with cid 'closuresWindowCovering', type 'devChange' and data '{"cid":"closuresWindowCovering","data":{"currentPositionLiftPercentage":0}}'

What is the difference between the two and which one would you suggest I implement (and probably ignore the other)?

Thanks,
Felix

@Koenkk
Copy link
Owner

Koenkk commented Feb 20, 2019

I could be wrong, but AFAIK attReport event is always generated when a device reports a message, devChange only when the values change.

I would recommend to base your converter on attReport

@dlashua
Copy link
Contributor

dlashua commented Feb 20, 2019

attReport events happen on attribute changes when device.report() has been issued. devChange happens as a response after you write an attribute, when you specifically read a particular attribute, or when the device decides to send it to the coordinator even though it hasn't been specifically requested.

To be as comprehensive as possible, there is also statusChange which doesn't seem to be documented on the zigbee-shepherd wiki but is the message type you get from a report after using the enroll procedure. To my knowledge, this only happens with ssIasZone cids, but, I could be wrong.

@felixstorm
Copy link
Sponsor Contributor Author

@Koenkk , @dlashua - thanks for your answers and also thanks for pointing me at the zigbee-shepherd wiki again. I had been looking for it before, but had only checked the local version, but not the one at zigbeer which does provide all the information I was looking for.

xmow49 pushed a commit to xmow49/zigbee-herdsman-converters that referenced this issue Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants