Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • About Bonfire
Michael Jack
Michael Jack
@mjack@mastodon.bsd.cafe  ·  activity timestamp 21 hours ago

I wanted to set up presence detection in Home Assistant without exposing my installation to the internet, and without giving the companion app on my phone access to location data.

I use MikroTik network gear at home, so I added the Mikrotik integration to Home Assistant. It showed my phone as a MAC address, connected through Wifi, and I used that as device tracker. Everything seemed fine, but then the next afternoon. the device tracker still showed me as Away.

I then discovered that GrapheneOS (edit: Android rather, see below) uses a different random MAC address for each connection to a network, as default. Changed it to use a static random MAC for my home network, and now it works as intended.

All this to avoid running the Morning Coffee automation if I'm not even home.

#homeassistant #mikrotik #grapheneos

https://www.home-assistant.io/integrations/mikrotik/

Screen shot from Home Assistant -> History for person Michael, showing me Home, Away, and then Home again. This matches my phone's connection to home network.
Screen shot from Home Assistant -> History for person Michael, showing me Home, Away, and then Home again. This matches my phone's connection to home network.
Screen shot from Home Assistant -> History for person Michael, showing me Home, Away, and then Home again. This matches my phone's connection to home network.
  • Copy link
  • Flag this post
  • Block
aquarius
aquarius
@aquarius@f.cz replied  ·  activity timestamp 20 hours ago

@mjack have you considered using Owntracks and integrating that into your HomeAssistant? In that case you'd only need to expose a MQTT server where the phone would be pushing its location, you could even set up a dedicated MQTT server just for this purpose and bridge the owntracks topic to your main instance to avoid exposing other sensitive data.

  • Copy link
  • Flag this comment
  • Block
Michael Jack
Michael Jack
@mjack@mastodon.bsd.cafe replied  ·  activity timestamp 20 hours ago

@aquarius

I hadn't, but I only want to detect if my phone is home or not, and make that information available to Home Assistant.

In a previous thread someone suggested setting up a Bluetooth connection between the phone and Home Assistant, but the MikroTik integration seems even simpler to me.

  • Copy link
  • Flag this comment
  • Block
EF
EF
@EF@mastodon.bsd.cafe replied  ·  activity timestamp 20 hours ago

@mjack I'd like a 'static random MAC'.

  • Copy link
  • Flag this comment
  • Block
Michael Jack
Michael Jack
@mjack@mastodon.bsd.cafe replied  ·  activity timestamp 20 hours ago

@EF

They are called "Use per-connection randomized MAC" and "Use per-network randomized MAC" in settings.

Are you randomly mocking me? 😉

  • Copy link
  • Flag this comment
  • Block
EF
EF
@EF@mastodon.bsd.cafe replied  ·  activity timestamp 17 hours ago

@mjack not mocking and its understandable but made me smile.

  • Copy link
  • Flag this comment
  • Block
Don 🚫
Don 🚫
@DonTheMaster@mastodon.social replied  ·  activity timestamp 21 hours ago

@mjack this is a standard Android feature, at least in ASOP the rotating MAC is normal. FYI

  • Copy link
  • Flag this comment
  • Block
Michael Jack
Michael Jack
@mjack@mastodon.bsd.cafe replied  ·  activity timestamp 20 hours ago

@DonTheMaster

Thanks, I didn't know that, updated my post. The phone only had Android on for as long as it took to install GrapheneOS.

  • Copy link
  • Flag this comment
  • Block

BT Free Social

BT Free is a non-profit organization founded by @ozoned@btfree.social . It's goal is for digital privacy rights, advocacy and consulting. This goal will be attained by hosting open platforms to allow others to seamlessly join the Fediverse on moderated instances or by helping others join the Fediverse.

BT Free Social: About · Code of conduct · Privacy ·
Bonfire social · 1.0.1 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Code of Conduct