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


  • 0

Geofence looks broken - events as scene triggers [HC2]


kevgeniy
 Share

Question

Hello!

 

I have HC2 v4.590 and suffer over the user arrive and leave scenes which allow to determine home area entering or leaving by event GeofenceEvent. This event never triggers. Tried to leave and enter home perimeter which set in Localization panel for that location many times. So I've added "Location" property scene trigger.

Of course, I have Fibaro app 1.27.0.0 installed and running on my Samsung S9+ (Android 10), all requested app permissions are given, phone ID in Lua scene is correct and location ID is correct too - checked many times.

Could anybody tell me what's wrong?

 

Scene code is:

Please login or register to see this code.

Outcoming log is:

 

Please login or register to see this image.

/monthly_2020_06/image.png.1021a74d857aad4c369f6a5ab1a87f99.png" />

Edited by kevgeniy
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
  • Inquirer
  •  

    On 6/18/2020 at 2:21 AM, SmartLifeSystems said:

     

     

    Hi!

     

    Can you send me some pictures your localization settings? I have got a C2 too since february, but the localization never worked. I have got 2 Iphones, and i don't understand what's the problem.

    The home menu i haven't got Family panel.

     

    Can you help me?

     

    I tried the app reinstall, and the HC2 reboot, but nothing..

     

    Hey!

    Geofencing works more or less reliably on HC2 4.590. But this may change at next firmware updates  :) 

     

    Family panel will appear when at least one of your HC2 users got a iOS/Android smart phone with Fibaro app installed and connected (see steps below). 

     

    3.jpg.fa6eeadc18b021f061da30a228067a0d.jpg

     

    First,

    You need location ID. Create home location in Localization panel. Btw I recommend to use quiet big location radius like 200-300 m.

    Save it. On my screenshot below location ID is 4.

     

     

    Please login or register to see this attachment.

     

    Second,

    You need to install Fibaro app to both your phones. Login the phones to your HC2 (if these devices belong to different people, they should use their own HC2 user credentials). Make sure both phones connected and able to control the HC2.

     

    Third,

    Now you need to go to Configuration -> Access Control (see section "Mobile devices list"). Make sure both your phones are shown there. If not, make sure that both phones are connected to your HC2 with correct user credentials and can control it.

    You need to get the mobile devices ID's from the HTML page source. It's kinda tricky.

    Use Chrome/Edge browser inspector - in the section right-click first "check box" and choose "Inspector" from context menu. You'll see the Inspector panel (here on the right). The panel will show this box's HTML tag selected and one of the properties (like "id" or "onclick") contains the mobile device ID (always use NUMBER ONLY - see red circle!). Here it's 379.

    Do the same inspection for second phone's "check box" web element and pick its ID too.

     

     

    Please login or register to see this attachment.

     

    Now you've got IDs of the place and both iPhones.

     

    Fourth,

    Add these IDs as geofence event to some scene's header to trigger it by this event - you need phone ID (379 is for my device, you should use own phone ID), word "GeofenceEvent", and location ID (4 is for my location, you should use own place ID) delimited by spaces. Like this:

    Please login or register to see this code.

    You see one device as scene trigger, but you can use both - just add another one GeofenceEvent line with proper device ID and place ID below the first one.

     

     

    Fifth (optional),

    Process enter/leave event inside the scene like: 

    Please login or register to see this code.

     

    NOTE: User's location is tracked by Fibaro app running on smart phone, so GPS service and supporting network positioning services must be always turned ON.

    Also make sure that both phones are running Fibaro app on screen or in background. Prevent phone OS or power mode settings (or whatever living in your phones) to close this app when it runs in background! If app is closed, user location tracking will be stopped and geofence event will not fire on HC2 unless you start the app manually again.

     

    What about bad news?

    The geofence events will not trigger "always and in time" due to mobile internet issues, or no GPS signal (or at least WiFi connection), or bad connection to Fibaro cloud.

    HINT: I do additional checks is anybody at home by PIR sensors breach and IP cameras with face recognition.

     

    What I could do more?

    Change user's GPS position polling interval to 5 or 1 min.

    NOTE: This setting impacts on mobile device's battery work time.

     

     

    Please login or register to see this attachment.

     

    Please login or register to see this attachment.

     

     

     

     

     

     

     

     

    Ignore next screenshot. I couldn't delete it when I've edited the post. :)

     

    Please login or register to see this attachment.

    Edited by kevgeniy
    Additional info and text style fixes on user's request
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Update:

    I've rebooted my HC2, set GPS collection data period to 5 min for admin and reinstalled Fibaro app on phone. Event works fine now, property "Location" and all its processing can be deleted from scene.

     

    Please login or register to see this code.

     

    Edited by kevgeniy
    Link to comment
    Share on other sites

    • 0
    On 6/3/2020 at 6:37 PM, kevgeniy said:

    Update:

    I've rebooted my HC2, set GPS collection data period to 5 min for admin and reinstalled Fibaro app on phone. Event works fine now, property "Location" and all its processing can be deleted from scene.

     

    Please login or register to see this code.

     

     

     

    Hi!

     

    Can you send me some pictures your localization settings? I have got a C2 too since february, but the localization never worked. I have got 2 Iphones, and i don't understand what's the problem.

    The home menu i haven't got Family panel.

     

    Can you help me?

     

    I tried the app reinstall, and the HC2 reboot, but nothing..

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

     Share

    ×
    ×
    • Create New...