Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

RustyShackleford

macrumors newbie
Original poster
Oct 19, 2015
23
1
I have a couple of home projects that are centered around Arduinos (one controls custom landscape lighting circuits, and the other monitors HVAC performance). In each case, I control and interact by wifi, using a perlscript (running in Terminal on my laptop), or an Android app (created using MIT App Inventor). All of these send http "get" requests to the Arduino.

Currently, I just use the Arduino's local IP address (192.160.50.xxx). It tends to stay the same but occasionally changes, and this is a bit inconvenient. I've figured out how to make the Arduino request a static IP address, but it seems a better solution is to assign it a hostname.

I've done this in my ASUS router, assigning it a hostname (let's call it "foo"), as well as told it that the name of the local network is "local". So it seems I should be able to access from a browser using http://foo.local . But this doesn't work. The response looks like:

Code:
This site can’t be reached
Check if there is a typo in foo.local.
DNS_PROBE_FINISHED_NXDOMAIN

Any idea what is wrong ?
 
but it seems a better solution is to assign it a hostname.

I've done this in my ASUS router, assigning it a hostname (let's call it "foo")
How did you assign a hostname? Does the ASUS have a feature which allows you to match a network MAC address to a custom name, which is then added to DNS resolution provided by the router? It must if what you describe is going to work at all. What is your ASUS router model and what is the version of router system software?
 
How did you assign a hostname? Does the ASUS have a feature which allows you to match a network MAC address to a custom name, which is then added to DNS resolution provided by the router? It must if what you describe is going to work at all. What is your ASUS router model and what is the version of router system software?
ASUS RT-ACRH13, firmware 3.0.0.4.380_8228

I went to AdvancedSettings->LAN->DHCPserver, where I did it, I believe. Here's a screenshot the screen (the hostname is actually HVAC-monitor, and I masked its MAC address). Oh, and you can see I assigned the domain name as 'local'. And I clicked "Apply" when done.

Screen Shot 2024-12-28 at 1.22.08 PM.png
 
ASUS RT-ACRH13, firmware 3.0.0.4.380_8228

I went to AdvancedSettings->LAN->DHCPserver, where I did it, I believe. Here's a screenshot the screen (the hostname is actually HVAC-monitor, and I masked its MAC address). Oh, and you can see I assigned the domain name as 'local'. And I clicked "Apply" when done.

View attachment 2466561
First, the static IP you've assigned "192.168.50.184" is in the range of dynamically assigned IP addresses (see your starting and ending pool IP addresses). This will definitely cause conflicts with other clients on your network. Recommend you set your pool starting IP address to "192.168.50.20" and use IP addresses between "192.168.50.2 > 192.168.50.19" for any manually assigned IPs.

Second, ".local" is reserved for mDNS (Bonjour or multi-cast DNS) and will create conflicts. Use "home.arpa" instead. It is the preferred internal home network domain name. So, if the feature works as we suspect, after the change to "home.arpa", you should be able to reach your system using "hvac-monitor.home.arpa".
 
  • Like
Reactions: eas
Oh ok, good to know I change the automatic pool, so if I do use the static method, there won't be collisions.

When I changed the local network name to home.arpa, not only did it not work, but it completely broke my internet access, wired and wireless. So I changed back to local and it was still broken. Scary - glad the wife not home ;-). I had to restart modem and router to fix it all.
 
Oh ok, good to know I change the automatic pool, so if I do use the static method, there won't be collisions.

When I changed the local network name to home.arpa, not only did it not work, but it completely broke my internet access, wired and wireless. So I changed back to local and it was still broken. Scary - glad the wife not home ;-). I had to restart modem and router to fix it all.
So after restarting modem and router, the home.arpa works? Or not? If not, try lan instead. Your USUS router probably doesn't support home.arpa as a top level search domain. The home router at my current location does not... but it does support lan

Code:
❯ scutil --dns
DNS configuration

resolver #1
  search domain[0] : lan
  nameserver[0] : 192.168.106.1
  if_index : 12 (en0)
  flags    : Request A records
  reach    : 0x00020002 (Reachable,Directly Reachable Address)

resolver #2
  domain   : local
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 300000

resolver #3
  domain   : 254.169.in-addr.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 300200

resolver #4
  domain   : 8.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 300400

resolver #5
  domain   : 9.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 300600

resolver #6
  domain   : a.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 300800

resolver #7
  domain   : b.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 301000

DNS configuration (for scoped queries)

resolver #1
  search domain[0] : lan
  nameserver[0] : 192.168.106.1
  if_index : 12 (en0)
  flags    : Scoped, Request A records
  reach    : 0x00020002 (Reachable,Directly Reachable Address)
 
So, I did a little more dig-ing into the matter...

I run a rather bespoke network, and I probably made things more complicated than I could have.

FTTH -> Edgerouter 4

To the latter, I connect a Ubiquity US-8-60W (8-port Managed (4Lan+4PoE))

1 <- Er4
2 -> TL-SG1024 (TPLink 24-port Un-managed Switch)
3 -> LAG 3|4 -> Synology 920+
4 -> LAG 4|3 -> Synology 920+
5 -> UCK-G2 (PoE)
6 -> NanoHD (PoE)
7 -> NanoHD (PoE)
8 -> [unoccupied]

TL-SG1024:

1 -> rPi5 (PiHole duties)
2 -> CWWK AL-4L-V2.0 Intel n305 mini-pc running Proxmox (separate PiHole instance for redundancy, + other assorted totally-unnecessary CT/VM/etc.)
3 -> AirPort TC (4TB)
4 -> TP-SG105PE (two PoE IP Cameras)
Cat6A x 2 from the Office (various switches, Mac Studio, etc.)

Everything is Static except various WIFI devices (iPhone, iPad, etc.)

You and Bigwaff got me to tinkering...

I installed&configured dnsmasq on my Edgerouter.

The rPi5 and the Proxmox CTs are (currently) all Debian-based, and I can get most of them to talk with other devices on the network by first name (ping pi5, ping HomePod, etc.)

Not all working, yet!

Frustrating that I haven't yet been able to get the Studio to talk like lovers do . . . everything is just ": Unknown host" at this time 🤷‍♂️

Off to break the network (again)... ;)
 
First, the static IP you've assigned "192.168.50.184" is in the range of dynamically assigned IP addresses

The router should be smart enough to know that that IP is already reserved for a client, and won't assign it to another. even if it's in the range. The same way it won't double assign a number that it picks randomly.

one small thing to look for, if that IP has already been randomly assigned to a different client when you make the static entry. you'll need to reboot that other device (or refresh it's DHCP lease) so it will pull a new IP.

But I agree, I keep the static and pool range separate, for me it's about housekeeping, so I keep them separate, media stuff is in the 10s, home automation 40s, servers/nas in 50s, speakers in the 60s, and IP pool is 100-200.


To the OP, if you're an apple-ish home, check out homebridge, it allow you to add non-homekit stuff into homekit, it then has plugins for all sorts of things, including some that will make HTTP calls. Would allow you to control all of that stuff from the home app on your iphone, Mac, or iPad. Can also do sunrise/set or time based automations, Or have it turn the outside lights on as you drive up. YOu'll need a HomePod or appleTV for this to work the most reliably. You'll need a computer running all the time to run it though, it will run on a raspberry pi, or some NAS devices, also can run on any windows, Mac or linux machines. (not sure, since you say you made an app for android, but you're asking about networking in a Mac forum)
 
  • Like
Reactions: RustyShackleford
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.