Localization with eedomus (part 2) : your house welcomes you

Share

We’ve already discovered  in first post how to send back your location to the eedomus controller using your android smartphone. We already know how to have spoken alerts in your house thanks to this  this other post. By using programming capabilities of eedomus controller in regards to location, your house will be able to welcome you when you’re arriving :

This vocal alert “Bonjour Vincent” is not so toyish that you would think about. It demonstrates that you smarthome system have recognized you at arrival, then alarm has been eventually deactivated and that all configured actions in that case will be triggered. A message “Bonjour Vincent” is for sure nicer than “Alarm has been deactivated”…

Creation of a state peripheral

A state virtual peripheral is used to store my status : at home, at work, arriving at home, … This peripheral will be updated in relation with location updates that are received.

In the configuration menu, do those steps to create it :

Push button “Add or
remove a device”

In the “Programming
Element” type

Add a State peripheral
loceedomus1_eedomusadddevice
eedomus_localization_programming_element eedomus_localization_state_device

eedomus_localization_state_values

List of values of this peripheral will contain the different location I’m managing. In my case there are 6 different states.

“En arrivée” (Arrival) state is important : this is indication that I’m near home, and that next external door opening will correspond to my final arrival. A door opening sensor is mandatory to have it happening.
Error case have to be handled also : if the door have not been opened during 10 minutes when my status is “Arrival”, I may have stopped somewhere on the road, and maybe I’m not going home. In this case I reselect a default value for location. The delay time is integrated by using a macro for that peripheral. This macro will be started when arriving near home, instead of changing directly the state :

eedomus_localization_state_macro

Programming

First part to be done is to update this state peripheral in regards to location received.
Eedomus is managing that case easily thanks to integration of specific conditions detecting arrival (or departure) of a geographical. This zone is defined by location coordinates and radius.

I have then several rules checking location in certain zones. Let’s consider the rule updating “Arrival” state :

eedomus_localization_rule_enarrivee

The first 2 conditions prevent the rule to trigger if already in arrival state or already at home.
The third condition is testing location itself. In this example a zone with 800m radius centered on my house is checked. Action that are triggered is to activate the macro defined above :

eedomus_localization_rule_enarrivee_action

The second part will check arrival in my house and trigger corresponding actions. A second rule is doing the job,it’s using those conditions :

eedomus_localization_detect_arrival_cond

The rule is activated in case of “Arrival” state and when front door is opened. In that case the following actions are triggered :

eedomus_localization_detect_arrival_action

  • macro is stopped to prevent it to put state value back to default value after the delay
  • Activation of vocal alert “Bonjour Vincent”
  • State update to “home” (Maison). My arrival is done !

Other rules have to be defined to answer to your needs : trigger specific functions, certain peripherals when you are arriving : alarm deactivation, blinds opening, start music, etc … Those rules should be triggered by state change, for instance “Home” state.

Share

Vincent Recipon

Propriétaire de ce blog. Owner of this blog.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *