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

Mobile device location not working


Question

Posted

I am trying to get the location of my mobile phone inside LUA scene.

 

- I have turn on for fibaro app on mobile phone to get location always (not only while using the app)

- I have set up in configuration to retrieve location for device every 1 minute (most frequent)

- My lua code:

 

local location
local location2

 

location = fibaro:get([mobileDeviceId], 'Location')
location2 = fibaro:getValue([mobileDeviceId], 'Location')

 

location and location2 are always nil when I run the scene manualy (start button)...

 

I have right mobileDeviceId ( I have create a block scene for push notification which I recieve and than convert the scene to LUA to find the deviceId - so I have correct Id...)

I am not sure  if I should retrieve the location with fibaro:getSourceTrigger() function and than check the GeofenceEvent 221 but in this case I think I can only get true/false if device is in certain range that I defined and not the latitude / longitude  that I want to have to calculate the distance etc...

 

Is this even posible with fibaro to get the exact location from mobile device in lua code?

 

Thank you for your help

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.

×
×
  • Create New...