Comments (4)
I've never seen a fragmented payload. The largest response is the accessory database and it came in at 1108 bytes. We might have to wait for a device with multiple accessories or more services and characteristics to see what happens when it crosses ~1500 bytes. The Thread network fragments to ~100 bytes and the Border Router reassembles so maybe we would just get a big payload split across a few UDP packets...
I don't mind coding defensively on the decode, starting with 3 bytes & only decoding the length if present. Yeah, I'm not super happy with it, I was trying to find a way to decode multiple good PDUs that have an "invalid request" PDU in the middle & communicate that error condition back up among the good data. I thought I saw that behavior at some point though I can't find an example in my current dev log. Both the Home app and Nanoleaf app send multiple requests in a single payload which might be a difference to BLE?
from aiohomekit.
Yeah, you can't batch requests payloads with BLE. You have to know the right characteristic GATT endpoint to write to AND know the iid as well, so each PDU goes to a different GATT endpoint.
I guess if you have multiple PDU's in a single UDP packet the body length is actually mandatory? Otherwise how do you know if you've found a body or the next PDU payload. And it wouldn't make sense to have different behaviour for the last PDU in a payload.
from aiohomekit.
I could just stick with bytes | PDUStatus
and synthesize a PDUStatus for the tid
mismatch and bad control
conditions. That's slightly less gross.
from aiohomekit.
I was wondering the same thing, maybe make the value outside the range of a u8 so it doesn't clash in future?
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.