Using the presence feature via LANmanager

Hi everyone,

With the param lan manager and the two scenes presented in the Bluetooth post, everything works well!

I still need to tune the refresh delays to get good responsiveness and add an exception for the night

1 Like

Great @francois, that’s good if it works! :slight_smile:

L’autre possibilité sinon c’est d’utiliser Owntracks ( Owntracks | Gladys Assistant ) avec le GPS et de détecter quand le téléphone sort d’une zone.

Afterwards, it might be less accurate than LAN Manager, you’ll have to test!

Having tried both, LAN manager is simpler to set up and use.
Owntracks needs to be set up for each user with an individual token, generated as admin, which you then have to hand over, and the app no longer launches at phone startup (an Android requirement, it seems). It has to be done manually (which the kids never do). However, an option has appeared in Google Home that might possibly work, but I haven’t looked into it yet…

2 Likes

Good evening, community,
I’m sorry to come back to this topic, I like to « fully understand » :slightly_smiling_face: And I’m unclear about how the presence of a device on the LAN network works.
I had tested managing my presence/absence with the tutorial made for Bluetooth. And it works :ok_hand:.
But I asked myself the following question: Why does the state change of a LAN device only work for presence? If it worked for absence, we would use exactly the same scene for presence and absence.
Then I tested presence for my wife, but using another method (the one described above by @gaelbillon and @francois: retrieve the presence state and if presence = 1 then OK, instead of using the state change). And that doesn’t work, she is always present. And reading this conversation I understand that ultimately « presence » is always equal to 1.
So here’s what puzzles me:

  • is it normal that presence is always equal to 1? Or: when does the value change?
  • I don’t understand why @GBoulvin’s scenes work (I’m not disputing that they work, I just say I don’t understand why they work :thinking:): from what I understood of Gladys’s operation (but I may have misunderstood, hence my post) the first scene sets the user always absent. @GBoulvin if you run your scene « Parti de la maison » manually, are there times when it doesn’t set the user absent? If yes, I don’t understand (and that would contradict the fact that presence is always 1 :upside_down_face:). If no, I don’t understand how your presence is correctly managed :thinking: :thinking:. Indeed, if your first scene sets absent even if the phone is present on the network, how does Gladys set you back to present when there is normally no state change? Unless the network scan every two minutes systematically causes a state change when the device is detected. And if that’s the case, maybe that’s why we cannot make a state change on absence.
    If you can shed some light for me (hoping I was clear in my questions).
    Thanks :blush:

That’s perfectly normal and it never changes :slight_smile:

Presence devices (Bluetooth, LAN Manager) are devices that are « seen » by Gladys; each time Gladys « sees » them she records a state of 1 (and the date/time when she saw the device), which means ‹ this device was seen at that moment ›

To know if someone is present, we look at the date when the device was last seen and compare that with the time limit after which we consider a user to be absent

@pierre-gilles Thank you for this initial insight.
And as for the state change of a LAN device, I suppose that the detection of the state change used in a scene is based on the change of the detection timestamp. Is that right?

Exactly, only the date is useful; the « 1 » we don’t care about :slight_smile:

:+1: Everything is clear!

1 Like

Hi,

I’m bringing this up again.
Do you notice a difference between Android and iPhone?

At night, my Androids remain visible on the network
My iPhones go to sleep..

And no, it’s not my daughters sneaking out over the wall every night

On iPhone, to preserve as much battery as possible it goes into deep sleep, which is why the LAN Manager solution on iPhone isn’t 100% effective.

1 Like

So it must be the same problem with Bluetooth, right?

1 Like