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

GPS location problem


jompa68

Question

Hi, when i run a scene based on user location i get this error message:

[ERROR] 11:39:33: line 10: attempt to call method 'calculateDistance' (a nil value)

Here is my test scene (just a simple test to see if it works)

Please login or register to see this code.

Any suggestion what it could be that is wrong?

Runing latest beta version

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0
Guest GG

Please login or register to see this code.

This test, with a misspelling of calculateDistance generats the same error:

[Error] 17:52:21: line 7: attempt to call method 'calculateDistance2' (a nil value)

That is, the same error message is displayed for a method that should not exist. I think the method calculateDistance is somehow not implemented.

Fibaro guys, any comment on this?

Link to comment
Share on other sites

  • 0

GG, Lambik, please use docs before calling us

Please login or register to see this link.

Link to comment
Share on other sites

  • 0

Tried the example from your link:

Please login or register to see this code.

where I changed 123 to my GPS ID.

Still got the same error.

Please login or register to see this image.

/emoticons/default_icon_curve.gif" alt=":-/" />

Link to comment
Share on other sites

  • 0

Please login or register to see this code.

what you get?

Link to comment
Share on other sites

  • 0

[Error] xx:xx:xx: line x: attempt to call method 'calculateDistance' (a nil value)

Link to comment
Share on other sites

  • 0

Lambik, .... use my code and tell me resault

Link to comment
Share on other sites

  • 0

Sorry, did not read your post good enough

Please login or register to see this image.

/emoticons/default_icon_redface.gif" alt=":oops:" />

When I use your code I get a timestamp followed by coordinates.

edit: BTW, I used my own GPS ID, which is 2 instead of 123

Link to comment
Share on other sites

  • 0

ok thats mean that user never got coordinates that way is error

start gps and get one record in family panel then it will start working

here is example that function is working

Please login or register to see this code.

Link to comment
Share on other sites

  • 0

With your code I still got the same error in my virtual device in debug screen:

[ERROR] 00:52:04: line 9: attempt to call method 'calculateDistance' (a nil value)

Using version 3.572 beta with Android app version 1.2 beta

Link to comment
Share on other sites

  • 0

Lambik, because that function is now only for scene

Link to comment
Share on other sites

  • 0

Okay? Can I use only the blocks or does it work in a scene with LUA?

Link to comment
Share on other sites

  • 0

it will work in lua in scene

Link to comment
Share on other sites

  • 0

Will this function be added for virtual devices in a future release?

Checked it in a Lua Scene. It works.

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.

×
×
  • Create New...