custom-components / ble_monitor

BLE monitor for passive BLE sensors
https://community.home-assistant.io/t/passive-ble-monitor-integration/
MIT License
1.91k stars 247 forks source link

[NEW SENSOR] PT216 & PT19DB-2 #1057

Open Liionboy opened 1 year ago

Liionboy commented 1 year ago

Device Name: SDK20 Device Address: DC:23:4E:DA:7D:AF

Services:-------------------------- GAP (00001800-0000-1000-8000-00805f9b34fb) Device Name (00002a00-0000-1000-8000-00805f9b34fb) Appearance (00002a01-0000-1000-8000-00805f9b34fb) Peripheral Preferred Connection Parameters (00002a04-0000-1000-8000-00805f9b34fb)

GATT (00001801-0000-1000-8000-00805f9b34fb) Service Changed (00002a05-0000-1000-8000-00805f9b34fb)

Device Information (0000180a-0000-1000-8000-00805f9b34fb) PNPID (00002a50-0000-1000-8000-00805f9b34fb)

Unknown service (0000fd50-0000-1000-8000-00805f9b34fb) Unknown characteristic (00000002-0000-1001-8001-00805f9b07d0) Unknown characteristic (00000001-0000-1001-8001-00805f9b07d0)

Ernst79 commented 1 year ago

Please follow the instructions to find out if this device sends passive BLE advertisements. You now gave the gat characteristics, which requires a connection (which isn’t possible with BLE monitor)

Liionboy commented 1 year ago
2022-11-23 22:29:41.113 INFO (MainThread) [custom_components.ble_monitor] Attention! Option report_unknown is enabled for sensor with id(s): ['DC234EDA7DAF']
2022-11-23 22:29:46.948 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:29:55.599 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:29:58.648 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:30:00.699 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:30:10.973 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2022-11-23 22:30:17.554 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:30:21.099 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:30:30.749 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:30:36.299 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
Liionboy commented 1 year ago
2022-11-23 22:29:41.113 INFO (MainThread) [custom_components.ble_monitor] Attention! Option report_unknown is enabled for sensor with id(s): ['DC234EDA7DAF']
2022-11-23 22:29:46.948 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:29:55.599 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:29:58.648 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:30:00.699 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:30:10.973 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2022-11-23 22:30:17.554 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:30:21.099 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:30:30.749 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:30:36.299 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:31:09.000 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:31:25.280 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:31:44.610 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:31:47.160 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:31:53.320 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:31:59.410 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:32:11.160 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:32:19.211 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x14\x16P\xfdH\x80@\x00\x00\x19\xb9\x05r8\x8a\xc9\x82\x8c\x954\xad']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:32:19.610 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x14\x16P\xfdH\x80@\x00\x00\x19\xb9\x05r8\x8a\xc9\x82\x8c\x954\xad']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:32:20.310 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:32:27.461 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:32:33.066 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:32:35.611 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:32:38.266 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x14\x16P\xfdH\x80@\x00\x00\x19\xbb\xf1a\xd2=\xbdMT\x8f\x01\x00']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:32:38.466 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x14\x16P\xfdH\x80@\x00\x00\x19\xbb\xf1a\xd2=\xbdMT\x8f\x01\x00']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:32:52.021 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x14\x16P\xfdH\x80@\x00\x00\x19\xbe\x92\x81\xe5\xfb\xa4j)\xbe)_']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:32:52.931 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:32:57.527 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:33:03.126 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:33:08.721 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
2022-11-23 22:33:11.271 INFO (Thread-111) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID dc234eda7daf: service data: [b'\x0f\x16P\xfdI\x00\x00\x08\x9e\xab\xd3<<\x82HJ']manufacturer specific data: []local name: UUID16: 20733,UUID128: None
Liionboy commented 1 year ago

is ok now?

Ernst79 commented 1 year ago

Yes, this is ok, thx. I will look into it in the coming days

Ernst79 commented 1 year ago

So, a first analysis. I see a lot of messages which are exactly the same. These start with 0f

0f1650fd490000089eabd33c3c82484a

And I see some changing messages, which start with 14

141650fd488040000019b90572388ac9828c9534ad
141650fd488040000019bbf161d23dbd4d548f0100
141650fd488040000019be9281e5fba46a29be295f

So, most likely, the last messages are the messages with the data.

14 = data length (in hex) 16 = uuid 16 bit 50fd = UUID (0xFD50 = Hangzhou Tuya Information Technology Co., Ltd) 488040000019b90572388ac9828c9534ad = The actual data

488040000019 seems to stay constant.

The last part of the message seems pretty random between the different messages, except for he first byte. (b9, bb, be) Can't make much sense out of it.

Liionboy commented 1 year ago

i think it was a mistake to buy this thing from Aliexpress, i will buy another with zigbee and support -20 degree.

Thanks for answer

Ernst79 commented 1 year ago

Ok, I will than close this issue. Feel free to reopen if you find more information

hronek commented 1 year ago

I have the same sensor. Is there any chance for his support? Would it help to send some information? Which ones? Thanks

Ernst79 commented 1 year ago

We can try. Please make a similar log as above, preferably somewhat longer. I will try again to see if I can make sense of it.

a-huk commented 10 months ago

Hello, I would be interested to get this temperature and humidity sensor going. THe device is made by Tuya and work with BLE. You can add it in their app. You hold a button to put it in pairing mode, then the app connects to it and gets the temperature and humidity data from it. The device looks to be called TyOS when performing a scan on nRF Connect. The MAC address is DC:23:4F:CE:20:9C. I am not that familiar with BLE packet snniffing. I can't make much sense of the traffic in Wireshark. Here is a hcidump, I hope that it is what is needed. I did capture traffic while opening the tuya app that connected to the sensor and got data from it. The sensor was just in from of the bt usb dongle. Inside the zip is a hcidump file (--raw and written with -w) dump.zip

I would really appreciate the help, I am willing to provide all the help I can. I have several BT ad BLE dongles, can also capture on android and so on. Thank you

a-huk commented 10 months ago

This resource might also be interesting: https://developer.tuya.com/en/docs/iot-device-dev/Porting-Guide-BLE?id=Kam0xjtz4n6e0#title-2-Bluetooth%20Service%20initialization

Liionboy commented 10 months ago

https://solution.tuya.com/hardware/detail/65004

this is the chip from this device, i search but don't find anything compatible with esp

a-huk commented 10 months ago

Why esp, does it require esp

a-huk commented 10 months ago

This is some of the data advertized by one sensor: 00000100fae77a890a8a81581acdb192efe3352c 000001000c40bf83e1badf65fdd2a6901c16f958

And here for another one: 00000100c819158c5d997679faff4e2a64c40b89 00000100ec418bcd1aebf39052463131b29df1ec 0000010008fd7017e43c509dc2568deb7dabc73e

Ernst79 commented 10 months ago

related issue #1063