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

Sensirion SHT4X Smart Gadget #763

Closed hornico closed 2 years ago

hornico commented 2 years ago

Sensirion SHT4X Smart Gadget.

Ernst79 commented 2 years ago

I need some BLE advertisements before I can add it. Check this FAQ page how you can get these.

https://custom-components.github.io/ble_monitor/faq#my-sensor-is-not-in-the-list-of-supported-ones-how-to-request-implementation

hornico commented 2 years ago

issues with Home Assistant 2022-03-12 19:02:59 INFO (MainThread) [custom_components.ble_monitor] Attention! Option report_unknown is enabled for sensor with id(s): [b'\x1c\xa9.#\xf0\x87M\xf7\xb9\xa2\xfdKqjK\xf6'] 2022-03-12 19:09:31 INFO (Thread-3) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID 1ca92e23f0874df7b9a2fd4b716a4bf6: 043e270201030167d9d14b3e5a1b1aff4c0002151ca92e23f0874df7b9a2fd4b716a4bf60395000003b4 2022-03-12 19:09:31 INFO (Thread-3) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID 1ca92e23f0874df7b9a2fd4b716a4bf6: 043e270201030167d9d14b3e5a1b1aff4c0002151ca92e23f0874df7b9a2fd4b716a4bf60395000003b4 2022-03-12 19:09:31 INFO (Thread-3) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID 1ca92e23f0874df7b9a2fd4b716a4bf6: 043e270201030167d9d14b3e5a1b1aff4c0002151ca92e23f0874df7b9a2fd4b716a4bf60395000003b6 2022-03-12 19:09:32 INFO (Thread-3)

hornico commented 2 years ago

Is it what you have requested?

Ernst79 commented 2 years ago

You have now filtered on a UUID from an iBeacon device (probably an iPhone or something like that). I don't think this is the Sensirion, is it?

If you know the MAC address of the Sensiorion, add that as a new device and enable the report unknown function for that specific device. If you don't know the MAC, enable report unknown in the BLE monitor options (first menu that opens), and select "Other". Let it run for a few minutes, and copy all the log lines by uploading a txt file here (just drag and drop it here). I will try to filter it manually.

hornico commented 2 years ago

The only I can get is the following message

2022-03-13 19:07:48 INFO (MainThread) [custom_components.ble_monitor] Attention! Option report_unknown is enabled for sensor with id(s): [b'\xffg\xc0\xc3\xe2\xe7'] 2022-03-13 19:14:51 INFO (MainThread) [custom_components.ble_monitor] Attention! Option report_unknown is enabled for sensor with id(s): [b'\xffg\xc0\xc3\xe2\xe7']

hornico commented 2 years ago

Now I get the following

custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID ff67c0c3e2e7: 043e2902010001e7e2c3c067ff1d0201060bffd5060006e2e7036a1c650d09534854343020476164676574b8 2022-03-13 19:19:39 INFO (Thread-11) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID ff67c0c3e2e7: 043e2902010001e7e2c3c067ff1d0201060bffd5060006e2e7036a1c650d09534854343020476164676574b9 2022-03-13 19:19:47 INFO (Thread-11) [custom_components.ble_monitor.ble_parser] BLE advertisement received from MAC/UUID ff67c0c3e2e7: 043e2902010001e7e2c3c067ff1d0201060bffd5060006e2e7036a1c650d09534854343020476164676574b9

Ernst79 commented 2 years ago

Yes, thanks, It's possible to add this device. Will add it in the next release.

result  ({'firmware': 'Sensirion', 'temperature': 27.47, 'humidity': 39.5, 'rssi': -71, 'mac': 'FF:67:C0:C3:E2:E7', 'type': 'SHT40 Gadget', 'packet': 'no packet id', 'data': True}, None)
Ernst79 commented 2 years ago

Please try 8.0.4-beta

Ernst79 commented 2 years ago

Added in 8.1.0. If it doesn't work, let me know.

hornico commented 2 years ago

It worked. Great job!!!!

El mar, 15 de mar. de 2022 17:33, Ernst Klamer @.***> escribió:

Please try 8.0.4-beta

— Reply to this email directly, view it on GitHub https://github.com/custom-components/ble_monitor/issues/763#issuecomment-1068441862, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANP5NBHQUB4RM3S7ICMFDZDVADX2LANCNFSM5QBE6NVQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

hornico commented 2 years ago

Great! Thanks Ernst

El mar, 15 de mar. de 2022 07:38, Ernst Klamer @.***> escribió:

Yes, thanks, It's possible to add this device. Will add it in the next release.

result ({'firmware': 'Sensirion', 'temperature': 27.47, 'humidity': 39.5, 'rssi': -71, 'mac': 'FF:67:C0:C3:E2:E7', 'type': 'SHT40 Gadget', 'packet': 'no packet id', 'data': True}, None)

— Reply to this email directly, view it on GitHub https://github.com/custom-components/ble_monitor/issues/763#issuecomment-1067824076, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANP5NBDXN6XNZOKCZYHYBJTVABSAPANCNFSM5QBE6NVQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

amagr0 commented 1 year ago

Hello,

First of all, thanks for this Sensirion sensor addition. I have the SHT40 Smart Gadget already in HA through Bluetooth Low Energy Monitor Integration but the Humidity data that I'm getting in HA is relatively low compared to the Gadget values, aprox. 10% of Humidity lower.

Ex.: -------------------------- Temp | Humidity SHT4X Smart Gadget -- 22.09C | 71.18% HA BLE ----------------- 22.09C | 61.71%

SHT40 Gadget Firmware: 3.2 (up to date)

Passive BLE Monitor integration 10.6.0

Home Assistant 2022.11.2 Supervisor 2022.10.2 Operating System 9.3

amagr0 commented 1 year ago

Log:

2022-11-16 19:01:02.556 DEBUG (MainThread) [custom_components.ble_monitor.bt_helpers] Response(header=, event_frame=, cmd_response_frame=<address=DC:A6:32:BE:FE:34, bluetooth_version=9, manufacturer=305, supported_settings=114431, current_settings={Powered: True, Connectable: False, FastConnectable: False, Discoverable: False, Bondable: False, LinkLevelSecurity: False, SecureSimplePairing: True, BREDR: True, HighSpeed: False, LowEnergy: True, Advertising: False, SecureConnections: True, DebugKeys: False, Privacy: False, ControllerConfiguration: False, StaticAddress: False, PHYConfiguration: False, WidebandSpeech: False}, class_of_device=2883584, name=b'homeassistant', short_name=0>)

2022-11-16 19:01:02.742 DEBUG (MainThread) [custom_components.ble_monitor] Initializing BLE Monitor entry (config entry): <homeassistant.config_entries.ConfigEntry object at 0x7f919636b0>

2022-11-16 19:01:02.750 DEBUG (MainThread) [custom_components.ble_monitor] async_setup_entry: domain {}

2022-11-16 19:01:02.750 DEBUG (MainThread) [custom_components.ble_monitor] HCI interface is [0]

2022-11-16 19:01:02.750 DEBUG (MainThread) [custom_components.ble_monitor] async_setup_entry: {'bt_interface': ['DC:A6:32:BE:FE:34'], 'bt_auto_restart': False, 'active_scan': False, 'discovery': True, 'period': 60, 'use_median': False, 'decimals': 2, 'log_spikes': False, 'restore_state': False, 'report_unknown': 'Off', 'devices': [{'mac': 'F5:2C:18:48:00:01', 'name': 'F52C18480001', 'temperature_unit': '°C', 'decimals': 2, 'use_median': 'default', 'restore_state': 'default', 'reset_timer': 35, 'report_unknown': False, 'track_device': False, 'tracker_scan_interval': 20, 'consider_home': 180, 'delete device': False, 'uuid': ''}], 'is_flow': True, 'hci_interface': [0]}

2022-11-16 19:01:02.751 DEBUG (MainThread) [custom_components.ble_monitor] Spawning HCIdump thread

2022-11-16 19:01:02.751 DEBUG (MainThread) [custom_components.ble_monitor] HCIdump thread: Init

2022-11-16 19:01:02.751 DEBUG (MainThread) [custom_components.ble_monitor] 0 encryptors mac:key pairs loaded

2022-11-16 19:01:02.751 DEBUG (MainThread) [custom_components.ble_monitor] sensor whitelist: []

2022-11-16 19:01:02.752 DEBUG (MainThread) [custom_components.ble_monitor] 0 sensor whitelist item(s) loaded

2022-11-16 19:01:02.752 DEBUG (MainThread) [custom_components.ble_monitor] 0 device tracker(s) being monitored

2022-11-16 19:01:02.754 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: Run

2022-11-16 19:01:02.772 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: BLEScanRequester._initialized is True for hci0, waiting for connection...

2022-11-16 19:01:02.773 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: connected to hci0

2022-11-16 19:01:02.775 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: BLEScanRequester._initialized is True for hci0, connection established, send_scan_request succeeded.

2022-11-16 19:01:02.775 DEBUG (Thread-3) [custom_components.ble_monitor] HCIdump thread: start main event_loop

2022-11-16 19:01:02.875 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Starting device tracker entry startup

2022-11-16 19:01:02.875 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] BLE device tracker updater initialization

2022-11-16 19:01:02.875 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] BLE device tracker updater initialized

2022-11-16 19:01:02.876 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Device Tracker entry setup finished

2022-11-16 19:01:02.876 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Starting binary sensor entry startup

2022-11-16 19:01:02.876 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] BLE binary sensors updater initialization

2022-11-16 19:01:02.876 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] BLE binary sensors updater initialized

2022-11-16 19:01:02.876 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Binary sensor entry setup finished

2022-11-16 19:01:02.876 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Starting measuring sensor entry startup

2022-11-16 19:01:02.876 DEBUG (MainThread) [custom_components.ble_monitor.sensor] BLE sensors updater initialization

2022-11-16 19:01:02.876 DEBUG (MainThread) [custom_components.ble_monitor.sensor] BLE sensors updater initialized

2022-11-16 19:01:02.877 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Measuring sensor entry setup finished

2022-11-16 19:01:02.904 DEBUG (MainThread) [custom_components.ble_monitor.device_tracker] Device tracker updater loop started!

2022-11-16 19:01:02.905 DEBUG (MainThread) [custom_components.ble_monitor.binary_sensor] Binary entities updater loop started!

2022-11-16 19:01:02.905 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Entities updater loop started!

2022-11-16 19:01:02.957 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Sensor device with mac_address F5:2C:18:48:00:01 has the following settings. Name: F52C18480001. Temperature unit: °C. Decimals: 2. Use Median: False. Restore state: False. Reset Timer: 35

2022-11-16 19:01:02.957 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Sensor device with mac_address F5:2C:18:48:00:01 has the following settings. Name: F52C18480001. Temperature unit: °C. Decimals: 2. Use Median: False. Restore state: False. Reset Timer: 35

2022-11-16 19:01:02.958 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Sensor device with mac_address F5:2C:18:48:00:01 has the following settings. Name: F52C18480001. Temperature unit: °C. Decimals: 2. Use Median: False. Restore state: False. Reset Timer: 35

2022-11-16 19:01:03.032 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'firmware': 'Sensirion', 'temperature': 22.06, 'humidity': 61.58, 'rssi': -60, 'mac': 'F52C18480001', 'type': 'SHT40 Gadget', 'packet': 'no packet id', 'data': True}

2022-11-16 19:01:03.074 DEBUG (MainThread) [custom_components.ble_monitor.sensor] async_added_to_hass called for ble temperature F52C18480001

2022-11-16 19:01:03.075 DEBUG (MainThread) [custom_components.ble_monitor.sensor] async_added_to_hass called for ble humidity F52C18480001

2022-11-16 19:01:03.076 DEBUG (MainThread) [custom_components.ble_monitor.sensor] async_added_to_hass called for ble rssi F52C18480001


2022-11-16 19:02:13.151 DEBUG (MainThread) [custom_components.ble_monitor.sensor] Data measuring sensor received: {'firmware': 'Sensirion', 'temperature': 22.06, 'humidity': 61.66, 'rssi': -61, 'mac': 'F52C18480001', 'type': 'SHT40 Gadget', 'packet': 'no packet id', 'data': True}

Ernst79 commented 1 year ago

Can you please move this issue to a new issue. such that we can keep track of what needs our attention.