Skip to content
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

don't require IP address or fully qualified domain name #6

Open
jmissig opened this issue Apr 22, 2022 · 18 comments
Open

don't require IP address or fully qualified domain name #6

jmissig opened this issue Apr 22, 2022 · 18 comments
Labels
enhancement New feature or request

Comments

@jmissig
Copy link

jmissig commented Apr 22, 2022

Is your feature request related to a problem? Please describe:
My fans did not have fixed IP addresses. I modified my network set up to get my DHCP server to assign them fixed IPs for now, but wish I didn’t have to.

Describe the solution you'd like:
No idea what exists in this version of the Big Ass Fans protocol, but the older Haiku fans plugin supported discovering fans if I told it how many to expect.

@jmissig jmissig added the enhancement New feature or request label Apr 22, 2022
@jmissig
Copy link
Author

jmissig commented Apr 22, 2022

Wanted to add: Thank you very much for making this plugin!

@pponce gave me a heads-up that this plugin existed before I had updated my Haiku fans. I got them updated, got them fixed IPs, and now they’re working great with this plugin.

I have a Haiku H-series, an I-series, and an I-series with a light.

@oogje
Copy link
Owner

oogje commented Apr 23, 2022

I'm all for this. If someone tells me what message the Big Ass Fans app sends out to trigger discovery I'll give it a shot that much quicker.

I could maybe address the fans using their "hostname" rather than IP if that would helpful in the meantime. I just noticed I can connect to mine as BigFan.local.

PS - thanks

@jmissig
Copy link
Author

jmissig commented Apr 23, 2022

Yep it’s in no way urgent for me now, but it’s a step that I think would help others who want to get started using these fans with Homebridge. I’ll share if I figure anything out.

@oogje
Copy link
Owner

oogje commented Apr 23, 2022

Turns out (per my test just now) if you use the fan's hostname instead of an IP address in the config, it works just as well.

@jmissig
Copy link
Author

jmissig commented Apr 23, 2022

Interesting! I’m not having much luck with that just yet.

(julian@saga)=(~)=(% host 172.16.1.238
238.1.16.172.in-addr.arpa domain name pointer Entryway.
(julian@saga)=(~)=(% ping Entryway.local
ping: Entryway.local: Name or service not known
(julian@saga)=(~)=(% ping Entryway.local.
ping: Entryway.local.: Name or service not known
(julian@saga)=(~)=(% ping Entryway       
ping: Entryway: Temporary failure in name resolution

@oogje
Copy link
Owner

oogje commented Apr 23, 2022

@pponce discovered his Haiku's hostname was Haiku-xx:xx:xx where his fan name was Haiku and after the dashes the last 3 octets of his MAC address. He found it using either Discovery or wifiman iPhone apps.

@jmissig
Copy link
Author

jmissig commented Apr 23, 2022

Thanks. I’m looking at what my Ubuntu NUC is telling me from avahi-browse. I see Fanname xx:xx:xx advertised but haven’t been able to figure out the mapping to the hostname I can use for ping. It does seem like a bug (on the Haiku’s end) if the advertised reverse host for address doesn’t map directly.

@oogje
Copy link
Owner

oogje commented Apr 23, 2022

Lol, you just stepped outside my comfort zone.

@pponce
Copy link
Collaborator

pponce commented Apr 23, 2022

@jmissig have you tried to ping
Fanname-xx:xx:xx.local
I also see it advertised as “Fanname xx:xx:xx” but the above ping works.

@jmissig
Copy link
Author

jmissig commented Apr 23, 2022

@pponce yeah trying various combinations of that now — that seems like the intended mapping — but they’re all failing. Looking more like a bug in my mDNS setup on this computer at the moment 🤷

+   eno1 IPv4 Entryway XX:XX:XX                             Web Site             local
=   eno1 IPv4 Entryway XX:XX:XX                             Web Site             local
   hostname = [Entryway-XX\058XX\058XX.local]
   address = [172.16.1.238]
   port = [31416]
   txt = ["mac=XX:XX:XX:XX:XX:XX" "path=/FW000007-GEN3"]

Edit: For anyone coming across this thread, if you have a Linux box using avahi for mDNS, the command to generate the above is avahi-browse -r _http._tcp

@jmissig
Copy link
Author

jmissig commented Apr 23, 2022

Oh! It works now. ping Entryway-XX:XX:XX.local is succeeding. I tried that before and it was failing. mDNS it is a mystery.

Edit: For the record, Big Ass Fans folk if you’re reading this, I still think something in your mDNS advertising is incorrect if the IP reverse lookup is yielding a different hostname here:

(julian@saga)=(~)=(% ping Entryway-XX:XX:XX.local     
PING Entryway-XX:XX:XX.local (172.16.1.238) 56(84) bytes of data.
64 bytes from Entryway (172.16.1.238): icmp_seq=1 ttl=128 time=4.27 ms

@oogje
Copy link
Owner

oogje commented Apr 23, 2022

Cool. Thanks for confirming this.

@oogje
Copy link
Owner

oogje commented Apr 23, 2022

Now I have to ask, what's port = [31416] in the above avahi-browse -r _http._tcp output? I only know about port 31415.

@jmissig
Copy link
Author

jmissig commented Apr 23, 2022

Seems to be an HTTP session (makes sense, since it’s advertising an HTTP address in mDNS!). I’m trying some basic GET requests (at least, what I think are basic requests) and they’re all returning 400.

@oogje
Copy link
Owner

oogje commented Apr 23, 2022

interesting 🤔

@jmissig
Copy link
Author

jmissig commented Apr 23, 2022

Definitely! I’ve not been able to yield anything of interest yet, but there’s something responding negatively to HTTP requests on that port.

@oogje
Copy link
Owner

oogje commented Apr 23, 2022

perhaps the ghost of firmware past (or yet to come).

@pponce
Copy link
Collaborator

pponce commented Apr 23, 2022

I use the iOS “Discovery” app.
Within that I go to the
“world wide web http, _http._tcp.” row.
When I click into that, I see my fans.
And if I click on a fan, amongst other details i see
FanName-XX:Xx:XX.local:31416
so I also see this 31416 port.

@oogje oogje changed the title don’t require fixed IP address don't require IP address or fully qualified domain name May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants