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


iOSLocator


jgab

Recommended Posts

31 minutes ago, jgab said:

It has nothing to do with your current location.

This error

[19.06.2022] [10:13:42] [ERROR] [QUICKAPP1802]: Error {"type":"error","msg":"Access denied for Sjaak :{\"data\":\"\",\"status\":401,\"headers\":{\"X-Responding-Instance\":\

says that you are denied access to iCloud by ....Apple. (status 401)

Usually that is because of wrong credentials.

 

I admit that the error you get is strange. The 401 should have generated another type of error. and the data is an empty string too...

It's almost like you are blocked by Apple. Can you log in again to iCloud and see that it works?

Maybe you have hit them too many times with bad credentials in the past so they have blocked your IP?

 

In the code there is a line

Please login or register to see this code.

change it to another number by modifying the last digit and see if it changes anything

Please login or register to see this code.

 

I am getting the same error random of my users

 

Edited by ChristianSogaard
P
Link to comment
Share on other sites

I can logg in both iCloud accounts without any problem, in find my phone it shows both iPhones.

The number is changed and makes no difference the error is still there

But wierd iPhone Arleta is recognised by IOSlocator but my iPhone not and both has the error.

//Sjakie

Link to comment
Share on other sites

  • Topic Author
  • What's the name of your iPhone? The .device field in USER is matched against the phone name. Check what your phone is named and what your wife's phone is named. I guess hers contains the string "iPhone" and yours not ?

     

    The error could be because you are polling to often so the services denies the requests. Change 

    INTERVAL = 90 

    to something that is 60*number of users. If you are 4 set it to 240.

    • Like 1
    Link to comment
    Share on other sites

    Jan, there was a typo in, excuse me. device= 'IPhone Sjaak'>>> corrected in 'iPhone Sjaak', as shown in iCloud

    Error is still there for both iPhones.

    //Sjakie

     
    Link to comment
    Share on other sites

    an, 

    Why I get HC3-00002249 and not Thuis

    Please login or register to see this code.

    Please login or register to see this image.

    /monthly_2022_06/image.png.a48ce7f02eff331e582800a20526e8da.png" />

     

     

    Please login or register to see this code.

     

     

    Edited by Sjakie
    add all_home difference solved
    Link to comment
    Share on other sites

    Jan, this I can't figure out.

    Check>>>>GV $Loc_Arleta  is Vertrokken

    Error attempt to perform aritmic on a nil value

     

     

    Please login or register to see this attachment.

    This rule give error

    Please login or register to see this code.

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • Here is a new beta of iOSLocator.

    I haven't added it to the QAUpdater yet as there are most likely errors to iron out.

    The configuration is done in the main file.

    The format of the config has changed. Have a look in the file.

     

    -Now there are iOS accounts configured that have device that can belong to users.
     This means that there is one device per users. If you want to track many devices make several users. ex. jan_iPhone, jan_macBook.

     It also means that one iOS account can have devices assigned to different users.

     Users that are not HC3 users can be given a fake id (not conflicting with HC3 user ids) or are assigned a generated id.

     The QA can also track non iOS users that make use of the HC3 apps built in location tracking. (experimental)

    -There is the option to create child devices for each user that have the value true when at home (turned on by default)

     

    Sometimes there may be an 401 error (like in the old one) but it will continue to try - it's usually temporary.

    I'm working on some improvements fir the retries...

     

    Feel free and try it out and provide feedback for errors etc.

     

     

     

     

    On 6/24/2022 at 9:36 PM, Sjakie said:

    Jan, this I can't figure out.

    Check>>>>GV $Loc_Arleta  is Vertrokken

    Error attempt to perform aritmic on a nil value

     

     

    Please login or register to see this attachment.

    This rule give error

    Please login or register to see this code.

    //Sjakie

     

    The operator is '-='

    no space between '-' and '='

     

    Edited by jgab
    Link to comment
    Share on other sites

    Jan, Thanks!!

    There is about 6 minutes difference between home comming/ leaving of myself and my wife is it possible the QA poll together?

    Thanks,

    //Sjakie

     

    Link to comment
    Share on other sites

  • Topic Author
  • 47 minutes ago, Sjakie said:

    Jan, Thanks!!

    There is about 6 minutes difference between home comming/ leaving of myself and my wife is it possible the QA poll together?

    Thanks,

    //Sjakie

     

    The new QA will have different poll strategies - stay tuned.

    Link to comment
    Share on other sites

    Jan error:

    Please login or register to see this code.

    [26.06.2022] [16:32:30] [TRACE] [QUICKAPP1821]: Home set to 'HC3-00002249'

    Variable is set 'Thuis'

    Edited by Sjakie
    • Thanks 1
    Link to comment
    Share on other sites

    Thank you ? you added both support for non IOS users and child QA per user.

    This is truly amazing, 

     

     

    What is the benefit ud adding - the user id - 

     {deviceName='sdfghj', name='abc', id=2, home=true},

    Edited by ChristianSogaard
    P
    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, ChristianSogaard said:

    Thank you ? you added both support for non IOS users and child QA per user.

    This is truly amazing, 

     

     

    What is the benefit ud adding - the user id - 

     {deviceName='sdfghj', name='abc', id=2, home=true},

    The QA emits location events with the user id. They can trigger a scene or another QA.

    So, if the id is the same as the HC3 user id it makes things easier.

    For users that are not users' on the HC3, you can make up an id (not colliding with existing) or let the QA create them.

     

    For the Android users you ad them to the HC3USERS table - and they need to have the same id as on the HC3 otherwise it will not work.

     

    I will fix some bugs and have some optionals for the polling scheduler - hopefully by tomorrow.

    Edited by jgab
    • Thanks 1
    Link to comment
    Share on other sites

  • Topic Author
  • Ok, new version (v0.41)

    1. Some bug fixes.
    2. Child devices show battery level of device. Can be used in a rule to turn on/off the phone charger at night?
    3. There is a QAname option in the device config that is used as the name for the child device, otherwise the name is used.
    4. There are 3 variables that control the polling of iCloud accounts

    SCHEDULE_TIME = 90 -- seconds
    SCHEDULE_INTERVAL = false -- true=delay SCHEDULE_TIME between each account poll, false=delay SCHEDULE_TIME/#accounts between each account poll
    SCHEDULE_KEEP_TOGETHER = {} -- {{'XXXX1','XXXX2'}} -- poll these accounts at same time - beware that it can be throttled by Apple if polled too often

     

    Keep together is experimental and it could turn out that you get more 401 errors. In general it seems like if the account (or the client) is polling too often you get throttled.

    The iPhone's own FindMy seems to poll once every minute - so setting it up in that way would work.

    If there is a 401 Access denied - don't panic, it will just try again the next loop.

    If we get more than 6 consecutive errors I disable the polling of the account just for safety...

     

    When the settings options in the main file stabilises I will add it to the QAUpdater.

     

    Edited by jgab
    • Thanks 1
    Link to comment
    Share on other sites

    1 hour ago, jgab said:

    Ok, nova versão (v0.41)

    Please login or register to see this attachment.

     

    1. Algumas correções de bugs.
    2. Os dispositivos filhos mostram o nível da bateria do dispositivo. Pode ser usado em uma regra para ligar/desligar o carregador do telefone à noite?
    3. Há uma opção QAname na configuração do dispositivo que é usada como o nome do dispositivo filho, caso contrário, o nome é usado.
    4. Existem 3 variáveis que controlam a pesquisa de contas do iCloud

    SCHEDULE_TIME = 90 -- segundos
    SCHEDULE_INTERVAL = false -- true=atraso SCHEDULE_TIME entre cada pesquisa de conta, false=atraso SCHEDULE_TIME/#accounts entre cada pesquisa de conta
    SCHEDULE_KEEP_TOGETHER = {} -- {{'XXXX1','XXXX2'}} -- pesquise essas contas ao mesmo tempo - cuidado, pois pode ser estrangulado pela Apple se pesquisado com muita frequência

     

    Keep together é experimental e pode acontecer que você receba mais erros 401. Em geral, parece que, se a conta (ou o cliente) estiver pesquisando com muita frequência, você será estrangulado.

    O FindMy do iPhone parece pesquisar uma vez a cada minuto - portanto, configurá-lo dessa maneira funcionaria.

    Se houver um acesso 401 negado - não entre em pânico, ele apenas tentará novamente no próximo loop.

    Se obtivermos mais de 6 erros consecutivos desabilito o polling da conta apenas por segurança...

     

    Quando as opções de configuração no arquivo principal estabilizarem, eu o adicionarei ao QAUpdater.

     

    @jgab

    following the posts, I was in doubt.....does this new version work for android users too?

    thanks

    Link to comment
    Share on other sites

  • Topic Author
  • 8 minutes ago, jorge rintaro said:

     

    @jgab

    following the posts, I was in doubt.....does this new version work for android users too?

    thanks

    No, for Android users it can use the location trigger generated by the HC3.

    It's kind of a limited use for Android but can help if you have a mix of iOS and android users (and you get the android geolocation to work...)

    Link to comment
    Share on other sites

  • Topic Author
  • New version. v0.42

     

     

    Please login or register to see this code.

     

    On 6/27/2022 at 1:23 PM, marczu_83 said:

    Hi!

     

    Thank you for the QA,

    is there is a way to track airtag?

     

    I don't have one myself.

    Do you see it in the log list of the devices for the account?

     

    Edited by jgab
    Link to comment
    Share on other sites

  • Topic Author
  • v0.43 - fix for what devices are location enabled.

     

    On 6/27/2022 at 1:54 PM, marczu_83 said:

    unfortunately not

    Please login or register to see this code.

     

    Ok, my AirPods Pros shows up.

    Edited by jgab
    Link to comment
    Share on other sites

    On 6/27/2022 at 2:10 PM, jgab said:

    v0.43 - fix for what devices are location enabled.

    Please login or register to see this attachment.

    Ok, my AirPods Pros shows up.

    some comment for this version.

    Im getting "Home status: Unknown" all IOS users has polled successfully.

    My 4th user (Marius) is not counted in - only the 3 primary IOS accounts are here.

    And - It created all the childs, when importing the QA - but when i replaced the users with my own. The QA cleaned up the Childs, but did not create new ones for my users.

     

    HC3USERS = {
      {deviceName='OtherPhone', name='Marius', id=949, home=true}
    }

     

    Please login or register to see this attachment.

     

     

    Edited by ChristianSogaard
    P
    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
    Reply to this topic...

    ×   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...