Verify presence - User returns home

Good evening,

In scenes, you can use the action ‹ Check presence › however it seems that it only handles the case where the user leaves the house. Is there a reason?

Thanks in advance,

Hi @Romuald_Pochet !

Yes, to set presence, you must use the action « User seen at home » (« Utilisateur vu à la maison ») following a trigger (for example: a Bluetooth sensor seen at home).

The philosophy of this way of managing presence is to allow « multiple » detections and to let the user really do what they want (Bluetooth detection, GPS, facial recognition, button click, …),

I wrote a tutorial for the Bluetooth case (but which applies regardless of the detection mode):

@Romuald_Pochet I saw your PR, the problem with your approach is that detection is going to be too slow!

The point of using a trigger is that the user is set as « home » instantly, and not via a scene executed periodically.

Absence detection, by nature, can only work via a periodic approach (we check every X minutes), to allow some leeway if the sensor isn’t seen once but is quickly seen again.

The scene action even specifies this:

Good evening,

I agree with the principle in place, it’s just that I don’t like creating a scene :grin:

Wouldn’t it be possible to add, on the integration pages, for « presence-type » devices the ability to choose a user in order to manage (non-)presence automatically? For « those who want », scenes will still allow doing specific things.

Currently, each user is detected via ‹ Lan Manager ›, except me who also has a Tile (Bluetooth) but I don’t have much trouble managing the two identically (even if it’s true that if one of the two is missing that could indicate a problem).

PS: having 3 integrations in progress, I was imagining a template for each integration, along the lines of:

  • page ‹ Configuration ›: definition of parameters (/config: to get/update, /status: to get the status)
  • page ‹ Discovery ›: display of the integration’s « raw » devices
  • page ‹ Devices ›: display of devices in the ‹ Gladys › style (with room selection, user in the case of presence-type devices, feature updates…) and done in a manner independent of the integration…

That feels a bit like a black box, doesn’t it? How would you handle multi-device in that case?

We can discuss it in another thread if you want, it’s true that we could create a set of ready-to-use components for integrations to simplify development a bit and standardize the integrations’ interface :slight_smile:

What happens now:

single-device:

  • Device present = user present (via scene)
  • Device absent for x minutes = user absent (via scene « Verify presence »)

multi-device:

  • One device present = user present (via scene, so we could imagine something more complicated, like all devices must be present)
  • No device present for x minutes = user absent (via scene « Verify presence »)

I suppose the single-device case is probably the most common. For multi-device, we can imagine having a « necessary » device (the mobile phone (GSM) for example) and a « sufficient » device (

[quote=« Romuald_Pochet, post:6, topic:8374 »]
the advantage is that it

Totally agree, but I’m not talking about managing the return home via any kind of scan frequency (especially since presence detection, whether it’s the LAN manager or Bluetooth, is already based on a scan frequency); this box could act directly in response to a state change as we do with scenes.

Ok I understand better, but doesn’t that make it a bit redundant with the trigger?

Currently the recommended scene is:

« Quand mon porte clé Bluetooth est détecté » ALORS « Mettre utilisateur "PG" comme à la maison »

and you propose:

« Quand mon porte clé Bluetooth est détecté » ALORS « Mettre l’utilisateur "PG" comme à la maison si mon porte clé Bluetooth est détecté »