iPhone changes mac address in wifi how to track?

I have a unifi udm pro connection. I had an automation that when my in-laws came over and their phones connected to the network the basement heat would increase, bathroom floor heat on, and ice maker turns on. It worked for 6 months but this time it didn’t. I see that iPhones change their MAC address so I can’t trace this anymore through unifi. Anyone else have this problem and figured out a work around?

The easiest way is to Disable MAC Randomization on iOS Devices for your network in the iphone - then the MAC address stays the same!


I read about that, but these are my in-laws. Not my phone.bseems weird to mess with their settings for me!

If somebody wants to use my wifi, they have to play by my rules :slight_smile:

I am sure if you explain the why and where they’ll understand?
The changes will only be effective on your home wifi!

It is very easily done: How to disable Private/Random MAC Addresses in iOS devices (youtube.com)

The only alternative I could think off:

  • When the MAC changes, then HA will give the new entity a new name
  • Is there something in the name that stays the same (i.e. lindas_iphone, lindas_iphone_1, lindas_iphone_e, etc. etc.)?
  • if yes - maybe you could make a group with that information - i.e. name the group “inlaws” and list the members of the group with a placeholder (i.e. “star"lindas"star”)?
  • not even sure if groups will accept placeholders to be honest

If all that fails - make a button on the dashboard called “inlaws” and push it when they arrive :slight_smile:

1 Like

My experience of this is that while iPhones randomise their MAC addresses, they tend to keep the same random one for a specific WiFi network. Have you changed the SSID of your network recently? Or have these MAC addresses just changed out of the blue?

I can assure you, Iphones will change the MAC address without a change of SSID.
Sometimes the MAC will stay constant for 6 months - other times it will have a new MAC within a couple of days - they will sometimes even go back to a previously used MAC.

I played that game for quite some time, so I guarantee you - the only way to fix it reliably is to switch private mode off on the phone.

Fair enough, I must admit, anyone who connects to my home network has the private mode switched off (all family members). We have students live with us as well and they connect to the guest network, some come back to visit and have had the same MAC address for a couple of years, one of whom I know definitely has a randomised MAC address, and I think may others do as it’s now the default behaviour on iPhones. I guess it’s just luck though, and obviously can’t be relied on. Apologies for muddying the waters.