Giter Club home page Giter Club logo

Comments (7)

cdealti avatar cdealti commented on August 15, 2024

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.

presslab-us avatar presslab-us commented on August 15, 2024

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.

cdealti avatar cdealti commented on August 15, 2024

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.

presslab-us avatar presslab-us commented on August 15, 2024

Commit changing the default timeout: 7c45f05

from zigbee4java.

cdjackson avatar cdjackson commented on August 15, 2024

Hey Ryan. As a matter of interest, does this help with your devices or do you still get timeouts?

from zigbee4java.

presslab-us avatar presslab-us commented on August 15, 2024

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.

presslab-us avatar presslab-us commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.