Comments (7)
Note that in the ZigBee Pro stack profile the MAC of the router is buffering the indirect transmissions addressing sleeping end devices (aka rxOnWhenIdle=false) for exacly 7.5s. After this interval an indirect message is purged by the router.
So if you send a message, say from the coordinator, to a sleeping end device, the device might not be able to extract the message from its router via a poll, unless it polls its router with a period <= 7.5s which the HA profiles spec does not allow and would waste too much energy on the device.
In my experience battery powered devices cannot normally poll their routers at these rates due to energy constraints, so you cannot talk to a device at any time.
Instead, these device can be configured to report (some of) their attributes to the coordinator with a long period, say once every 10 minutes. Usually, the device's stack will poll it's router shortly after sending the report. maybe to receive an application acknowledge from the coordinator.
This will be the time to try to talk to the device and you must do that readily. In the meantime, the messages to be delivered to a sleeping end device must be buffered by the sender because the device's router cannot buffer them for more than 7.5s.
On the reply timeout you should choose a value > 7.5s. Waiting much more time is not needed if the route to the device already exists.
Regards,
Cristiano
from zigbee4java.
Thanks for the info! So perhaps a value of 8 seconds makes sense; this will allow the end device to poll the router for a message (which it must do within 7.5 seconds), process it, and send a reply.
I know some end devices poll much faster when first powered up, or joined, so as to receive any configuration messages. But sending a request when the device sends it's attribute change is an interesting idea. Maybe sometime in the future there could be an API for this where zigbee4java queues the message until it sees something from the device and then immediately sends it.
Does anyone see a problem with increasing the default timeout to 8 seconds? Hopefully this will fix the communication problems with end devices that poll frequently, like mine which poll every 5 seconds.
Thanks again,
Ryan
from zigbee4java.
The original zb4o had configuration properties for these timeouts. I haven't looked to zb4j yet but I expected these were not hardcoded.
from zigbee4java.
Commit changing the default timeout: 7c45f05
from zigbee4java.
Hey Ryan. As a matter of interest, does this help with your devices or do you still get timeouts?
from zigbee4java.
Yes it certainly seems to have helped. I have played around with my battery powered end devices in the console for about an hour and I did not see any timeouts, where previously I would get timeouts and no ack. I still get "BROKEN ZIGBEE UNDERSTANDING" but this seems unrelated.
All three of my battery end devices poll at 5 seconds. As mentioned above if a device polls at longer than 7.5 seconds those devices will need to be handled in a different way.
from zigbee4java.
I did find a different timeout that was also 5 seconds: 6426a57
This should probably use the DEFAULT_TIMEOUT but for now I just changed it to 8 seconds also.
from zigbee4java.
Related Issues (20)
- Remove serialisation from library
- Library hangs on shutdown HOT 1
- Code styling HOT 2
- Error in zcl lib definition
- Hue Tap support HOT 3
- MoveToLevel command
- Error in zigbee api ( reporting command) HOT 2
- Support for REX3S - Zigbee module HOT 1
- Xiaomi Aqara temperature humidity sensor HOT 11
- Issue regarding Dongle Reset
- Zigbee console join enable / disable reports error HOT 2
- Serial port error with Windows 10 HOT 1
- sendSynchrouns(hwDriver, request, RESEND_TIMEOUT) = null in windows 10 HOT 4
- RESEND_TIMEOUT_DEFAULT too short HOT 2
- Help needed - ZigBeeNetworkManagerImpl - Unable to reset dongle HOT 4
- CC2531 Dongle becomes unresponsive if restart occurs right after SYS_RESET
- ZigBeeConsole Slack Bot example available
- "quit" commad can't quit the console application HOT 2
- Console: removing device from network
- Split between packages? HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zigbee4java.