-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
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
Allow ibeacons with no name but a allowlisted minor #104419
Conversation
Hey there @bdraco, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
I think I'd be ok with this if the android app merges a change to make this the default value. Also please adjust white list to allow list in the PR description and code |
c6f2100
to
d013f0d
Compare
Cool, I'll prepare a PR, pretty confident they'll merge it.
Done. |
Small improvement: since the old companion defaults are |
02203b7
to
01df260
Compare
01df260
to
6e43007
Compare
Im kinda worried there will be requests for now values. I think it would be better to add the allow list as an option flow so they can add and remove specific ones. It could default to the one used in the android app |
If the list is user configurable, wouldn't it make more sense to whitelist UUIDs instead of minor values? It's more precise and more flexible. The point of the minor whitelist was to avoid user configuration. A cleaner solution if we accept user configuration:
|
Hey guys we have just merged home-assistant/android#4027 which sets the default to the new minor value. This will be part of the beta that goes out tonight to the play store. This means that any user who already had the sensor enabled will need to adjust their values to match whats allowed in this PR. In order to change the values users can do so in the app settings directly or remotely using a notification command
out of all the options mentioned I think this will be the most user friendly. Look for the sensor ID |
@bdraco was suggesting to make the minor-whitelist user configurable (cause users will ask for more options), and my point was that if we add a user-configurable option, it should better be a UUID-whitelist. But this would take some time to implement & test. Given that the android change is already merged and will be released soon, maybe we can start with the current PR as-is, with no user configurable options. If it's not sufficient and users ask for more options, we can then implement a user-configurable UUID whitelist (including the auto repair feature). |
I'd rather do the allow list once instead of having to do a breaking change in a second PR to change the implemention |
Makes sense, maybe I can find some time to implement it this weekend (can't say for sure). |
I made a new PR (#104790) to keep things clean. I think it turned out pretty neat, note that it's completely transparent for companion users. |
Hi, may I point that it solves the problem inside home assistant with its own companion app. What about beacons without names that cannot change minor (i supposed it exists) and, in my case, advertising a name with HA app to an outside device (such as espresense or nuki_hub) ? |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Closing this PR, which was abandoned in favor of #104790 (now merged and released). |
Proposed change
This is an attempt to workaround #80357. The ibeacon integration ignores beacons with empty/default name, to avoid some users getting lots of "garbage" devices.
The problem with this, however, is that several "software" beacons do not allow the user to set a name.
Most notably, this is the case of the HA android companion app, setting a name seems to be techincally challenging. As a consequence, users get the totally unexpected behaviour that HA does not recognize beacons from its own app! (Other android beacon simulator apps have the same issue.)
Whitelisting UUIDs could be a solution, but it's not an ideal user experience. Each user would need to find and configure their UUID, which could in principle be automated, but with further complications.
So the workaround proposed by this PR is to whitelist a list of magic minor values instead (currently set to
40004
). Any beacon with minor40004
is accepted, even if its name is empty.Then, the companion app can be configured to have
40004
as the default minor (and document its meaning).Advantages:
Drawbacks:
40004
(in my limited testing I didn't see any).Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: