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.07k stars 30.56k forks source link

Unable to connect to Adax heater with local integration #105763

Closed frikksol closed 8 months ago

frikksol commented 10 months ago

The problem

I can successfully use the cloud integration with Adax heaters, but I am unable to get it to work with the local integration.

When attempting to connect locally (After resetting the heater, and setting it in inclusion mode) I get the error "Heater not found. Try to move the heater closer to Home Assistant computer." immediately. It feels like it does not even attempt to connect. There is nothing in the general logs, or the supervisor logs. I would be happy to assist with getting more logs if pointed in the right direction. I have placed the heater 50cm away from my Home Assistant.

I do have a Plejd installation, that uses bluetooth, so I know BT is working. Unsure if it may cause an issue for this integration.

I am aware this is not too much to go on, but I will gladly assist, if you have any guidance on digging out some more details.

image

What version of Home Assistant Core has the issue?

core-2023.12.2

What was the last working version of Home Assistant Core?

never

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Adax

Link to integration documentation on our website

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

Diagnostics information

Unable to add this, since the issue occurs during setup

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 10 months ago

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

Code owner commands Code owners of `adax` 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 adax` 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)


adax documentation adax source (message by IssueLinks)

Danielhiversen commented 10 months ago

Anything in the logs?

could you try to disable Plejd? (You only need Bluetooth when pairing the adax heaters, afterwards it uses wifi)

frikksol commented 10 months ago

I have not found anything the logs unfortunately. Disabling Plejd is a great idea. I'll give it a shot today, and report back.

Thanks for the fast reply!

MadeleneBystedt commented 10 months ago

I have the same issue and i have tried to disable plejd and it did not work after that either.

Logger: py.warnings Source: components/adax/config_flow.py:78 First occurred: 12:42:58 PM (1 occurrences) Last logged: 12:42:58 PM

/usr/local/lib/python3.11/site-packages/adax_local/init.py:194: FutureWarning: BLEDevice.metadata is deprecated and will be removed in a future version of Bleak, use AdvertisementData instead metadata = discovered_item.metadata

Logger: homeassistant.helpers.frame Source: helpers/frame.py:133 First occurred: 12:42:58 PM (1 occurrences) Last logged: 12:42:58 PM

Detected that integration 'adax' attempted to call BleakClient with an address instead of a BLEDevice at homeassistant/components/adax/config_flow.py, line 78: device_configured = await configurator.configure_device(), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+adax%22

Logger: root Source: /usr/local/lib/python3.11/asyncio/events.py:80 First occurred: 12:43:12 PM (1 occurrences) Last logged: 12:43:12 PM

A message handler raised an exception: Traceback (most recent call last): File "src/dbus_fast/message_bus.py", line 789, in dbus_fast.message_bus.BaseMessageBus._process_message File "/usr/local/lib/python3.11/site-packages/bleak/backends/bluezdbus/manager.py", line 1008, in _parse_msg watcher.on_characteristic_value_changed( File "/usr/local/lib/python3.11/site-packages/bleak/backends/bluezdbus/client.py", line 177, in on_value_changed callback(bytearray(value)) File "/usr/local/lib/python3.11/site-packages/adax_local/init.py", line 120, in notification_handler raise InvalidWifiCred adax_local.InvalidWifiCred

Etless commented 9 months ago

I had the same issue, but after some testing I found out that the Bluetooth adapter needs to be set to active scanning and not passive. Skjermbilde 2024-01-30 225220

frikksol commented 9 months ago

I had the same issue, but after some testing I found out that the Bluetooth adapter needs to be set to active scanning and not passive. Skjermbilde 2024-01-30 225220

That's an interesting find. I'll check that myself later today to verify that it also works for me

le-clu commented 9 months ago

Hi. I experience a somewhat similar issue: My BT adapter finds the heater and seems to connect, but then disconnects again: image image

Anyone who might have seen that behaviour?

Thanks!

frikksol commented 8 months ago

Updating my comment. Pairing mode had ended on my heater when testing. Got it working now :) So in conclusion (for my case at least), it seems like Plejd is the issue here. It hogs an entire Bluetooth device, so if you want Plejd in addtion to other BT-devices, you need an additional dongle or similar.

Old comment: This is getting a bit strange. I was initially unable to choose active scanning for bluetooth, since it seems like the Plejd integration hogs the BT-device. I then bought a BT-dongle as a attempt at having another BT-radio for "non-Plejd-things".

Now I am able to set active scanning for both BT-radios, but i still go straight to the "Heater not found" screen. This is all done with the Plejd integration disabled...

frikksol commented 8 months ago

This was not an Adax issue, but a Plejd issue. Plejd hogs an entire BT-device, so if using Plejd and Adax, you need two BT-devices