I don’t know when this started, but my two WSDCGQ01LM devices send ONE update to HA (when HA restarts/starts) and then never report the temperature or humidity again.
Any idea why this might be?!
petro
(Petro)
July 9, 2023, 4:08pm
2
There’s a bug in ESPHome where if you have a BLE device configured and proxies configured, only proxies will work. Remove the BT proxy from your configuration and your devices will work again. There’s a fix coming in a later release, no ETA yet but I expect it to be soon.
opened 10:29AM - 30 Jun 23 UTC
### The problem
I have 5 ESP32's and about 8 to 10 temperature sensors. All of… them being either LYWSDCGQ or CGDK2.
The last update broke them all. They will only (might) report once after the ESP32 is restarted. They never report a second time.
### Which version of ESPHome has the issue?
2023.6.3
### What type of installation are you using?
Home Assistant Add-on
### Which version of Home Assistant has the issue?
2023.7.0b2
### What platform are you using?
ESP32
### Board
mhetesp32devkit
### Component causing the issue
xiaomi_lywsdcgq, xiaomi_cgdk2
### Example YAML snippet
```yaml
e.g. CGDK2
sensor:
- platform: xiaomi_cgdk2
mac_address: "58:2D:34:12:BC:7C"
bindkey: "f6d5a0db976d1c758a23b24807e0ff2b"
temperature:
name: Server Room Temperature
humidity:
name: Server Room Humidity
battery_level:
name: Server Room Battery Level
```
e.g.LYWSDCGQ
```
sensor:
- platform: xiaomi_lywsdcgq
mac_address: !secret mijia_ble_temperature_3
temperature:
name: "Master Bathroom Temperature"
device_class: "temperature"
state_class: "measurement"
humidity:
name: "Master Bathroom Humidity"
device_class: "humidity"
state_class: "measurement"
battery_level:
name: "Master Bathroom Temperature Sensor Battery Level"
```
```
### Anything in the logs that might be useful for us?
```txt
here's the logs from one showing the issue, you'll see a single update from one of the 2 configured sensors, and nothing ever again.
INFO ESPHome 2023.6.3
INFO Reading configuration /config/esphome/master_closet_esp32.yaml...
WARNING 'master_closet_esp32': Using the '_' (underscore) character in the hostname is discouraged as it can cause problems with some DHCP and local name services. For more information, see https://esphome.io/guides/faq.html#why-shouldn-t-i-use-underscores-in-my-device-name
INFO Starting log output from master_closet_esp32.local using esphome API
INFO Successfully connected to master_closet_esp32.local
[06:11:47][I][app:102]: ESPHome version 2023.6.3 compiled on Jun 29 2023, 10:08:45
[06:11:47][C][wifi:543]: WiFi:
[06:11:47][C][wifi:379]: Local MAC: 84:CC:A8:5D:13:60
[06:11:47][C][wifi:380]: SSID: [redacted]
[06:11:47][C][wifi:381]: IP Address: 192.168.20.14
[06:11:47][C][wifi:383]: BSSID: [redacted]
[06:11:47][C][wifi:384]: Hostname: 'master_closet_esp32'
[06:11:47][C][wifi:386]: Signal strength: -69 dB ▂▄▆█
[06:11:47][C][wifi:390]: Channel: 11
[06:11:47][C][wifi:391]: Subnet: 255.255.255.0
[06:11:47][C][wifi:392]: Gateway: 192.168.20.1
[06:11:47][C][wifi:393]: DNS1: 192.168.20.1
[06:11:47][C][wifi:394]: DNS2: 0.0.0.0
[06:11:47][C][logger:301]: Logger:
[06:11:47][C][logger:302]: Level: DEBUG
[06:11:47][C][logger:303]: Log Baud Rate: 115200
[06:11:47][C][logger:305]: Hardware UART: UART0
[06:11:47][C][template.sensor:022]: Template Sensor 'Master Bathroom Temperature Sensor Number'
[06:11:47][C][template.sensor:022]: State Class: ''
[06:11:47][C][template.sensor:022]: Unit of Measurement: ''
[06:11:47][C][template.sensor:022]: Accuracy Decimals: 1
[06:11:47][C][template.sensor:023]: Update Interval: 86400.0s
[06:11:47][C][template.sensor:022]: Template Sensor 'Master Bedroom Temperature Sensor Number'
[06:11:47][C][template.sensor:022]: State Class: ''
[06:11:47][C][template.sensor:022]: Unit of Measurement: ''
[06:11:47][C][template.sensor:022]: Accuracy Decimals: 1
[06:11:47][C][template.sensor:023]: Update Interval: 86400.0s
[06:11:47][C][uptime.sensor:031]: Uptime Sensor 'Master Bedroom ESP32 Ethernet Uptime'
[06:11:47][C][uptime.sensor:031]: Device Class: 'duration'
[06:11:47][C][uptime.sensor:031]: State Class: 'total_increasing'
[06:11:47][C][uptime.sensor:031]: Unit of Measurement: 's'
[06:11:47][C][uptime.sensor:031]: Accuracy Decimals: 0
[06:11:47][C][uptime.sensor:031]: Icon: 'mdi:timer-outline'
[06:11:47][C][template.sensor:022]: Template Sensor 'Master Bedroom ESP32 Free Memory'
[06:11:47][C][template.sensor:022]: State Class: 'measurement'
[06:11:47][C][template.sensor:022]: Unit of Measurement: 'B'
[06:11:47][C][template.sensor:022]: Accuracy Decimals: 1
[06:11:47][C][template.sensor:023]: Update Interval: 60.0s
[06:11:47][C][bluetooth_proxy:088]: Bluetooth Proxy:
[06:11:47][C][bluetooth_proxy:089]: Active: YES
[06:11:47][C][restart:068]: Restart Switch 'Master Bedroom ESP32 Restart'
[06:11:47][C][restart:070]: Icon: 'mdi:restart'
[06:11:47][C][restart:091]: Restore Mode: always OFF
[06:11:47][C][xiaomi_lywsdcgq:012]: Xiaomi LYWSDCGQ
[06:11:47][C][xiaomi_lywsdcgq:013]: Temperature 'Master Bathroom Temperature'
[06:11:47][C][xiaomi_lywsdcgq:013]: Device Class: 'temperature'
[06:11:47][C][xiaomi_lywsdcgq:013]: State Class: 'measurement'
[06:11:47][C][xiaomi_lywsdcgq:013]: Unit of Measurement: '°C'
[06:11:47][C][xiaomi_lywsdcgq:013]: Accuracy Decimals: 1
[06:11:47][C][xiaomi_lywsdcgq:014]: Humidity 'Master Bathroom Humidity'
[06:11:47][C][xiaomi_lywsdcgq:014]: Device Class: 'humidity'
[06:11:47][C][xiaomi_lywsdcgq:014]: State Class: 'measurement'
[06:11:47][C][xiaomi_lywsdcgq:014]: Unit of Measurement: '%'
[06:11:47][C][xiaomi_lywsdcgq:014]: Accuracy Decimals: 1
[06:11:47][C][xiaomi_lywsdcgq:015]: Battery Level 'Master Bathroom Temperature Sensor Battery Level'
[06:11:47][C][xiaomi_lywsdcgq:015]: Device Class: 'battery'
[06:11:47][C][xiaomi_lywsdcgq:015]: State Class: 'measurement'
[06:11:47][C][xiaomi_lywsdcgq:015]: Unit of Measurement: '%'
[06:11:47][C][xiaomi_lywsdcgq:015]: Accuracy Decimals: 0
[06:11:47][C][xiaomi_lywsdcgq:012]: Xiaomi LYWSDCGQ
[06:11:47][C][xiaomi_lywsdcgq:013]: Temperature 'Master Bedroom Temperature'
[06:11:47][C][xiaomi_lywsdcgq:013]: Device Class: 'temperature'
[06:11:47][C][xiaomi_lywsdcgq:013]: State Class: 'measurement'
[06:11:47][C][xiaomi_lywsdcgq:013]: Unit of Measurement: '°C'
[06:11:47][C][xiaomi_lywsdcgq:013]: Accuracy Decimals: 1
[06:11:47][C][xiaomi_lywsdcgq:014]: Humidity 'Master Bedroom Humidity'
[06:11:47][C][xiaomi_lywsdcgq:014]: Device Class: 'humidity'
[06:11:47][C][xiaomi_lywsdcgq:014]: State Class: 'measurement'
[06:11:47][C][xiaomi_lywsdcgq:014]: Unit of Measurement: '%'
[06:11:47][C][xiaomi_lywsdcgq:014]: Accuracy Decimals: 1
[06:11:47][C][xiaomi_lywsdcgq:015]: Battery Level 'Master Bedroom Temperature Sensor Battery Level'
[06:11:47][C][xiaomi_lywsdcgq:015]: Device Class: 'battery'
[06:11:47][C][xiaomi_lywsdcgq:015]: State Class: 'measurement'
[06:11:47][C][xiaomi_lywsdcgq:015]: Unit of Measurement: '%'
[06:11:47][C][xiaomi_lywsdcgq:015]: Accuracy Decimals: 0
[06:11:47][C][esp32_ble:238]: ESP32 BLE:
[06:11:47][C][esp32_ble:240]: MAC address: 84:CC:A8:5D:13:62
[06:11:47][C][esp32_ble:241]: IO Capability: none
[06:11:47][C][esp32_ble_tracker:590]: BLE Tracker:
[06:11:47][C][esp32_ble_tracker:591]: Scan Duration: 300 s
[06:11:47][C][esp32_ble_tracker:592]: Scan Interval: 320.0 ms
[06:11:47][C][esp32_ble_tracker:593]: Scan Window: 30.0 ms
[06:11:47][C][esp32_ble_tracker:594]: Scan Type: ACTIVE
[06:11:47][C][esp32_ble_tracker:595]: Continuous Scanning: True
[06:11:47][C][mdns:108]: mDNS:
[06:11:47][C][mdns:109]: Hostname: master_closet_esp32
[06:11:47][C][ota:093]: Over-The-Air Updates:
[06:11:47][C][ota:094]: Address: master_closet_esp32.local:3232
[06:11:47][C][api:138]: API Server:
[06:11:47][C][api:139]: Address: master_closet_esp32.local:6053
[06:11:47][C][api:143]: Using noise encryption: NO
[06:12:07][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75108.00000 B with 1 decimals of accuracy
[06:12:08][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 72172.25000 s with 0 decimals of accuracy
[06:12:38][D][switch:012]: 'Master Bedroom ESP32 Restart' Turning ON.
[06:12:38][D][switch:055]: 'Master Bedroom ESP32 Restart': Sending state OFF
[06:12:38][I][restart:016]: Restarting device...
[06:12:38][I][app:134]: Rebooting safely...
INFO Processing expected disconnect from ESPHome API for master_closet_esp32.local
WARNING Disconnected from API
INFO Successfully connected to master_closet_esp32.local
[06:12:46][C][esp32_ble_tracker:590]: BLE Tracker:
[06:12:46][C][esp32_ble_tracker:591]: Scan Duration: 300 s
[06:12:46][C][esp32_ble_tracker:592]: Scan Interval: 320.0 ms
[06:12:46][C][esp32_ble_tracker:593]: Scan Window: 30.0 ms
[06:12:46][C][esp32_ble_tracker:594]: Scan Type: ACTIVE
[06:12:46][C][esp32_ble_tracker:595]: Continuous Scanning: True
[06:12:46][C][mdns:108]: mDNS:
[06:12:46][C][mdns:109]: Hostname: master_closet_esp32
[06:12:46][C][ota:093]: Over-The-Air Updates:
[06:12:46][C][ota:094]: Address: master_closet_esp32.local:3232
[06:12:46][C][api:138]: API Server:
[06:12:46][C][api:139]: Address: master_closet_esp32.local:6053
[06:12:46][C][api:143]: Using noise encryption: NO
[06:12:47][D][xiaomi_ble:328]: Got Xiaomi LYWSDCGQ (58:2D:34:3A:C4:B9):
[06:12:47][D][xiaomi_ble:331]: Temperature: 23.0°C
[06:12:47][D][xiaomi_ble:334]: Humidity: 80.0%
[06:12:47][D][sensor:094]: 'Master Bathroom Temperature': Sending state 23.00000 °C with 1 decimals of accuracy
[06:12:47][D][sensor:094]: 'Master Bathroom Humidity': Sending state 80.00000 % with 1 decimals of accuracy
[06:12:49][D][api:102]: Accepted 192.168.1.134
[06:12:49][D][api.connection:1030]: Home Assistant 2023.7.0b2 (192.168.1.134): Connected successfully
[06:13:15][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75484.00000 B with 1 decimals of accuracy
[06:13:36][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 55.94300 s with 0 decimals of accuracy
[06:14:15][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75340.00000 B with 1 decimals of accuracy
[06:14:36][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 115.94000 s with 0 decimals of accuracy
[06:15:15][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75500.00000 B with 1 decimals of accuracy
[06:15:36][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 175.94701 s with 0 decimals of accuracy
[06:16:15][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75500.00000 B with 1 decimals of accuracy
[06:16:36][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 235.94701 s with 0 decimals of accuracy
[06:17:15][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75368.00000 B with 1 decimals of accuracy
[06:17:36][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 295.94601 s with 0 decimals of accuracy
[06:17:40][I][ota:113]: Boot seems successful, resetting boot loop counter.
[06:17:40][D][esp32.preferences:114]: Saving 1 preferences to flash...
[06:17:40][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[06:17:40][D][esp32_ble_tracker:245]: Starting scan...
[06:18:15][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75424.00000 B with 1 decimals of accuracy
[06:18:36][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 355.94000 s with 0 decimals of accuracy
[06:19:15][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75424.00000 B with 1 decimals of accuracy
[06:19:36][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 415.94000 s with 0 decimals of accuracy
[06:20:15][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75424.00000 B with 1 decimals of accuracy
[06:20:36][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 475.94000 s with 0 decimals of accuracy
[06:21:15][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75424.00000 B with 1 decimals of accuracy
[06:21:36][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 535.94000 s with 0 decimals of accuracy
[06:22:15][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75424.00000 B with 1 decimals of accuracy
[06:22:36][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 595.94299 s with 0 decimals of accuracy
[06:22:40][D][esp32_ble_tracker:245]: Starting scan...
[06:23:15][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75424.00000 B with 1 decimals of accuracy
[06:23:36][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 655.94000 s with 0 decimals of accuracy
[06:24:15][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75424.00000 B with 1 decimals of accuracy
[06:24:36][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 715.94397 s with 0 decimals of accuracy
[06:25:15][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75424.00000 B with 1 decimals of accuracy
[06:25:36][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 775.94000 s with 0 decimals of accuracy
[06:26:15][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75424.00000 B with 1 decimals of accuracy
[06:26:36][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 835.94202 s with 0 decimals of accuracy
[06:27:15][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75424.00000 B with 1 decimals of accuracy
[06:27:36][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 895.94000 s with 0 decimals of accuracy
[06:27:40][D][esp32_ble_tracker:245]: Starting scan...
[06:28:15][D][sensor:094]: 'Master Bedroom ESP32 Free Memory': Sending state 75424.00000 B with 1 decimals of accuracy
[06:28:36][D][sensor:094]: 'Master Bedroom ESP32 Ethernet Uptime': Sending state 955.94000 s with 0 decimals of accuracy
```
```
### Additional information
_No response_
potential fix
esphome:dev
← bdraco:reverse_parse_logic
opened 11:40PM - 08 Jul 23 UTC
# What does this implement/fix?
fixes https://github.com/esphome/issues/issue… s/4641
## Types of changes
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Other
**Related issue or feature (if applicable):** fixes <link to issue>
**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#<esphome-docs PR number goes here>
## Test Environment
- [ ] ESP32
- [ ] ESP32 IDF
- [ ] ESP8266
- [ ] RP2040
## Example entry for `config.yaml`:
<!--
Supplying a configuration snippet, makes it easier for a maintainer to test
your PR. Furthermore, for new integrations, it gives an impression of how
the configuration would look like.
Note: Remove this section if this PR does not have an example entry.
-->
```yaml
# Example config.yaml
```
## Checklist:
- [ ] The code change is tested and works locally.
- [ ] Tests have been added to verify that the new code works (under `tests/` folder).
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated in [esphome-docs](https://github.com/esphome/esphome-docs).
1 Like
Hmmm - not sure this is a Esphome issue? I have esphome devices but they’re WiFi devices not BLE devices? Also I’m using the Pi Bluetooth adapter but only for iPhone detection, nothing else….
Also all of my other zigbee devices work fine?
petro
(Petro)
July 9, 2023, 5:16pm
4
daneboom:
WSDCGQ01LM
Well, I’m not sure I believe you. The model number you listed is either BLE or Zigbee. Not wifi. So… I guess you need to tell us what integration you’re using. Because right now, this sounds exactly like the ESPHome issue that was introduced in the last ESPHome build.
Nope. They’re zigbee sensors. zigbee and WiFi share the same spectrum but they’re not the same protocol.
To interact with them I’m using zigbee2mqtt
petro
(Petro)
July 9, 2023, 5:58pm
6
Right, so your devices are zigbee, not wifi I’ll move this to that category then not configuration or esphome.
Thanks. Did you move it to esphome? I don’t think I did that.
petro
(Petro)
July 9, 2023, 5:59pm
8
I did because it sounded like the ESPHome issue and you didn’t give it a category tag
daneboom:
WSDCGQ01LM
Seems this is a known limitation with these sensors. Xiaomi WSDCGQ01LM control via MQTT | Zigbee2MQTT
Ohhhhh, that they’re connected to a coordinator which can’t cope with them? Yeah that could fit with the timeline of when they stopped updating properly….thanks
1 Like
Router, not coordinator (coordinator is your usb-stick). Router is for example a smart bulb. You can see what router they are connected to in the map in the Z2M GUI.
Ah yeah I always get those two confused and even made a special effort to get it right, and failed
I think haven’t they even moved away from these terms as they’re too confusing as different from other networking devices/protocols?