[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gardene Bluetooth Intgration - Setup doesn't work #118956

Open
verhoevendanny opened this issue Jun 6, 2024 · 41 comments
Open

Gardene Bluetooth Intgration - Setup doesn't work #118956

verhoevendanny opened this issue Jun 6, 2024 · 41 comments

Comments

@verhoevendanny
Copy link

The problem

The Integration find itself the "Water Control Bluetooth" equipment. But it always ends with an error :
No devices or entities found

What version of Home Assistant Core has the issue?

core-2024.6.0

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

Gardena Bluetooth

Link to integration documentation on our website

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

Diagnostics information

home-assistant_gardena_bluetooth_2024-06-06T10-04-28.477Z.log
home-assistant_gardena_bluetooth_2024-06-06T10-04-28.477Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Bron: config_entries.py:594
Eerst voorgekomen: 11:57:01 (1 gebeurtenissen)
Laatst gelogd: 11:57:01

Error setting up entry Gardena Water Computer for gardena_bluetooth
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/gardena_bluetooth/__init__.py", line 55, in async_setup_entry
    sw_version = await client.read_char(DeviceInformation.firmware_version, None)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/gardena_bluetooth/client.py", line 180, in read_char
    return char.decode(await self.read_char_raw(char.uuid))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/gardena_bluetooth/parse.py", line 82, in decode
    return data.decode("ASCII")
           ^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 3: ordinal not in range(128)

Additional information

No response

@home-assistant
Copy link
home-assistant bot commented Jun 6, 2024

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

Code owner commands

Code owners of gardena_bluetooth 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 gardena_bluetooth 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)


gardena_bluetooth documentation
gardena_bluetooth source
(message by IssueLinks)

@elupus
Copy link
Contributor
elupus commented Jun 6, 2024

Can you tell me what equipment this is? Link to product page? Also what firmware version does the official application report?

@verhoevendanny
Copy link
Author
verhoevendanny commented Jun 6, 2024 via email

@elupus
Copy link
Contributor
elupus commented Jun 6, 2024

Okey. I think this is related to some changes in esp gateway's.

@elupus
Copy link
Contributor
elupus commented Jun 6, 2024

@verhoevendanny How do you connect to the device. Are you using an esp ble gateway?

@verhoevendanny
Copy link
Author
verhoevendanny commented Jun 6, 2024 via email

@elupus
Copy link
Contributor
elupus commented Jun 6, 2024

Can you try an restart the gateway and see if the device is accepted?

@elupus
Copy link
Contributor
elupus commented Jun 6, 2024

Do you have more than one gateway btw?

@verhoevendanny
Copy link
Author
verhoevendanny commented Jun 6, 2024 via email

@verhoevendanny
Copy link
Author
verhoevendanny commented Jun 6, 2024 via email

@frontside76
Copy link

Same problem here.
Have 3 M5Stack Atom bluetooth proxys for 3 gardena valves.
Get same error on 1 Proxy, so 1 valve is down.
It occured after last HA Update and restart, i did on Sunday.
Today i did the 2024.06 Update, but no change.
Firmware at Gardena Valve is the newest. ESP Home and proxys have newest updates.

@elupus
Copy link
Contributor
elupus commented Jun 6, 2024

Same problem here. Have 3 M5Stack Atom bluetooth proxys for 3 gardena valves. Get same error on 1 Proxy, so 1 valve is down. It occured after last HA Update and restart, i did on Sunday. Today i did the 2024.06 Update, but no change. Firmware at Gardena Valve is the newest. ESP Home and proxys have newest updates.

Can you restart all of your proxies and see if that changes which device it fails to connect to?

@frontside76
Copy link

I have disconnected all 3 Proxys. Then i completely, restarted HA.
Then alle 3 valves were offline.
Now I have pluged in Proxy 2 and 3 and got the same Error - only for valve 1.

Logger: homeassistant.config_entries
Quelle: config_entries.py:594
Erstmals aufgetreten: 18:17:51 (1 Vorkommnisse)
Zuletzt protokolliert: 18:17:51

Error setting up entry Gardena Ventil 1 for gardena_bluetooth
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/gardena_bluetooth/init.py", line 55, in async_setup_entry
sw_version = await client.read_char(DeviceInformation.firmware_version, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/gardena_bluetooth/client.py", line 180, in read_char
return char.decode(await self.read_char_raw(char.uuid))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/gardena_bluetooth/parse.py", line 82, in decode
return data.decode("ASCII")
^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 3: ordinal not in range(128)

@elupus
Copy link
Contributor
elupus commented Jun 6, 2024

Can you check if its always same valve or if it depends on the proxy. Disconnect the proxies. Plug one in, check for error. If you get the error disconnect it again. Borrow another proxy and connect it at that location.

@frontside76
Copy link

The last months I had Problems with all 3 valves. Always 1 of them was offline. Then there were same changes in ESP home in May and then it worked.
I was on vacation from May 14th til June 2nd and everything worked. I did no changes in this time. After I returned, rhere were some Updates (HA, ESP Home, ESP bluetooth proxy,...). After Update and restart I got this error. Maybe it is a problem with the ESP proxy config? I compare all 3 and send an update here.

@frontside76
Copy link

Update:
Config is the same at all 3 proxys.
So I took off the battery of valve 1, inserted it again. Then I did a HA restart.
Now all 3 valves are working again.

So it is still a problem with the connection, when you restart the whole HA system. I think the valve still thinks there is a Connecticut, but HA tries again and again and doesn't get a handshake.

@elupus
Copy link
Contributor
elupus commented Jun 6, 2024

I wish you would have done as i asked. Its not a a connection issue. It is connected when the error in the log occurs. It is getting invalid data. Im trying to figure out where that data is from.

@frontside76
Copy link
frontside76 commented Jun 6, 2024

I did what you have asked, sorry I forgot to write. I have disconnected all 3 proxys, then I have connected Proxy1
-> valve 1 offline, valve 2 and 3 online.

Then I have disconnected Proxy1 again and connected Proxy2.
-> valve 1 offline, valve 2 and 3 online.

Then I have disconnected Proxy2 again and connected Proxy3.
-> valve 1 offline, valve 2 and 3 online.

Everytime the same problem with valve 1. All 3 valves have the same actual firmware. When 1 take out the battery and put it in again, it works.

@frontside76
Copy link
frontside76 commented Jun 6, 2024

And now I got 2 Errors (I know them, because I get them every day), but the valves still work.

NO.1########:
Logger: homeassistant.components.gardena_bluetooth
Quelle: helpers/update_coordinator.py:344
Integration: Gardena Bluetooth (Dokumentation, Probleme)
Erstmals aufgetreten: 19:34:34 (1 Vorkommnisse)
Zuletzt protokolliert: 19:34:34

Error fetching Gardena Bluetooth Data Update Coordinator data: Unable to update data for 98bd0011-0b0e-421a-84e5-ddbf75dc6de4 due to Communcation failed with device: Gardena Bluetooth - B0:D2:78:99:E1:80: Failed to connect after 9 attempt(s): Error ESP_GATT_CONN_FAIL_ESTABLISH while connecting: Connection failed to establish: Interference/range; External Bluetooth adapter w/extension may help; Extension cables reduce USB 3 port interference

NO.2########:
Logger: homeassistant.components.gardena_bluetooth
Quelle: helpers/update_coordinator.py:318
Integration: Gardena Bluetooth (Dokumentation, Probleme)
Erstmals aufgetreten: 19:17:24 (3 Vorkommnisse)
Zuletzt protokolliert: 19:36:55

Timeout fetching Gardena Bluetooth Data Update Coordinator data

@elupus
Copy link
Contributor
elupus commented Jun 6, 2024

Thanks! That confirms its something is odd with the state of that specific device. We have by that ruled out the esphome internal device caches.

So, i wonder if we have lingering connections on home assistant restarts that places the devices in some odd state. So if the restart happen right when a device is connected it goes wonky and does not recover.

@verhoevendanny can you confirm that removing the device batteries let it get added in home assistant?

@verhoevendanny
Copy link
Author
verhoevendanny commented Jun 6, 2024 via email

@frontside76
Copy link
frontside76 commented Jun 6, 2024

You only need the App for firmware update.
Better you reset it and integrate it directly in HA.

Question: after you removed the battery and inserted again, did you restart HA (yellow button)?

@elupus
Copy link
Contributor
elupus commented Jun 7, 2024

Those are different errors @frontside76 lets keep this issue for the setup exceptions.

@verhoevendanny
Copy link
Author

Is a solution possible? It is still not working!

@elupus
Copy link
Contributor
elupus commented Jun 11, 2024

@verhoevendanny we don't know yet. When 2024.6.2 is out please try again. It should handle the exception you reported. But its not sure if that solve your issue yet.

@frontside76
Copy link

Mine is working since 5 days, when i put out the battery, inserted again and started HA

@verhoevendanny
Copy link
Author

Installed 2024.6.2, then reinstalled the integration.
Found it but still mentioning No devices or entities found.
Nothing in the log.
So it is not yet solved.

@elupus
Copy link
Contributor
elupus commented Jun 11, 2024

Well. The exception is solved. Your device is likely in bootloader mode as was reported in another ticket.

Enable debug logging on the integration, reload it and disable debug logging. Then post that file here

@verhoevendanny
Copy link
Author

error_log-2.txt

@elupus
Copy link
Contributor
elupus commented Jun 11, 2024

Doesnt look like you reloaded the integration?

@verhoevendanny
Copy link
Author

I did now a restart HA, and then debug
error_log-3.txt

@elupus
Copy link
Contributor
elupus commented Jun 11, 2024

I think you misunderstood. I dont want you to restart home assistant. I want you to reload just the gardena integration while debug is turned on. That way it reinitialize and i get its startup information in the logs.

@verhoevendanny
Copy link
Author

No I did it correct!
This morning I reloaded the integration 3 time and this is what comes out in the log:
2024-06-12 08:37:13.770 DEBUG (MainThread) [homeassistant.components.gardena_bluetooth] Finished fetching Gardena Bluetooth Data Update Coordinator data in 0.000 seconds (success: True)
2024-06-12 08:37:18.570 DEBUG (MainThread) [homeassistant.components.gardena_bluetooth] Finished fetching Gardena Bluetooth Data Update Coordinator data in 0.000 seconds (success: True)
2024-06-12 08:37:25.143 DEBUG (MainThread) [homeassistant.components.gardena_bluetooth] Finished fetching Gardena Bluetooth Data Update Coordinator data in 0.000 seconds (success: True)

@elupus
Copy link
Contributor
elupus commented Jun 12, 2024

Ok. I was sure it would log the setup process. Crap, i need to add bluetooth logging to the log settings for that integration

@verhoevendanny
Copy link
Author
verhoevendanny commented Jun 16, 2024 via email

@elupus
Copy link
Contributor
elupus commented Jun 16, 2024

This device is as expected not listing the characteristics expected. Looks to be in boot mode.

Does your bluetooth proxy ha have service cache enabled "cache_services: true"?

@verhoevendanny
Copy link
Author
verhoevendanny commented Jun 16, 2024 via email

@elupus
Copy link
Contributor
elupus commented Jun 16, 2024

Ok. Then it should not be active. Could you try the factory reset of the device. Take out batteries, hold down button, insert batteries, wait around 3 seconds before releasing.

For some reason it seem to not start the main firmware

@verhoevendanny
Copy link
Author
verhoevendanny commented Jun 16, 2024 via email

@MrFreezeman
Copy link

Nothing new on this issue? I have the same constant disconnects with the Gardena Water Computer but without esp. normal Intel NUC Bluetooth device.

@elupus
Copy link
Contributor
elupus commented Jun 23, 2024

The built-in Bluetooth is generally worse. But this issue is about not being able to setup the device. So sounds unrelated. Look in the other issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants