ble_monitor icon indicating copy to clipboard operation
ble_monitor copied to clipboard

[New Sensor]: HolyIOT BLE tracker

Open fokcuk opened this issue 1 year ago • 29 comments

Sensor Description

BLE tracker

Additional information

https://www.aliexpress.com/item/1005003211033416.html?spm=a2g0o.productlist.main.9.5c0b315cxrUJH1&algo_pvid=3ef75d81-8d09-43ac-9b6d-53b3a4b4aa35&aem_p4p_detail=202305252017357354224051675580003716456&algo_exp_id=3ef75d81-8d09-43ac-9b6d-53b3a4b4aa35-4&pdp_npi=3%40dis%21AUD%2111.16%2111.05%21%21%21%21%21%402102186a16850710553228488d077f%2112000030168733162%21sea%21AU%21119444967&curPageLogUid=quf1qexyVhHq&p4p_pvid=202305252017357354224051675580003716456_1

BLE advertisements

2023-05-26 11:30:17.201 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'type': 'iBeacon', 'packet': 'no packet id', 'firmware': 'iBeacon', 'data': True, 'rssi': -78, 'mac': 'C6B545F6F18E', 'uuid': '9976aed5f58c49af85ebd0ac7281e3f6', 'tracker_id': b'\x99v\xae\xd5\xf5\x8cI\xaf\x85\xeb\xd0\xacr\x81\xe3\xf6', 'major': 10011, 'minor': 19641, 'measured power': 36, 'cypress temperature': 80.13515625, 'cypress humidity': 31.109375}

fokcuk avatar May 26 '23 03:05 fokcuk

0x0201061AFF4C0002159976AED5F58C49AF85EBD0AC7281E3F6271B4CB9240D0962696E2D747261636B657200101642524164C6B545F6F18E0606060000

fokcuk avatar May 26 '23 03:05 fokcuk

Screenshot_20230526_115253_nRF Connect

fokcuk avatar May 26 '23 03:05 fokcuk

Screenshot_20230526_150157_nRF Connect Highlighted is the part that is changing when either button is pressed: 601 or vibration is detected: 401 Not sure which one is battery

fokcuk avatar May 26 '23 07:05 fokcuk

Based on your info, I think is should be something like this 101642524164C6B545F6F18E0606060100

10 = length (in hex) = 16 bytes 16 = 16 bit uuid 4252 = UUID (0x5242) (read backwards per byte) 4164C6B545F6F18E0606060000 = data

Data 41 = device type? 64 = battey? (64 in hex = 100 --> 100%) C6B545F6F18E = MAC address 0606 = ? 06 = measurement type (06 = button, 04 = vibration, ....) 0100 = measurement (read backwards per byte, so, 0x0001 --> 1 = True, 0x0000 = Off

Ernst79 avatar May 26 '23 08:05 Ernst79

Sounds good to me =) can we please add it?

fokcuk avatar May 26 '23 09:05 fokcuk

Sure, will do that somewhere in the coming days

Ernst79 avatar May 26 '23 09:05 Ernst79

Legend! Is there a way to incorporate a dynamic sensor setup based on the data received? Something like settings menu where you can define how the data is translated?

fokcuk avatar May 26 '23 09:05 fokcuk

No, that is not possible. Why would you need that?

Ernst79 avatar May 26 '23 10:05 Ernst79

Can you please try 12.0.1-beta. It should add support for the vibration sensor and button (as remote single click binary sensor)

Ernst79 avatar May 28 '23 21:05 Ernst79

Nothing has changed. No extras and no battery state

fokcuk avatar May 29 '23 00:05 fokcuk

Sorry, I think I used the wrong branch. Can you try again with the 12.0.2-beta release?

Ernst79 avatar May 30 '23 09:05 Ernst79

Still nothing Screenshot_20230530_174711_Home Assistant

fokcuk avatar May 30 '23 09:05 fokcuk

hmmm, it is recognized as a iBeacon. No additional sensor with a MAC address C6B545F6F18E?

The tricky thing with iBeacons is that they rotate their mac address. Can you make some longer log, like you did in your opening post?

2023-05-26 11:30:17.201 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'type': 'iBeacon', 'packet': 'no packet id', 'firmware': 'iBeacon', 'data': True, 'rssi': -78, 'mac': 'C6B545F6F18E', 'uuid': '9976aed5f58c49af85ebd0ac7281e3f6', 'tracker_id': b'\x99v\xae\xd5\xf5\x8cI\xaf\x85\xeb\xd0\xacr\x81\xe3\xf6', 'major': 10011, 'minor': 19641, 'measured power': 36, 'cypress temperature': 80.13515625, 'cypress humidity': 31.109375}

Ernst79 avatar May 30 '23 09:05 Ernst79

This one does not change the MAC The device is a beacon device but with few extra sensors

fokcuk avatar May 30 '23 10:05 fokcuk

Ok, my bad. It added it further down the list, so I now have 2 devices. One with uuid in the name and the other with MAC. Vibration and battery seem to work, but button does not change

fokcuk avatar May 30 '23 10:05 fokcuk

That is because the sensor sends both iBeacon data and service data.

Not sure about the button. Can you verify that the 06 is changing when you click the button.

Ernst79 avatar May 30 '23 13:05 Ernst79

Sure does Screenshot_20230530_215910_nRF Connect

fokcuk avatar May 30 '23 14:05 fokcuk

not sure what is going wrong. If I enter your BLE advertisement in the data_parser service of BLE monitor

image

043e49020102018ef1f645b5c63d0201061AFF4C0002159976AED5F58C49AF85EBD0AC7281E3F6271B4CB9240D0962696E2D747261636B657200101642524164C6B545F6F18E0606060100CC

results in

image

Ernst79 avatar May 30 '23 18:05 Ernst79

Received documentation from HolyIOT with data info (Excel file) https://filetransfer.io/data-package/Mb95m4zz#link

They make various devices with temp/humidity etc. Can make a generic one for the whole HolyIOT selection

fokcuk avatar Jun 03 '23 04:06 fokcuk

Added all measurement types in 12.0.3-beta. Changed the remote single click to a button sensor. Can you test this version? Sensors should now be added when they are being broadcasted, so it might take a while before they all show up. You might have to delete the device first, to remove the remote single click binary sensor.

Ernst79 avatar Jun 03 '23 19:06 Ernst79

For some reason it still does not show the button =( Also, for the vibration sensor, can you assign an icon? Comes up as blank

fokcuk avatar Jun 04 '23 02:06 fokcuk

dont know what happened, but now can see the button. Enabled debug logging to see what was going on but it just started to work

fokcuk avatar Jun 04 '23 03:06 fokcuk

Hmm, strange. Try to use it for a day, just to check that it keeps on working.

I’ll add an icon for vibration.

Ernst79 avatar Jun 04 '23 07:06 Ernst79

Yeah, I have been trying it for some time. Looks good. Not sure about other sensors like temp etc as my device does not have them, but should work

fokcuk avatar Jun 04 '23 07:06 fokcuk

sorry for opening it again. did anyone got the button pres working?

botany112 avatar Feb 07 '24 20:02 botany112

the ibeacon works, but the button press doenst do anything. do i have to change anything in the app?

botany112 avatar Feb 08 '24 17:02 botany112

anybody? knows about?

botany112 avatar Feb 26 '24 19:02 botany112

You need to monitor BLE adverts from your phone. Problem is that it does not retransmit the button press for long, so if you are pressing in between the intervals that BLE monitor scan, it will not be registering. Try holding the button for a minute or whatever your scan interval is set to. That's the reason I am not using the button You may have better luck with a ble components on esp32 boards with a more frequent scans

fokcuk avatar Feb 27 '24 00:02 fokcuk

thank you. ill do it

botany112 avatar Feb 28 '24 19:02 botany112