Comments (7)
It would save some bytes from the advertisements, as as one doesn't have to include the name anymore.
However, wouldn't this change force a sensor device to keep it awake all the time? It needs to be able to receive a request for its characteristics, so it can't go into a deep sleep, like the b-parisite sensors do, if I remember correct @rbaron
from bthome.io.
We could also interleave the advertisements to send this hourly and on first boot so we don't have to make a connection very often. Once it does makes a connection it never has to do it again.. or not at all if it saw it boot (also would handle passive only ones).
from bthome.io.
Maybe a different idea, if we include 2 bytes device_flag
, we can add the above device characteristics in the code directly. This would add two bytes, but it saves al least 3 bytes of the name advertisement (len byte + name flag (0x09) + the actual name). Moreover, it would remove the need to make an active connection.
The only downside I see is that a user has to make a request to have its device_flag added to the code. But we can allow the old way as well (without device_flag, but with name).
e.g.
device_flag= "0x34AB" --> {
"name": "b-parisite",
"model": "plant sensor v1",
"manufacturer": "rbaron",
"firmware": "b-parasite firmware",
"firmware version": "2.0",
"broadcasting_interval": 600,
}
from bthome.io.
I guess bdraco's idea of transmitting device info once an hour works too. It's just a bid annoying because Home Assistant will need to allocate the device and it won't know the name.
from bthome.io.
That is why I propose to add a 2 byte device_flag
in each message. In that way, each message has the device info (which we store in bthome-ble pypi package) linked to the device_flag
bytes (2 bytes).
No need to send the name info anymore than, so in the end it would safe bytes, and we can define all the info in the bthome-ble parser pypi package we want.
Xiaomi does the same, they also have a 2 byte device identifier in the payload.
from bthome.io.
As discussed on discord, we abandoned the idea of a device_flag
with 2 bytes that identify predefined devices and will define a device_info_available flag
to tell that device information is available as GATT characteristic. The (yet to be defined) GATT characteristic(s) holds device information and (if safely possible) the 16 byte encryption key.
Example is the pvvx ATC firmware, that also holds device info and keys, that can be read after connecting to the device
https://github.com/pvvx/ATC_MiThermometer#control-function-id-when-connected
from bthome.io.
Moved the issue to the Bluetooth-Devices/bthome-ble repo. Bluetooth-Devices/bthome-ble#25
from bthome.io.
Related Issues (15)
- Allow to communicate sleep time HOT 2
- New BTHome Project HOT 2
- bthome and android mac address randomization HOT 3
- Optimize data payload HOT 12
- Typo in `format.html` example HOT 1
- sensor update only once HOT 4
- Please define upper bound for door/garage door/window HOT 1
- ShellyBLU button 1 empty log HOT 4
- BT home misses packages from Shelly BLU devices HOT 1
- Support buttons HOT 19
- Use single UUID and add versioning HOT 1
- Allow types to be specified multiple times HOT 2
- v1.1
- Add support for tags 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 bthome.io.