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


Search the Community

Showing results for tags 'geofence'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • FIBARO Community
    • FIBARO Portal and Forum policy
    • FIBARO
    • Say hello!
    • Off-topics
  • FIBARO Update
    • FIBARO System Update
    • FIBARO Mobile Update
  • FIBARO Community Support
    • Scenes and Interface
    • FIBARO Products
    • FIBARO Mobile
    • FIBARO HomeKit
    • FIBARO Assistant Integrations
    • Other Devices / Third-party devices
    • Tutorials and Guides
    • Home Automation
    • Suggestions
  • FIBARO Społeczność
    • FIBARO
    • Przywitaj się!
    • Off-topic
  • FIBARO Aktualizacja
    • FIBARO System Aktualizacja
    • FIBARO Mobile Aktualizacja
  • FIBARO Wsparcie Społeczności
    • Sceny i Interfejs
    • FIBARO Urządzenia
    • FIBARO Mobilnie
    • FIBARO HomeKit
    • Integracja z Amazon Alexa i Google Home
    • Urządzenia Firm Trzecich
    • Poradniki
    • Automatyka Domowa
    • Sugestie

Categories

  • Scenes
  • Virtual Devices
  • Quick Apps
  • Icons

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Facebook


Google+


Skype


Website URL


WhatsApp


Country


Gateway/s


Interests

Found 4 results

  1. This is a thread for iOSLocator QA that allows for tracking iPhones with the HC3. It is installed with QAUpdater The QA has been floating around in various threads in the past and this gives a home for discussions and new versions. QuickAppVariables HomeVar Defaults to 'iOSHome' and is the name of the global variable where home status is stored. Possible values: 'all_home', 'all_away', 'some_home', 'unknown' status Where all location info for users are stored HomeName Defaults to 'Home' Name of the place home. To avoid that home is logged as the HC3 name... AwayName Defaults to 'Away' Name of the place away from a location The QA uses the defined locations, defined in the general/location panel Inside the QA a table 'ACCOUNTS' need to be defined Ex. ACCOUNTS = { -- Fill in with iOS credentials { icloud={user="XXXX1", pwd=".."}, -- iCloud account, user is icloud email account. pwd is icloud account password devices = { { deviceName='iPhone', -- Is used to match against deviceName from icloud to find right phone deviceType='XS', -- Used to match against the deviceType of from icloud. Defaults to '.*' that match everything name='Bob', -- Name of user for this device id=2, -- HC3 user id. If not an HC3 user, assign your own id not conflicting with existing HC3 ids. Leave empty to auto assign an id. home=true, -- true if user is considered as part of the people living at home. QA="Bob's iPhone", -- If set will generate a QA child device (binarySensor) representing the user global="iOS_BOB" -- If set will update fibaro global variable will state of user }, { -- This is another user sharing the same icloud account but another device (ex. a child) deviceName='iPhone', -- It can also be used to track multiple devices for the same account. Note that they need different names. Ex. Bob_iPhone, Bob_watch deviceType='iPhone 6S', name='Tim', home=true, QA=true, -- Will use name (Tim) as name of QA global=true -- Will use "iOS_"..name as name of global variable }, } }, { icloud={user="XXXX2", pwd=".."}, -- iCloud account devices = { {deviceName='iPhone', name='Ann', id=3, home=true}, -- No QA } }, { icloud={user="XXXX3", pwd=".."}, -- iCloud account devices = { { name='Max', home=false, -- Family member not living at home (not counted in "all at home") deviceName='Apple Watch', deviceType='Apple Watch Series 6 %(GPS%)', -- Apple watch of specific model }, } }, } 'name' is username - should be without spaces and strange characters (used in global variable name) 'home' is true if user is part of people that live at home - used to decide if all at home etc. 'deviceName' is name of iDevice, matches so "iPhone" matches 'Jan's iPhone'. 'deviceType' is name of iDevice type. Also matches. 'id' is the HC3 user id. If the user is not an HC3 user the id is not needed. This allows the QA to track non-HC3 users too. QA if not nil creates a child device for the user with the status if the user is home or not global if not nil will create a global variables with the user's current place icloud.user is icloud username icloud.pwd = is icloud password Besides setting the global variables - that works for any user, not only HC3 users. If the 'id' field is set to a HC3 userID a GeofenceEvent will be emitted when user enter and leave locations, similar to the builtin geolocation function. If you use ER4 you can use rules to trigger on geo events. If id is set you can capture it with a rule like rule("#location{id=2,property=219,value='enter'} => log('User 2 entered home')") if not you can use the global variables rule("$BobLoc == 'Home' => log('Bob came home')") rule("$iOSHome == 'all_away' => log('All away')") iOSLocator.fqa
  2. My problem: I want to change the "modified" of a global variable to trigger scenes as well, because if you assign global variable the same value it had before, Fibaro does not change the modified entry. Here is my global variable used to document if I this person is at home or somewhere else. { "name": "Christian", "value": "Office", "readOnly": false, "isEnum": true, "enumValues": [ "Office", "Sport", "Home", "ontheway" ], "created": 1644958957, "modified": 1645209384 } We all know the geofencing works only properly if app is active on the smartphone. So it might happen variable still reports "Home" although the Person is not at home. Now the person get's home and geofence switch the Variable to "Home" again. This will not trigger the "modified" because it's still the same value. This means. the globals Person I am using in scenes as trigger does not trigger, beause vaue remains the same. So my intention was to change the "modified". I receive a result 200 (means works), but the "modified" does not change, although I am able to change the "value" for debugging test. Here is the LUA, and my question is, why does it work for Persondata.value (value change) and does not work for Persondata.modified (value remains the original one) local value, modified = fibaro:getGlobal("Christian") print(os.date("%c", modified)) local Person = "Christian" local Persondata = api.get('/globalVariables/'..Person) Persondata.value = "Golf" print(os.date("%c", Persondata.modified)) Persondata.modified = tonumber(os.time() - 1) print(os.date("%c", Persondata.modified)) PersonJSON = json.encode(Persondata) local http = net.HTTPClient() http:request("http://127.0.0.1:11111/api/globalVariables/"..Person, { options = { method = 'PUT', headers = {}, data = PersonJSON, timeout = 10000 }, success = function(response) local result = response.data; if response.status == 200 or response.status == 201 then fibaro:debug(response.status) -- Display('lightgreen', Text, 999) else fibaro:debug(response.status) -- Display('red','Error: ' ..response.status.. ' - Zugriff verweigert',0) end end, error = function(err) fibaro:debug(err) --Display('red','[ERROR] ' .. err, 0) end }) fibaro:sleep(6000) value, modified = fibaro:getGlobal("Christian") print(os.date("%c", modified)) print(value) and the debug is:
  3. 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: --[[ %% properties 2 Location %% events 379 GeofenceEvent 4 %% globals --]] local adminUserId = 2; local homeLocation = "XX.ZZZZZZ;YY.NNNNNN"; local startSource = fibaro:getSourceTrigger(); local userAdminPosition = fibaro:getValue(adminUserId, "Location"); local userAdminDistance = tonumber(fibaro:calculateDistance(userAdminPosition, homeLocation)); local isUserAdminHome = fibaro:getGlobalValue("UserAdminAtHome"); local homePerimeter = tonumber(fibaro:getGlobalValue("HomePerimeter")); fibaro:debug(json.encode(startSource)); fibaro:debug("---------------------------------------------------------------"); fibaro:debug(os.date("%a, %d.%m") .. " - " .. tostring(math.floor(userAdminDistance)) .. " m (perimeter " .. homePerimeter .. " m), Admin @home - ".. isUserAdminHome); fibaro:debug("=============================================="); if ( ( (userAdminDistance <= homePerimeter or (startSource["type"] == "event" and startSource.event["type"] == "GeofenceEvent" and startSource.event.data["geofenceAction"] == "enter") ) and isUserAdminHome == "no" ) or startSource["type"] == "other" ) then fibaro:startScene(231); -- run Admin Home scene end Outcoming log is:
  4. Hi All, I tried to use my iphone for presence/location detection in combination with the fibaro mobile app & HC2 locations. current location in the HC2 looks good. I tried making 2 blokscenes to test, one to send me an e-mail and push when leaving an area with range 100m and one for entering an area with range 100m. However, I never receive any push/mail, it looks like nothing is happening. The fibaro app has access to location data of the Iphone all the time. Am I missing something or is this just not working ?
×
×
  • Create New...