-
-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added parse_data service #572
Conversation
Send RAW HCI packet data to the BLE Montitor integration, used by ESPHome [BLE Gateway](https://github.com/myhomeiot/esphome-components#ble-gateway)
Nice work, I will try to test is a.s.a.p. If I understand it correct, you use an ESPHome device to receive BLE messages and than broadcast the same data again? So it is working as some kind of "range extender". Just curious, what is the benefit of this, ESPHome is also capable of processing this data to ESPHome sensors, isn't it? One of the advantage I can think of myself, BLE monitor is supporting more sensors. than ESP Home. But are there other advantages?. I'll look into the user permission check, thanks. |
ESPhome device receives BLE advertisement, and without further processing sends it via the local network (WiFi) to HomeAssistant, where ble_monitor parses it. Cool solution! For example, in this way, you cannot have a bluetooth interface at all on the HA host, but catch the data with ESP32 boards scattered around the rooms. |
It's not urgent at all, so take your time ;-) Most users which want to test it and use already did it manually with this PR. Yes, I use ESPHome devices to receive BLE messages, add HCI header and send it by WiFi to Home Assistant and your integration. Yes, ESPHome can process BLE messages but has a limited devices support. Unload BLE processing to external component helps to free the ESP memory. BLE stack in ESPHome use relatively huge amount of RAM and sometimes if you have on top of BLE stack 10-15 BLE sensors components its start reboot spontaneously. BLE Gateway it's a one components with low code and memory footprint which process data from all sensors. Sure in the case when ESP, for example, control the heater for reliability you should have temperature reading on board and this is not a solution. But in case when your heater connected to Home Assistant or in case when you just need extend BLE coverage it's a better solution. But, for my opinion the main pain with regular ESPHome BLE sensors components (why I create BLE Gateway component) that if you have BLE device which moves from area to area you should have BLE sensor component for this device at the all ESPHome devices. In this case in Home Assistant you will have all these sensors entities from all ESPHome devices :-) |
Exactly ;-) |
I tried to add your suggestion about the user permission check, But I get the following error. Most likely, as we have defined in in
|
I added the page here, https://custom-components.github.io/ble_monitor/parse_data Could you check if you want some more info? I have an issue with the automation example, to put it in the docs, the jekyll docs are hiding everything between double |
I will try to implement this and will make PR.
I can try, if you make small sketch with list of points which you think should be explained. |
I already made a first start of the page, I think the page should explain what the service does and how it can be used. I would only explain the BLE monitor side here, and provide some links to your ESPHome BLE gateway. You can just edit the page here The final result is displayed here, about a minute after you upload changes. |
Yes, it's look more challenged and requires lot of changes. If you like Nabucasa way and when you have the inspiration to do refactoring you can do it as they suggest. Thanks you for your work! |
6.2.0 has been released |
Thanks you! |
Send RAW HCI packet data to the BLE Montitor integration, used by ESPHome BLE Gateway
We discussed this here
This code tested and fully working but I will be glad if you take a look into
async_parse_data_service
function and change it as you think it's should be.Thanks in advance!
PS: You can also add user permission check for service calls to prevent regular users calling services, by changing
to
As example in my integration I did it in this commit