can't see my fake Xiaomi temp sensor
See original GitHub issueHi team,
I planned to develop my own BLE sensor, giving temperature and humidity, based on a nRF52 chip. I make my own sensor, just for fun.
I managed to deal with service datas, and get a advertising very similar to the one given in https://github.com/custom-components/ble_monitor/blob/master/protocol.md
> HCI Event: LE Meta Event (0x3e) plen 37 #31 [hci0] 2.914649
LE Advertising Report (0x02)
Num reports: 1
Event type: Connectable undirected - ADV_IND (0x00)
Address type: Random (0x01)
Address: FA:BE:32:DD:0D:36 (Static)
Data length: 25
Flags: 0x06
LE General Discoverable Mode
BR/EDR Not Supported
Service Data (UUID 0xfe95): 5020aa0105360ddd32befa0d1004b2007502
RSSI: -46 dBm (0xd2)
The only difference I can notice is the address type.
I installed ble_monitor through HACS, on a Home installation, in a python virtual env on a ubuntu server.
Here is the HA logs output:
2020-12-27 21:47:23 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init user_input: None
2020-12-27 21:47:23 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init (before): {'hci_interface': [0], 'period': 60, 'discovery': True, 'active_scan': False, 'report_unknown': True, 'batt_entities': False, 'rounding': True, 'decimals': 1, 'log_spikes': False, 'use_median': False, 'restore_state': False, 'devices': [{'mac': 'FA:BE:32:DD:0D:36', 'temperature_unit': '°C', 'name': 'FABE32DD0D36'}], 'is_flow': True}
2020-12-27 21:47:30 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init user_input: {'hci_interface': ['0'], 'period': 60, 'discovery': True, 'active_scan': False, 'report_unknown': True, 'batt_entities': False, 'rounding': True, 'decimals': 1, 'log_spikes': False, 'use_median': False, 'restore_state': False, 'devices': 'FA:BE:32:DD:0D:36'}
2020-12-27 21:47:30 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_init (after): {'hci_interface': ['0'], 'period': 60, 'discovery': True, 'active_scan': False, 'report_unknown': True, 'batt_entities': False, 'rounding': True, 'decimals': 1, 'log_spikes': False, 'use_median': False, 'restore_state': False, 'devices': 'FA:BE:32:DD:0D:36'}
2020-12-27 21:47:32 DEBUG (MainThread) [custom_components.ble_monitor.config_flow] async_step_add_device: {'mac': 'FA:BE:32:DD:0D:36', 'temperature_unit': '°C', 'encryption_key': ''}
2020-12-27 21:47:42 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 MiBeacon BLE ADV messages processed for 0 binary sensor device(s) total. Priority queue = 0
2020-12-27 21:47:42 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 MiBeacon BLE ADV messages processed for 1 measuring device(s).
2020-12-27 21:47:42 DEBUG (Thread-8) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing
2020-12-27 21:47:42 DEBUG (Thread-8) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2020-12-27 21:47:42 DEBUG (Thread-8) [custom_components.ble_monitor] 2618 HCI events processed for previous period.
2020-12-27 21:47:42 DEBUG (Thread-8) [custom_components.ble_monitor] HCIdump thread: Run
2020-12-27 21:47:42 DEBUG (Thread-8) [custom_components.ble_monitor] HCIdump thread: connected to hci0
2020-12-27 21:47:42 DEBUG (Thread-8) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2020-12-27 21:48:42 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 MiBeacon BLE ADV messages processed for 0 binary sensor device(s) total. Priority queue = 0
2020-12-27 21:48:42 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 MiBeacon BLE ADV messages processed for 1 measuring device(s).
2020-12-27 21:48:42 DEBUG (Thread-8) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing
2020-12-27 21:48:42 DEBUG (Thread-8) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2020-12-27 21:48:42 DEBUG (Thread-8) [custom_components.ble_monitor] 2473 HCI events processed for previous period.
2020-12-27 21:48:42 DEBUG (Thread-8) [custom_components.ble_monitor] HCIdump thread: Run
2020-12-27 21:48:42 DEBUG (Thread-8) [custom_components.ble_monitor] HCIdump thread: connected to hci0
2020-12-27 21:48:42 DEBUG (Thread-8) [custom_components.ble_monitor] HCIdump thread: start main event_loop
2020-12-27 21:49:42 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] 0 MiBeacon BLE ADV messages processed for 0 binary sensor device(s) total. Priority queue = 0
2020-12-27 21:49:42 DEBUG (MainThread) [custom_components.ble_monitor.sensor] 0 MiBeacon BLE ADV messages processed for 1 measuring device(s).
2020-12-27 21:49:42 DEBUG (Thread-8) [custom_components.ble_monitor] HCIdump thread: main event_loop stopped, finishing
2020-12-27 21:49:42 DEBUG (Thread-8) [custom_components.ble_monitor] HCIdump thread: Scanning will be restarted
2020-12-27 21:49:42 DEBUG (Thread-8) [custom_components.ble_monitor] 2281 HCI events processed for previous period.
2020-12-27 21:49:42 DEBUG (Thread-8) [custom_components.ble_monitor] HCIdump thread: Run
2020-12-27 21:49:42 DEBUG (Thread-8) [custom_components.ble_monitor] HCIdump thread: connected to hci0
2020-12-27 21:49:42 DEBUG (Thread-8) [custom_components.ble_monitor] HCIdump thread: start main event_loop
The sensor is present (FA:BE:32:DD:0D:36), but not data appears in HA.
I probably missed something, but where?
Thanks for your job and support. Vincent
Issue Analytics
- State:
- Created 3 years ago
- Comments:12
Top Results From Across the Web
Use this CHEAP Xiaomi thermometer with an ESP32 and ...
Use this cheap Xiaomi LYWSD03MMC Bluetooth BLE thermometer Hygrometer in Home Assistant to monitor temperature and humidity.
Read more >Exploring Custom Firmware On Xiaomi Thermometers
If we've learned anything over the years, it's that hackers love to know what the temperature is. Seriously. A stroll through the archives ......
Read more >Xiaomi BLE Temperature and Humidity sensor no longer ...
Xiaomi BLE Temperature and Humidity sensors no longer discovered and working after upgrade from 0.95.4 to 0.96.5.
Read more >Xiaomi Temperature Sensors - BLE vs Wifi compatibility?
Hello,. I'm looking to deploy Hass.io with the intent of using temperature & hygrometer sensors in various areas of my home.
Read more >Xiaomi Mijia BLE Sensors - ESPHome
The new bind key will work with ESPHome, but the Mi Home app will not recognise the sensor anymore once the device has...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, for sure. Right now, I’m working on a private git repo, but later, I will publish it on a framagit or github.
You’re welcome. If you ever think of writing a tutorial how you did this, please give us a link or even better create a PR with a new page on this repository.