home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.11k stars 29.79k forks source link

xiaomi-ble Garden-Sensor (GCLS002) - values are updatet only 1-2 times a week #114075

Open ML19821 opened 5 months ago

ML19821 commented 5 months ago

The problem

I bought the "Max" from techpunt. (https://www.techpunt.nl/en/xiaomi-hhcc-mi-flower-care-plant-sensor-max.html)

It has the firmware 3.6.6, shown in the Flower Care App.

It is detected by HomeAssistant as a GCLS002 sensor, but the values are updated only 1-2 times a week. It seems that the values are only updated when I use the app.

What version of Home Assistant Core has the issue?

core-2024.3.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Xiaomi BLE

Link to integration documentation on our website

https://www.home-assistant.io/integrations/xiaomi_ble

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 5 months ago

Hey there @jc2k, @ernst79, mind taking a look at this issue as it has been labeled with an integration (xiaomi_ble) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `xiaomi_ble` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign xiaomi_ble` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


xiaomi_ble documentation xiaomi_ble source (message by IssueLinks)

ChristophCaina commented 5 months ago

Hi, I'm also using the same device (and waiting for a couple others as well) - but I cannot confirm this behave. Are you using the device indoors or outdoors? Is your BT coverage good enough?

image

ML19821 commented 5 months ago

For testing purposes, I'm currently using it 1.5m next to my Rasperry PI. I have a few HHCCJCY01, up to 4m away from the PI that work perfectly.

What firmware does your GCLS002 have?

and here the data from my GCLS002 :

image
ChristophCaina commented 5 months ago

I think, the fw should also be 3.6.6 If I remember correctly 🤔

But honestly, I don't find it in the App right now... Too many devices already 🫣

kauthmbt commented 5 months ago

@ML19821 My GCLS002 sensor arrived from Techpunt today and is behaving like yours. It is currently still showing 5600 lx, although it has been in the basement for some time. BT coverage is good and there are plenty of ESP BT proxies around. Hardware FW 3.6.6 ESPHome 2024.3.2 (all devices)

[EDIT] This morning I explicitly added the configuration to a nearby Bluetooth proxy. I haven't received much yet, apart from the conductivity... image image

ChristophCaina commented 5 months ago

so, right now I do have three of the GCLS002 in use (two of them currently charging) - and with none of them I can reproduce the reported issue. All of them are updating their readings in shorter periods, just as the other HHCC sensors are doing.

VincenzoKoestler commented 5 months ago

I just got 10 JCY and 1 GCL and I’m experiencing similar issues. Two days ago until yesterday lunch they were working fine and reporting data as supposed to but since yesterday lunch none of them is reporting any data anymore. Coverage should be more than sufficient (furthest away is <3m). The GCL so far does not connect to my app at all anymore it always shows „registration timeout“ but it used to report data to my HASS.

ML19821 commented 5 months ago

Is there any way we can debug if the GCLS002 isn't sending the data or the HA isn't receiving the data correctly?

Ernst79 commented 5 months ago

Yes, you could check it by enabling debug logging for the Bluetooth integration and checking incoming messages with the MAC of the sensor.

kauthmbt commented 5 months ago

I enabled Bluetooth debugging, removed the device from the app and fully charged it. During this time it sent an advertisement:

2024-04-10 08:20:28.532 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0 (7C:88:99:5D:57:D6) [connectable]: C4:7C:8D:6D:65:49 AdvertisementData(local_name='Grow care garden', service_data={'0000fe95-0000-1000-8000-00805f9b34fb': b'q \xbc\x03\x0eIem\x8d|\xc4\r\x0b\x10\x01\x00'}, service_uuids=['0000fe95-0000-1000-8000-00805f9b34fb'], rssi=-96) match: set()

I then reconnected it to the app.

2024-04-10 09:15:25.111 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] atom-bluetooth-proxy-e9d63c (4C:75:25:E9:D6:3C) [connectable]: C4:7C:8D:6D:65:49 AdvertisementData(service_data={'0000fe95-0000-1000-8000-00805f9b34fb': b'q \xbc\x03\x12Iem\x8d|\xc4\r\t\x10\x02\x00\x00'}, service_uuids=['0000fe95-0000-1000-8000-00805f9b34fb'], tx_power=-127, rssi=-96) match: {'xiaomi_ble'}
2024-04-10 09:16:51.773 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0 (7C:88:99:5D:57:D6) [connectable]: C4:7C:8D:6D:65:49 AdvertisementData(local_name='Grow care garden', service_data={'0000fe95-0000-1000-8000-00805f9b34fb': b'q \xbc\x03\x12Iem\x8d|\xc4\r\t\x10\x02\x00\x00'}, service_uuids=['0000fe95-0000-1000-8000-00805f9b34fb'], rssi=-84) match: set()

The device has been discovered by HA and added to the Xiami BLE integration but is just brings up the sensor "conductivity".

Will check throughout the day and update the post if necessary.

[EDIT] After syncing with the app I had some additional entries:

2024-04-10 12:04:42.196 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0 (7C:88:99:5D:57:D6) [connectable]: C4:7C:8D:6D:65:49 AdvertisementData(local_name='Grow care garden', service_data={'0000fe95-0000-1000-8000-00805f9b34fb': b'q \xbc\x03\x15Iem\x8d|\xc4\r\x07\x10\x03l\x16\x00'}, service_uuids=['0000fe95-0000-1000-8000-00805f9b34fb'], rssi=-100) match: set()
2024-04-10 13:49:47.672 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0 (7C:88:99:5D:57:D6) [connectable]: C4:7C:8D:6D:65:49 AdvertisementData(local_name='Grow care garden', service_data={'0000fe95-0000-1000-8000-00805f9b34fb': b'q \xbc\x03\x16Iem\x8d|\xc4\r\x08\x10\x01\r'}, service_uuids=['0000fe95-0000-1000-8000-00805f9b34fb'], rssi=-94) match: set()

It really looks to me like the data updates only come after the app has connected to the plant sensor. The only exception is the signal strength, which is frequently updated.

[EDIT 2] As soon as the app is connected, the Gcls002 transmits live data to HA in my case. If the connection to the app is disconnected, nothing happens again. I absolutely cannot understand why the same hardware from the same reseller with the same firmware behaves so differently for the end user.

@ML19821 something similar on your side too?

ML19821 commented 5 months ago

@ML19821 something similar on your side too?

Yes, it sounds similar. But I'm also having trouble adding the sensor in the iPhone app. It takes several tries.

Does anyone know where to buy the "good" sensors?

Or is there a way to emulate the app with HA to get the data more often?

hapklaar commented 3 months ago

Curious behavior for you guys. I have 2 of the same device, used with the built-in BT + Xiaomi BLE integration in HAOS and get updates regularly when values change. Without the app connected.

Sorry, not much help. Just wanted to let you know it should be possible as is.

PS also bought them at Techpunt

regencape commented 3 months ago

I've got similar problems with VegTrug Grow Care Garden (GCLS002) devices from Techpunt. The sensors are recognized by Xiaomi BLE. The entities are not updated. Soon after adding it times out. If it is powered on and plugged into electricity socket it doesn't time out, but sensors aren't updated anyway. I haven't tried any Xiaomi app.

ERROR (MainThread) [homeassistant.components.xiaomi_ble] MAC: Bluetooth error whilst polling: MAC - MAC: Failed to connect after 4 attempt(s): Timeout waiting for connect response while connecting to MAC after 20.0s, disconnect timed out: False, after 20.0s

langerma commented 2 months ago

same here

Neocray commented 1 month ago

I have a few HHCCJCY01, up to 4m away from the PI that work perfectly.

I have two HHCCJCY01. The first is 2 m away from the BT proxy and works as intended. The second one is 3 m away, with a window in-between and often lose connection with no update when it checks in again. And it’s getting worse: image I’m wondering if the issue is specific to the GCLS002 or to the integration?

EDIT (two days later) : I confirm the sensors come back online in HA (but doesn’t catch up the history while unavailable) after using the Android HHCC app, while the phone is like 2-3 times farther than the BT proxy. Can’t find anything related in debug log. Is it possible that this other issue is linked? https://github.com/home-assistant/core/issues/91237

BoBdBmstr commented 3 weeks ago

Same Here. The Sensors are from techpunt. Software Version is 3.3.5 . The Sensor was available at First as Long as it was loading. Iam using ESPhome BLE Proxys. No Problems in the Flower Care App. It is detected as GCLS002. No Problems with the HHCCJCY01 (12 in the Moment). The GCL is detected when you put it on USB but then no Data is catched.

Why are you Guys at 3.6.6? In the App ist shows me that 3.3.5 is the newest.

Update:

It works since i have found a workaround i think.

If you connect the Sensor to USB, then connect it to the Flower Care App and let It Show Data and then disconnect USB AS Long as you let Show you the live Data in Flower Care.

After this you could deleted it from the App and it seems activatet and Update the Data in Home Assistant.

For me this worked since todays morning (Last 9 hours). I keep you updatet If it lasts.