This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
Official

[APP] Owntracks client for Homey

245

Comments

  • I just can't get it to work...

    This is what I have done:

    Homey
    - installed Owntracks client and set it up to use only HTTP
    - created 3 users

    Android Oneplus 3 phone
    - installed Owntracks App 
    - created 2 regions and activated 'share' and a radius of 5

    In Homey I see that the 2 regions I created are seen. So, the url with my ID and token must be correct:
     
    20170728-10:36:18 received '{"_type":"waypoint","desc":"OG174","lat":XXXXXXXX,"lon":XXXXXXXX,"rad":5,"tst":1501002781}' on 'owntracks/Ernst/httpendpoint'

    In the flows I created the users I created in Homey show up, but the regions I created on my phone do not show up. 
    What am I doing wrong?

    If I create a 'geofence' on Homey in the Owntracks client, it shows up in the flows. But I thought that the regions in my phone - which the Owntracks client log shows - should be seen in the flow cards?
  • edited July 2017
    Eternity said:
    I just can't get it to work...

    This is what I have done:

    Homey
    - installed Owntracks client and set it up to use only HTTP
    - created 3 users

    Android Oneplus 3 phone
    - installed Owntracks App 
    - created 2 regions and activated 'share' and a radius of 5

    In Homey I see that the 2 regions I created are seen. So, the url with my ID and token must be correct:
     
    20170728-10:36:18 received '{"_type":"waypoint","desc":"OG174","lat":XXXXXXXX,"lon":XXXXXXXX,"rad":5,"tst":1501002781}' on 'owntracks/Ernst/httpendpoint'

    In the flows I created the users I created in Homey show up, but the regions I created on my phone do not show up. 
    What am I doing wrong?

    If I create a 'geofence' on Homey in the Owntracks client, it shows up in the flows. But I thought that the regions in my phone - which the Owntracks client log shows - should be seen in the flow cards?


    Right now the regions are not added automatically (only when a transition event occurs). In a next version regions will be automatically added as soon as they are created on the phone app. 

    For now you can manually add them on the homey settings page. As soon as they appear there, they will be available in the cards. 

    Oh and I have a OP3T, so it should work for you too. 

    Another thing, if you don't get a transition event, go and walk around outside to make sure you actually leave or enter a fence 
  • EternityEternity Member
    edited July 2017
    @MennoVanGrinsven

    Thanks for the quick reply!


    It's working after I increased the accuracy to 250:



  • @Eternity Glad it is working for you.
  • edited August 2017

    Important


    As you might know a new version of the SDK is developed by Athom. The owntracks app has been modified to be compatible with the new SDK. As soon as the 1.5 firmware is stable, the Sdk2 compatible owntracks app will also be published. 

    In the SDK2 version, the flow cards that support topics will be removed. 


    Now that HTTP is also supported, the cards that support topics will only raise questions. So please if you use cards with topics, migrate these to the cards that support user/geofence. 

    Thanks. 

  • @MennoVanGrinsven Great work! Will try and install it later today :) 
  • @MennoVanGrinsven Great work! Will try and install it later today :) 

    It's not completely finished yet. This was an announcement that the old flow cards will be removed. I still need to remove the topic cards from the app.json for example. The implementation of those cards have been removed, the definitions not yet. 
  • Version 2.0.1 has been submitted for approval to the beta channel.
    It has been rewritten for SDK2 and is using classes also.

    Added functionality is that it is supporting the publishing of waypoints. When you do that from your phone, all regions are send to homey and are added as geofences automatically.
  • @MennoVanGrinsven
    Great, thanks.

    I do have a request though (not sure if its even possible) currently the waypoints/regions are defined per user,
    would it be possible to have an option to have these shared or duplicated to other users?

    Why you ask?, well this way I can add the fences (once) in my app instead on every device separatly
    Auntie Bessie will live there regardless if my daughter or wife goes there.. 

    why don't you publish the waypoints to the other devices?
    This does not seem to work properly between Android and iOS

  • @techniman
    With  version 2.0.1 you can receive all waypoints / regions from the phone app. The owntracks protocol also has the possibility to push configurations to other devices. 
    At the moment this is not possible yet. 
    But this would only work for devices that are using MQTT. Not for devices using http. For http a change in the SDK is needed. Right now all responses send back to a device in the http response are formatted in a way that the owntracks phone apps do not understand.


  • Hi,

    I started to use Owntracks today. My hope is that it performs much better than other solutions for detecting presence. I must say it works better than Smart Presence app and build-in presence detection from Homey itself.

    Only I notice I get a lot of false positives. Homey thinks I'm away, but the phone is in my house. Then suddenly I get a push message that I'm at home again. I will show you my flow below:



    I set the Minimum accuracy to 250 in settings. The phone has a radius of 50. What can I do to make sure these false positives are gone and its working perfectly?
  • edited August 2017
    Set minimum  accuracy to 150  and enable the check for double enter events. Increase the radius to 75. 

    That is the data I am using
  • I will try, thx. Another question. When I'm further away than 75 and some time later I enter the fence (within radius of 75). How long does it take that Homey recognises this?
  • That depends on how fast your phone GPS is. As soon as the owntracks app sends the transition message, Homey knows that you are home (or in another defined fence). 

    Oh and try asking homey your location. (OK homey, wat is de lokatie van Roel) 
  • Hi, its works a bit better now with above settings. Thx for this. I asked Homey: "Ok homey, wat is de locatie van roel"

    This is what the logs say:

    20170824-11:51:44 Speech DETECTED
    20170824-11:51:44 wat is de locatie van roel
    20170824-11:51:44 No users found

    My user is called Roel. Is it case-sensitive maybe? Is there another reason it does not find the user?
  • Hi, its works a bit better now with above settings. Thx for this. I asked Homey: "Ok homey, wat is de locatie van roel"

    This is what the logs say:

    20170824-11:51:44 Speech DETECTED
    20170824-11:51:44 wat is de locatie van roel
    20170824-11:51:44 No users found

    My user is called Roel. Is it case-sensitive maybe? Is there another reason it does not find the user?

    Hmm could be case sensitive indeed. Have to take a look at that. Thx
  • Hi, its works a bit better now with above settings. Thx for this. I asked Homey: "Ok homey, wat is de locatie van roel"

    This is what the logs say:

    20170824-11:51:44 Speech DETECTED
    20170824-11:51:44 wat is de locatie van roel
    20170824-11:51:44 No users found

    My user is called Roel. Is it case-sensitive maybe? Is there another reason it does not find the user?

    Hmm could be case sensitive indeed. Have to take a look at that. Thx
    Did you found anything which will fix this?
  • @roel_hendr ;
    It's fixed in version 2.0.2.
    That version is in the beta channel, but requires firmware 1.5
  • Can I just upgrade Homey to 1.5 experimental without losing my settings/flows/etc?

    And what happens when 1.5 becomes stable at some point? Does Homey upgrade itself to this stable release without losing settings/flows/etc?
  • Upgrading to experimental will keep the settings. After going to experimental, you'll stay on experimental unless you reset your Homey completely. @roel_hendr Maybe it's easier to make an account on slack for these simple questions (here) or use the search-function of the forum (like here) or look at the Athom-site (here).
  • VicdBVicdB Member
    edited August 2017
    It worked like a charm until my settings were deleted (Homey FW1.5?) .

    Anyway, I re-added everything and it automatically added my device and geofence when changed...but:
    It will not show the device's current geofence under 'Fence'' in the app's settings.. like this: (Lon/Lat edited out)

    UserFenceLonLatBattery
    Vicx.xxxxxxx.xxxxxx41%

    In flows the geofence is available in the card, but It won't trigger because I am not seemingly there as shown above..?

    (The card to tell the current location of a user works as intended BTW, so the info is there..)

    Homey FW: 1.5rc9 // Owntracks 2.02 // CloudMQTT
  • edited August 2017
    @VicdB
    It shows here. Did you get a notification in Homey?  If an error has occured, the app sends a notification. Or check the log. If the speech card knows the fence, then it should show up in settings because its the same variable. 
    The settings page is not automatically updated.
  • Well nevermind , it worked again after entering another geofence and then back to my place..  <span>:smile:</span>

  • Hi,

    I upgraded a few days ago to 1.5.0-rc.9. I noticed first that Owntracks was not working anymore for my wife's phone. I have one fence called Home. My wife leaves home, travels by car, is away for hours, but still Owntracks thinks she is at Home. Also I didn't see any logs from her phone arrive in the Owntracks logging. I thought it was related to the Owntracks app installed on her phone, but everything worked fine there. Also triggered an enqueue several times. No success :(. For my phone it was still working fine.

    Today I experience the same with my phone. Owntracks thinks I'm still at home, but I'm already at work for several hours. The logging now shows every minute I think a log from my phone, but the location is not changing. I keeps thinking I'm at home.

    Also tried to restart the phone app and restarting the Homey app, no success :(.

    Can someone help me here? Before upgrading Homey (I was on 1.3.1) everything worked fine.
  • Btw, running v2.0.2. Anyone has same issues?
  • Btw, running v2.0.2. Anyone has same issues?

    Working fine for me. But it would be nice if i could see some logging.

    Do you see transition events?
    Did you install the new homey firmware?
    GPS accuracy is within limits?


  • I installed latest homey firmware yes.

    This is how logs look like now:



    I get events, but they are incorrect. I'm not at home atm. Also my wife is not. For my wife I don't get any events.
  • Hmmm. Well either the homey app isn't receiving the transition message because it is not sent by the app, or you location accuracy is not within limits. 

    You might want to try to increase the accuracy value. 

  • Radius is set to 75 on phone and accuracy value is set to 150 in Homey Settings. This worked fine before I upgraded to 1.5.

    I find it strange that I see these kind of loggings:

    20170830-14:44:19 handleOwntracksEvents called
    20170830-14:44:19 {"token":"004a8d97ff394ac355c37e5b226523f0"}
    20170830-14:44:19 {"_type":"location","tid":"te","acc":64,"batt":100,"conn":"w","lat":xxxxxx,"lon":xxxxxx,"tst":xxxxxx}
    20170830-14:44:19 received '{"_type":"location","tid":"te","acc":64,"batt":100,"conn":"w","lat":xxxxxx,"lon":xxxxxx,"tst":xxxxxx}' on 'owntracks/Roel/httpendpoint'
    20170830-14:44:19 We have received a location message
    20170830-14:44:19 Set battery percentage for Roel to 100%
    20170830-14:44:19 User Roel authenticated
    20170830-14:44:19 handleOwntracksEvents: true

    The latitude, longitude values are different every time such a log appears, but they are near my Thuis fence, while I'm not at home right now. I'm a few kilometres away from home.

    I noticed this:


    Maybe this has something to do with it?
  • I noticed that the logs I get have correct battery status. It was constantly 100%, I disconnected my charger for a while and now the events have 99%, 98%, etc. So the events come from my phone, but the latitude and longitude are incorrect.

    They are changing constantly but not to the values where I am. It seems like my phone thinks its on a complete different location <span>:smile:</span>

Sign In or Register to comment.