-
Notifications
You must be signed in to change notification settings - Fork 1
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 to specify only the unique part of mDNS (i.e. 5 characters of the device ID) #2
Comments
Just about to open another issue, but I think, I can place that here: Why did I do that? I just ordered more air-Q devices and I do not want to remember each one's magic 5 digits. Instead I like to use my DNS entries (e.g. I tracked the issue down to For now I use the IP address of the device, this is still better than the mDNS. |
An additional thought: I would rather like to see an option to choose.
The user must choose by radio button, which option he wants. |
Curious idea, thanks for experimenting. And it is a fair point that even in its present form Keeping the proposed HA UI aside at the moment, do you believe that dropping the validation would suffice? The only thing that aioairq does is posting GET requests to Unfortunately, I have no immediate ability to test such settings. Could you, by chance, test if simply removing the validation call can do the trick? If you are using a local installation of home assistant (as opposed to running it in a container for example), you should be able to locate |
Simply dropping the validation is fine for me. And I see say that from the looks of the code. Unfortunately, I cannot test this. I am running HA productive with HA Supervisor. This is the most restrictive piece of software I ever dealt with, I cannot even SSH into the real machine, everything is managed by HA. I assume, you more easily can test this. Edit this file
Append a new line like The setting usually works instantly (if Windows does not play along, latest after a reboot).
This command should output the IP you assigned. If that's still too much trouble, you have https://github.com/CorantGmbH/aioairq/blob/main/tests/test_core.py. I did a |
Thanks for the suggestion, I'll try to test it in the upcoming days |
Just a quick update from me. This repo now has as a branch with a little test, which appears to work just fine following your, @theHacker, proposition. I'll proceed to prepare a PR for HA. As of the original mDNS interpolation idea, I'll see if it can be conveniently accommodated within the HA integration too (without any explicit UI, but maybe with a try-except clause instead). Until such attempt, I'll keep this issue open. |
@theHacker, the latest release of HA includes the changes to |
Only the 2024.1.0 has the new dependency, not the linked 2023.12.4. Gave it a try, upgrading to HA 2024.1.0, and changed for one of my air-Qs the IP to a FQHN. For anyone wanting to do the same thing: The community forum warns about changing this file manually, but it works. (I wouldn't recommend the only available UI way, deleting and then re-creating the device. Most likely, this will lead to new entities and in consequence loss of all your history on the air-Q! I did not try that out.) |
My apologies for the wrong link. |
Currently
core.AirQ
can be instantiated with either IP address or full mDNS string, both accepted implicitly and interchangeably.It may be convenient, to be able to interpolate the latter from only its unique part. Smth along the lines of
The question is simply about a good design pattern for
AirQ.__init__
to allow for either an IP address, full mDNS, or a 5 character serial number substring.The text was updated successfully, but these errors were encountered: