Can't add my Huawei Router to HA for geofence

Hello HA-community,

What I really want to set up is a good geofencing for automations. I have tried “owntracker” but there is a big time difference between leaving and arriving home. So it ain’t reliable. I have read that you can add your router, when you leaving home you are not longer connected to router so HA thinks your are not at home. But my problem is that I can’t add my Huawei router. I tried several options from internet like this yaml:

device_tracker:
  - platform: huawei_router
    host: 192.168.1.1
    username: secret
    password: secret
    new_device_defaults:
      track_new_devices: true

This yaml won’t work, so I tried to replace “huawei_router” to “huawei_lte” with this I get the following error:
" Invalid config The following integrations and platforms could not be set up:

Who can help me with a good solution for my router or a good geofence idea.
All my phones have a “device_tarcker_…” but there is also a time difference.

I have hassio 4.15 on RPI 4 version 0.116.4

Thanks in advance.

Your sincerely
Bas

Which Huawei router do you have?
Did you try the official mobile app yet?

@Burningstone, thanks for your reply.
I have A Huawei HG659
I have tried the Huawei integration by using configuration --> intergration --> huawei_lte , but with no godd result. There I get the following error: “Unknown error connecting to device”

I can’t see the router on the supported devices list in the docs, so it may not be supported.

From where is this device_tracker coming?

this device tracker is made by HA when you install the HA-app on Android phone and add a person (name from who this phone belongs)

And this is not accurate?

no, not really, when I leave the house it sometimes takes half an hour before HA ‘realizes’ this.

That doesn’t sound normal. Mine reacts within 5 minutes. Do you have background activity enabled for the app? The phone app also has a sensor for the WiFi connectiom, does this update faster?

sorry, I have looked into those settings but can’t find them.
Could you please help me with this settings?

  • backround activity and wifi connection (both I can’t find)

In the sidebar go to App Configuration and then Manage sensors. There’s a category for the location sensor where you can change these settings.

thank you very much, find it!
one more qustion: what do you mean with background activity? Can’t find this

There is also a custom ping sensor (in HACS) which I find works very reliably with my phone as well…

thanks for the tip, but I’am a newbee to Hassio. How do I set this up / where can I find this?

I eon’t know how it’s called exactly, but it’s in thr location sensor category as well. Background location or something like this.