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
73.25k stars 30.59k forks source link

Gardena Bluetooth unavailable when using Gardena App as well #97957

Closed KeningGruttePier closed 11 months ago

KeningGruttePier commented 1 year ago

The problem

The issue is failing communication with the Husqvarna (Gardena) Bluetooth Sproeier/Valve - eventhough the device is within <3m of the HomeAssistant OS / RaspberryPi. Continiously connectivity / device availability problems.

I lose communication and availability of all entities as soon as the Gardena App is utilized to access the device. After closing the Gardena App on the smartphone the device is not reachable anymore in HomeAssistant and connectivity is lost. ? I expect to be able to use both HA and official Gardena App. ? I assume some limitations due the Gardena Bluetooth valve only allows 1 active connection ? Or is this false? [as soon as you break bluetooth on your smartphone; HA:gardena integration receives an entity update. This is not equal to closing the Gardena App for me.] I think this is the core of the issue reported. Any enhancements possible here? or do I totally need to abandon the Gardena App?

Few other observations:

What version of Home Assistant Core has the issue?

core-2023.8.1

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

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 1 year ago

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.

(message by CodeOwnersMention)


gardena_bluetooth documentation gardena_bluetooth source (message by IssueLinks)

EmPeWe commented 1 year ago

Hi @KeningGruttePier, the Gardena BT app is locking the device, when you connect to it (or the device locks itself). You can simply check that for yourself, if you try to connect to the device with a second phone/tablet, either iOS or Android, while you are using it with the first mobile. The device is only capable of being connected to one app. Of course you can pair the device with different phones, but not controlling it the same time, because you can't connect to it

elupus commented 1 year ago
  • remaining time of value I rather have fully written out 29 min > 29:06 sec

Remaining open time entity is just a diagnostic entity. It shouldn't really be enabled. HA doesn't allow entities that are constantly changing such as a count down. So the "Valve closing" entity is a timestamp when the valve will close. Then it's a presentation question on how frontend displays that time.

  • rainpauze is reported in minutes or seconds but the unity is days in home assisant. 1 day in Gardena App reports as 666,0 d in HA [ it looks like it calculates the minutes remaining to midnight + additional days you entered ].

This sounds weird. Can you double check this?

  • manual start of the valve on the device does not get synced to HA.

It should (mine does) but the devices is only polled once a minute. If we keep a persistent connection i suspect it will drain device battery quickly and it will fully block android app.

  • modelnumber is 'TBD'

That is a bug of the device.

  • this device is called 'OAD Persistant App' by default by the integration

That is the name it reports. Maybe only on first boot. But seems that sticks in some cache. We should probably ignore it's reported name since that seem useless. But i can't discern different device types yet.

  • sensor valve closure turns to unknown when valve timer passed : rather have 'closed' if it means it's closed.

It can't. it's a time entity. It's either a timestamp or not. But we could make the entity unavailable instead of unknown.

KeningGruttePier commented 1 year ago

@elupus Hereby I share the rainpause issue.

https://i.ibb.co/xMpm0bJ/rainpause.png

Activated 7:50 pm a rainpause in the gardena app of 2 days. Which is calculated 4:10 hours + 24hrs, roughly 28 hours multiplied by 60 minutes is 1688. As reported in HomeAssistant however with the unity days..

KeningGruttePier commented 1 year ago

@elupus I have the Gardena Soil sensor also connected (wired) to the Bluetooth Valve of Gardena. Do you know if that can be made available in Home Assisant? It reports moisture humidity level in percentages towards the Bluetooth Valve.

elupus commented 1 year ago

@KeningGruttePier both issues should end up fixed in next full release of HA. This is unrelated to this issue.

KeningGruttePier commented 1 year ago

@KeningGruttePier both issues should end up fixed in next full release of HA. This is unrelated to this issue.

Off topic: Thank you, units are updated to minutes indeed. Rainpause now seems to report correct value (in minutes). Input validation is still breaking with red underline when high numbers (e.g. 2 a 3 days results in high number of minutes pause). Manual input in the HA integration of e.g. 18 minutes is failing (due error 13 invalid attribute length on the Bluetooth GATT) So some guidance (input validations) (step_size) which would be accepted are good to know/have.

Hi @KeningGruttePier, the Gardena BT app is locking the device, when you connect to it (or the device locks itself). You can simply check that for yourself, if you try to connect to the device with a second phone/tablet, either iOS or Android, while you are using it with the first mobile. The device is only capable of being connected to one app. Of course you can pair the device with different phones, but not controlling it the same time, because you can't connect to it

On topic: My recent findings / update: HA Integration can quickly overtake the Bluetooth connection now. Even if the Gardena Android App is still running in the memory of the smartphone. As result the Gardena App seems to run into the "waiting dialog" "One Moment Please we try to connect again". This is not really an issue for me, nor any problem with the HA integration I think.

I have an ESP Bluetooth Proxy nearby (in the 5m range).

issue-triage-workflows[bot] commented 11 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.