Skip to content

can get data from sensor,but cannot decode data #312

@zhizunbao84

Description

@zhizunbao84

i test theengs gateway with docker, and my sensor is LYWSD03MMC.
the log is like below:

DEBUG:BLEGateway:A4:C1:38:25:F4:AE:AdvertisementData(local_name='LYWSD03MMC', service_data={'0000fcd2-0000-1000-8000-00805f9b34fb': b'
@\x00\x13\x01^\x02\xa7\t\x03[\x08'}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '0
000180a-0000-1000-8000-00805f9b34fb', '0000180f-0000-1000-8000-00805f9b34fb', '0000181a-0000-1000-8000-00805f9b34fb', '00001f10-0000-1
000-8000-00805f9b34fb', '00010203-0405-0607-0809-0a0b0c0d1912'], rssi=-44)
DEBUG:BLEGateway:Sent `{"name": "LYWSD03MMC", "id": "A4:C1:38:25:F4:AE", "rssi": -44, "servicedatauuid": "fcd2", "servicedata": "40001
3015e02a709035b08"}` to topic `home/TheengsGateway/BTtoMQTT/A4C13825F4AE`


DEBUG:BLEGateway:A4:C1:38:25:F4:AE:AdvertisementData(local_name='LYWSD03MMC', service_data={'0000fcd2-0000-1000-8000-00805f9b34fb': b'
@\x00\x13\x0c\x8e\x0b\x10\x00\x11\x01'}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb'
, '0000180a-0000-1000-8000-00805f9b34fb', '0000180f-0000-1000-8000-00805f9b34fb', '0000181a-0000-1000-8000-00805f9b34fb', '00001f10-00
00-1000-8000-00805f9b34fb', '00010203-0405-0607-0809-0a0b0c0d1912'], rssi=-44)
DEBUG:BLEGateway:Sent `{"name": "LYWSD03MMC", "id": "A4:C1:38:25:F4:AE", "rssi": -44, "servicedatauuid": "fcd2", "servicedata": "40001
30c8e0b10001101"}` to topic `home/TheengsGateway/BTtoMQTT/A4C13825F4AE`


DEBUG:BLEGateway:A4:C1:38:25:F4:AE:AdvertisementData(local_name='LYWSD03MMC', service_data={'0000fcd2-0000-1000-8000-00805f9b34fb': b'
@\x00\x14\x01^\x02\xa8\t\x03^\x08'}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '0
000180a-0000-1000-8000-00805f9b34fb', '0000180f-0000-1000-8000-00805f9b34fb', '0000181a-0000-1000-8000-00805f9b34fb', '00001f10-0000-1
000-8000-00805f9b34fb', '00010203-0405-0607-0809-0a0b0c0d1912'], rssi=-44)
DEBUG:BLEGateway:Sent `{"name": "LYWSD03MMC", "id": "A4:C1:38:25:F4:AE", "rssi": -44, "servicedatauuid": "fcd2", "servicedata": "40001
4015e02a809035e08"}` to topic `home/TheengsGateway/BTtoMQTT/A4C13825F4AE`


DEBUG:BLEGateway:A4:C1:38:25:F4:AE:AdvertisementData(local_name='LYWSD03MMC', service_data={'0000fcd2-0000-1000-8000-00805f9b34fb': b'
@\x00\x14\x0c\x8e\x0b\x10\x00\x11\x01'}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb'
, '0000180a-0000-1000-8000-00805f9b34fb', '0000180f-0000-1000-8000-00805f9b34fb', '0000181a-0000-1000-8000-00805f9b34fb', '00001f10-00
00-1000-8000-00805f9b34fb', '00010203-0405-0607-0809-0a0b0c0d1912'], rssi=-44)
DEBUG:BLEGateway:Sent `{"name": "LYWSD03MMC", "id": "A4:C1:38:25:F4:AE", "rssi": -44, "servicedatauuid": "fcd2", "servicedata": "40001
40c8e0b10001101"}` to topic `home/TheengsGateway/BTtoMQTT/A4C13825F4AE`


DEBUG:BLEGateway:A4:C1:38:25:F4:AE:AdvertisementData(local_name='LYWSD03MMC', service_data={'0000fcd2-0000-1000-8000-00805f9b34fb': b'
@\x00\x14\x01^\x02\xa8\t\x03^\x08'}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb', '0
000180a-0000-1000-8000-00805f9b34fb', '0000180f-0000-1000-8000-00805f9b34fb', '0000181a-0000-1000-8000-00805f9b34fb', '00001f10-0000-1
000-8000-00805f9b34fb', '00010203-0405-0607-0809-0a0b0c0d1912'], rssi=-43)
DEBUG:BLEGateway:Sent `{"name": "LYWSD03MMC", "id": "A4:C1:38:25:F4:AE", "rssi": -43, "servicedatauuid": "fcd2", "servicedata": "40001
4015e02a809035e08"}` to topic `home/TheengsGateway/BTtoMQTT/A4C13825F4AE`


DEBUG:BLEGateway:A4:C1:38:25:F4:AE:AdvertisementData(local_name='LYWSD03MMC', service_data={'0000fcd2-0000-1000-8000-00805f9b34fb': b'
@\x00\x14\x0c\x8e\x0b\x10\x00\x11\x01'}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb'
, '0000180a-0000-1000-8000-00805f9b34fb', '0000180f-0000-1000-8000-00805f9b34fb', '0000181a-0000-1000-8000-00805f9b34fb', '00001f10-00
00-1000-8000-00805f9b34fb', '00010203-0405-0607-0809-0a0b0c0d1912'], rssi=-43)
DEBUG:BLEGateway:Sent `{"name": "LYWSD03MMC", "id": "A4:C1:38:25:F4:AE", "rssi": -43, "servicedatauuid": "fcd2", "servicedata": "40001
40c8e0b10001101"}` to topic `home/TheengsGateway/BTtoMQTT/A4C13825F4AE`


DEBUG:BLEGateway:A4:C1:38:25:F4:AE:AdvertisementData(local_name='LYWSD03MMC', service_data={'0000fcd2-0000-1000-8000-00805f9b34fb': b'
@\x00\x15\x0c\x8e\x0b\x10\x00\x11\x01'}, service_uuids=['00001800-0000-1000-8000-00805f9b34fb', '00001801-0000-1000-8000-00805f9b34fb'
, '0000180a-0000-1000-8000-00805f9b34fb', '0000180f-0000-1000-8000-00805f9b34fb', '0000181a-0000-1000-8000-00805f9b34fb', '00001f10-00
00-1000-8000-00805f9b34fb', '00010203-0405-0607-0809-0a0b0c0d1912'], rssi=-44)
DEBUG:BLEGateway:Sent `{"name": "LYWSD03MMC", "id": "A4:C1:38:25:F4:AE", "rssi": -44, "servicedatauuid": "fcd2", "servicedata": "40001
50c8e0b10001101"}` to topic `home/TheengsGateway/BTtoMQTT/A4C13825F4AE`

theengs gateway can not decode data to get Temperature and Humidity.
but i test with https://github.com/JsBergbau/MiTemperature2, which can get Temperature and Humidity successfully, the log is like below:

Power ON bluetooth device 0
Bluetooth device 0 is already enabled
Enable LE scan
scan params: interval=1280.000ms window=1280.000ms own_bdaddr=public whitelist=no
socket filter set to ptype=HCI_EVENT_PKT event=LE_META_EVENT
Listening ...
>>> stripped payload: 00f40c870b10001101
BLE packet - BTHome : A4:C1:38:25:F4:AE 00 110201060d16d2fc4000f40c870b10001101 -44
Temperature:  0
Humidity:  0
Battery voltage: 2.951 V
RSSI: -44 dBm
Battery: 0 %

>>> stripped payload: 00f5015d02dd08034a09
BLE packet - BTHome : A4:C1:38:25:F4:AE 00 120201060e16d2fc4000f5015d02dd08034a09 -54
Packet type: Battery
Packet type: Data
Temperature:  22.69
Humidity:  23.78
Battery voltage: 2.951 V
RSSI: -54 dBm
Battery: 93 %

what should i do, then i can use theengs gateway to get Temperature and Humidity?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions