Comments (8)
Well, changing ACK_TIMEOUT
from 2.0 to 12.0 didn't seem to help this particular user. I need to order a few sleepy Thread devices so I can get this sorted out.
from aiohomekit.
Wemo Stage and Eve Thermo are the sleepy HAP devices I'm testing with FWIW.
from aiohomekit.
As I said in ^, bumping ACK_TIMEOUT to 10 has got rid of thousands of "Received Type.ACK from but could not match it to a running exchange" warnings in my logs.
Looking at https://github.com/chrysn/aiocoap/blob/419c88cb7bec693f3c33b188a8e394e6666983c5/aiocoap/messagemanager.py#L215, they were caused by original transmission and the retransmission sharing an entry in self._active_exchanges
. If both are ACK'd, original will clear the entire in active exchanges first, then the retransmission won't be able to find itself in active exchanges any more, causing that log spam.
So I think even if its not the root cause for your user, its something we need to resolve as that error message is very common and comes up a lot in HA tickets.
from aiohomekit.
I need to read the Thread spec to see how much buffering is allowed for sleepy devices. Bumping the timeout for connections to sleepy Thread devices would probably be an OK fix. Handling re-transmit ACKs per the COAP protocol spec would also be a good fix.
from aiohomekit.
I think we want both - it seems daft (and wasteful) to retransmit when we know sleepy thread devices will "timeout" half the time.
But equally if it's valid to ACK a retransmission and the original then aiocoap should be silently handling that.
from aiohomekit.
(But yes, I plucked 10s out of the air, we should use something closer to the spec - I thought it was 5s but haven't checked)
from aiohomekit.
This has been said in other tickets, but duping here.
Latest aiocoap should no longer RST in violation of spec and makes re-transmit dupe ACK's less noisy in the logs. They do however still generate noise, so we need to handle the timeouts and make them longer than the sleep interval of the device.
Sleepy devices I have do sleep for 5s, however it's set by a characteristic called "Sleep Interval". So we need to tune the retry interval per endpoint, respecting that char.
from aiohomekit.
chrysn/aiocoap#294 will let us avoid re-transmits during a sleepy devices sleep interval. We'll probably want a TransportTuning
per connection, and we should use the "Sleep Interval" characteristic value if its available to configure it.
from aiohomekit.
Related Issues (20)
- Don't fetch programmable switch events on reconnect without getting a GATT notify for them HOT 5
- There is a race where we can be waiting for the device to be detected at startup and we get it more than once because we don't clear it before its detected again
- Fetching friendly_name does a linear search
- Using aiohomekit standalone: transport not supported HOT 2
- Eve Degree: Various BLE errors HOT 1
- asyncio.exceptions.TimeoutError during zeroconf search needs to be re-raised as AccessoryNotFoundError
- Log says "pairing established" but any interaction throws "is no known alias" HOT 4
- `first` to get accessory_info at startup is unexpectedly expensive
- Connection refused HOT 2
- BLE Pairing can fail due to race
- BLE callbacks can error if a device is unpairing because the cache has been deleted
- Missing Service cache clear is missing from pairing process
- Many callback to Called async_set_available_state with True at startup HOT 1
- Video & Intercom Doorbell in HA HOT 6
- BLE Events might still be read when processing disconnected notifications
- Out of order pairing steps when using HomeSpan (async race condition?) HOT 15
- Disconnect during operation can result in an empty event
- Implement happy eye balls with aiohappyeyeballs HOT 1
- Consider lowering the Happy Eyeballs delay to 0.1 from 0.25
- Add support for link local ipv6 addresses now that we have Happy Eyeballs HOT 1
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 aiohomekit.