Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


2 Screenshots

About This File

Many users are trying to use GPS feature, but the functionality and use of HC2 location data are very confusing and most of the time don't work correctly.

The major advance of this scene that there is no use of HC2 defined locations and localization.

The scene triggered by location change, which received by HC2 and tracks users' presence according to predefined places. The scene sends notification (and could announce on user location in case TTS system has been defined and set) in three conditions:

  1. User arrived to one of the predefined places.
  2. User approaching to one of the predefined places.
  3. User leaves one of the predefined places.

You can define as many favorite places as you need. For example: Shopping Mall, School and etc. to track your family members. It helps to know if your kids are actually at school, and your wife at work and not at shopping mall.

Please note that in most of the time there is a gap of few minutes between user's actually location (physical) to location received by the system. Unfortunately in some cases no update received at all. I'm using this scene for few years and still don't have full understanding how the GPS mechanism works... when, how and why the location is updated by Fibaro mobile application and I believe  if the application closed on your mobile, no updates sent at all.

Based on above facts, I do not suggest to execute any actions based on user location (like to open gate, lights), but I do suggest to turn on heating system (gap of few minutes better than nothing, or you already at home and your system anyway is ON)

--=========================== USER CONFIGURABLE PARAMETERS ===============================
eMailId   = {2}   -- user IDs to send email. To include more users use: eMailId={2,5,20}
eMail     = true  -- if true, email will send
popupNote = true  -- if true, popup notification will send to all users.
pushNote  = true  -- if true, interactive push notification will send to users, which can receive Push notifications as defined at "Access Control" panel at "Mobile devices list" section.
_TTS      = false -- text to speech message. Please before setting to true, make sure to update locationTts() function with your TTS setup.  Default code in function based on Text to Speech - Android phone/Tablet scene and could be downloaded from https://forum.fibaro.com/files/file/180-text-to-speech-android-phonetablet/
--list of users ID and names (the reason to include names, is because the name could be email address in the system). Set scene %%properties accordingly to IDs in list. Please update according to your system
GPSuser = {{2,"Alex"},{190, "Tammy"},{457,"Leon"}}              
--list of points of interest to follow users' arrival, approaching or leave. Please update/add according to your favorite locations. Make sure that place coordinates are few times more accurate than locAcc variable below.
GPSplace = {{"Home","62.1747177;64.8820022"},{"Work","62.244312;64.842668"}}
ignoreGps = 1     -- Amount of hours to consider the location is too old and ignored. Default to ignore over one hour old user location.
locAcc = 300      -- Defined GPSplace area in meters, to assume presence in place.

           distGap=150       -- Distance between current and previous locations to avoid messages in case same location received several times.

 

By executing the scene manually, table with users' last location and their distance from predefined places will be displayed.

  • Please use this feature to verify that the users' location data is receiving and updating by HC2.  hasGPS column shows if user has GPS (means if location has been ever sent from this user) and how frequently GPS position is collected.
Spoiler

Capture.PNG.0abb0123dda98fb49c9a4b6a33ed3dd9.PNG

 

When the scene is triggered, follow information on debug window displayed:

User name, his previous and current location and timestamps. Current distance of the user from all predefined places

Spoiler

Capture.PNG.75e8684272a21183fa72e7c3441e9330.PNG

 

I hope it will do the job for you.


What's New in Version 1.0   See changelog

Released

Bug fix

Manually executed scene shows error below

 [DEBUG] 01:30:19: 2019-01-31 01:30:19.852868 [  fatal] Unknown exception: /opt/fibaro/FibaroSceneAPI.lua:116: attempt to concatenate local 'deviceId' (a nil value)


User Feedback

You may only provide a review once you have downloaded the file.


AR27690

   0 of 1 member found this review helpful 0 / 1 member

Such a simple application that does an excellent job. Exactly what you looking for.

A good example that you think to yourself, how come I didn't thought about it?

Giovanni_Genoa

  

It looks a good idea,

I Am interested abou it.

I will study better and make use of the info for other purposes

during debug i get following error, any id?

Some setup from my side?

Thank You.

 

 

[DEBUG] 21:50:54: 2019-10-21 21:50:54.772341 [ fatal] Unknown exception: /opt/fibaro/scenes/38.lua:67: attempt to index a nil value

Response from the author:

Looks like you didn't updated user Ids table

GPSuser = {{2,"Alex"},{190, "Tammy"},{457,"leon"}}    

You must to set IDs according to your system.

×
×
  • Create New...