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.82k stars 30.08k forks source link

Aranet integration does not create devices or entities #84191

Closed grischard closed 1 year ago

grischard commented 1 year ago

The problem

Adding a new aranet device adds the integration, but the integration then has no devices or entities - so no data gets read.

What version of Home Assistant Core has the issue?

2022.12.7

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

aranet

Link to integration documentation on our website

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

Diagnostics information

home-assistant_aranet_2022-12-18T15-17-36.245Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Not much happening in the logs, even with debug logging on:

2022-12-18 10:11:16.542 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {[…] 'aranet', […]}
2022-12-18 10:11:33.950 INFO (MainThread) [homeassistant.setup] Setting up aranet
2022-12-18 10:11:33.950 INFO (MainThread) [homeassistant.setup] Setup of domain aranet took 0.0 seconds
2022-12-18 10:11:34.334 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.aranet


### Additional information

The sensor works fine when read from esphome or from the phone app. I have disabled these methods of reading data, so they're not causing the issue.

HA can read data from other bluetooth devices just fine.
home-assistant[bot] commented 1 year ago

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

Code owner commands Code owners of `aranet` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Change the title of the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign aranet` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


aranet documentation aranet source (message by IssueLinks)

aschmitz commented 1 year ago

Just a quick check: is this an Aranet4 device, or some other Aranet device? Right now we only support the Aranet4 (via Bluetooth, which is what it sounds like you're using, but just checking).

I'm a little confused on this: how did you add the integration (especially without a device)? I can think of a few options: manually configured via YAML (I haven't tested this, but I wouldn't really know how you'd give it the right device), manually via picking the integration out of the list of integrations in the web interface (this should prompt you to add a device from a list of discovered devices, or fail), or via adding an autodiscovered device (which should mostly Just Work).

If you manually added the integration via the web interface, did you see your Aranet4 device on the list of devices to pick? Were there any warnings about it? (We'll warn about a couple things that would prevent it from working.)

If you added the device via autodiscovery, that would also be interesting, especially if you have any logs of that. (You may be able to remove the integration and wait for it to be re-discovered, in that case.) The logs aren't very verbose at all, but they should log any errors.

My last options are whether you've disabled "Smart Home integration" on your device settings, or if you're not updated to the 1.2.0 firmware, but the HA integration should detect both of those when setting it up.

grischard commented 1 year ago

Hello, and thank you for your reply.

This is indeed an aranet4 device, with smart home functionality switched on.

I manually added the integration via the web interface, saw my device, but then no entities showed up.

Deleting the integration and restarting HA made it appear in autodiscovery, and it has been working since.

grischard commented 1 year ago

Trying to reproduce this, and I'm not sure from what side to tackle this. I deleted the integration, restarted both HA and the sensor, and the device now doesn't show up in the autodiscovery. When trying to add it manually, it says "No unconfigured Aranet devices found.". The aranet sensor does correctly show up as unconfigured on my phone.

eltjo commented 1 year ago

I do have the exact same behavior.

aschmitz commented 1 year ago

The aranet sensor does correctly show up as unconfigured on my phone.

I'm a little confused by this. Have you been unpairing it from your phone? There's no actual connection that takes place via the Smart Home integration: the Aranet4 just broadcasts BLE packets with its reading, but Home Assistant never "talks back to it", so there shouldn't be any particular indication that it is or isn't configured.

For example, this is roughly the device settings page I'd expect you to see (in the Android app, I haven't seen it in iOS):

d0217707-e094-4c6d-b701-ace9a100c96d

If you have indeed been unpairing the sensor from the phone, I'd be interested to know if not doing that makes it work: it's possible the settings are being reset (to the default of a disabled Smart Home integration) when it becomes unpaired.

If you happen to have the ability to easily dump BLE broadcasts, it would be interesting to see the ones corresponding to the Aranet4 device (if any? they should exist regardless of whether the Smart Home integration setting is on or not, but in that case the integration should be listing them, even if just to tell you the integration is off and it can't proceed).

ex-nerd commented 1 year ago

I had this happen the first time I set it up. I then deleted the Aranet integration, restarted Home Assistant, and when I re-added Aranet everything worked properly.

issue-triage-workflows[bot] commented 1 year 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.