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

Official Homey Android App discussion topic

1111214161724

Comments

  • MarcoFMarcoF Member
    edited June 2016
    Presence detection is a pain in the ...

    If we both leave the house, in most cases only one of us is detected as leaving and the same for coming home.
    Its detecting us as away when we are in the garden, just walking to the car (which is parked within WiFi range 15m from the house), sometimes its just triggering while sitting on the couch....and for this last case I haven't found any clue of how and why its triggering.
  • How is it implemented? Is it just gps and wifi or is cell tower location also used? Perhaps the range should be set wider.
  • Currently, the app looks at the wifi signal. When connected to wifi, and Homey is reachable through it's local IP (this would explain the VPN false positive) it detects users as being home. When the network state changes (and I mean ANY change) it'll check again if Homey is reachable. If not, it'll check if GPS is in high accuracy mode and if so, switch to the GPS fallback. Cell-tower based location measurement is not good enough to predict whether you're home or just one street away. Therefore, if high accuracy mode is disabled, it'll set you to away immediately. 

    @Phuturist This would probably explain your issue, as you don't have high accuracy mode enabled. Ofcourse I can't speak for your phone, but generally GPS signals are only used when an app asks for it, and shouldn't consume too much power. Can you try turning it on for a few days and give any feedback on whether that solved your issue or not? 

    The reason it triggers when switching access points is probably because it has no internet connection for a very short time. I'll see if I can build a time-out or something around that. Another possibility is that the second access point is on another subnet, and Homey cannot be reached through it's local IP address, and high accuracy location mode is disabled on your phone.

    MarcoF said:
    Presence detection is a pain in the ...

    If we both leave the house, in most cases only one of us is detected as leaving and the same for coming home.
    Its detecting us as away when we are in the garden, just walking to the car (which is parked within WiFi range 15m from the house), sometimes its just triggering while sitting on the couch....and for this last case I haven't found any clue of how and why its triggering.

    A very real possibility is that your phone is a bit aggressive when going into standby, and is killing the wifi connection. Normally it shouldn't relay those events to the app, but that behaviour isn't really specified in Android. When your phone is in high accuracy location mode, you shouldn't have any trouble with this, as the GPS should kick in to verify whether you're at home or not. Can you check if your phone(s) are in high accuracy mode, and can you check if Homeys' location is set properly (you can check in the Settings screen)

    How is it implemented? Is it just gps and wifi or is cell tower location also used? Perhaps the range should be set wider.
    It's GPS only, as cell towers aren't reliable enough. The range should be 80m plus the accuracy of the GPS signal and the (inverse) certainty of Homeys' location, so in most cases well over 100m.
  • MarcoFMarcoF Member
    edited June 2016
    @superice;
    Here's a screenshot of Location and I suppose its "configured" right?


    Also received a flow-email when I left my work building.
    Location within Homey is set correct and double check it this morning.

  • superice said:

    @Phuturist This would probably explain your issue, as you don't have high accuracy mode enabled. Ofcourse I can't speak for your phone, but generally GPS signals are only used when an app asks for it, and shouldn't consume too much power. Can you try turning it on for a few days and give any feedback on whether that solved your issue or not? 

    Will do so and let you know ... :+1: 
  • @superice ;
    Is it possible to add a location check even if the app can find homey on the local ip adress? This way the vpn issue can be solved. You mentioned that on every network change, the check are performed. So the check could be like this:
    - Network change detected (guess by the android framework)
    - Check homey local IP
    - check location
    - if (location != home) && vpnDetected then !home

    Guess there is an api call to check for vpn http://stackoverflow.com/questions/16355008/detect-behind-vpn-in-android

  • @superice ;
    Is it possible to add a location check even if the app can find homey on the local ip adress? This way the vpn issue can be solved. You mentioned that on every network change, the check are performed. So the check could be like this:
    - Network change detected (guess by the android framework)
    - Check homey local IP
    - check location
    - if (location != home) && vpnDetected then !home

    Guess there is an api call to check for vpn http://stackoverflow.com/questions/16355008/detect-behind-vpn-in-android

    Yes, but the problem is that a location check is time expensive, which means that it would take a long time (anywhere between 10s and a few minutes) for your phone to tell Homey you're home. We find this is too long.

    The requirements of home detection are pretty well defined: walking in should be detected as soon as possible, but going away is not really a problem; nobody gets hurt if your lights are on for three more minutes. Using these requirements, getting a GPS location isn't really an option, as it just takes too much time for your phone to get a GPS fix.

    What we probably could do (but I'd have to test that extensively) is do a cell-tower based confirmation when you're on VPN. That wouldn't garantuee anything (accuracy to a few hunderds of meters, or even a few km) but the app would be able to verify if you're on the other side of the country, or when you're close-ish to home. But again, we'd have to test that extensively to make sure it doesn't take too much time to do that check.


  • edited June 2016
    @superice well that is what I meant. I am not talking about an exact position. Position based on cell tower/wifi is what I meant. You only need to do the addition check if a VPN connection is available . Getting a GPS location is too expensive indeed . 

    If you like, I could test my use case . 
  • jordenjorden Member
    @superice to be honest, I would be pretty much satisfied if it would detect me as "home" as soon as I am on the same wifi network. That means I am already out of the elevator and in front of my house :)
  • jorden said:
    @superice to be honest, I would be pretty much satisfied if it would detect me as "home" as soon as I am on the same wifi network. That means I am already out of the elevator and in front of my house :)
    That is exactly what is happening right now. Only the away-clause is more complicated because wifi signal might drop randomly. That's why we have GPS to fall back on :)
  • jordenjorden Member
    OK, that's awesome :)
  • MarcoFMarcoF Member
    edited June 2016
    On my Vera is programmed a simple ping from the Vera to our Android phones (yes thats not working with ios).
    I also experienced random false positives in the case WiFi was dropped. I solved this with a simple 10 pings threshold and works great.

    If ping == OK then home
    If ping == NOT OK and pingNotOkCount > 9 then phone/person left home

    So maybe its an idea to make some sort of delay or threshold on the WiFi drop and so not directly act on one WiFi drop situation.


  • MarcoF said:
    On my Vera is programmed a simple ping from the Vera to our Android phones (yes thats not working with ios).
    I also experienced random false positives in the case WiFi was dropped. I solved this with a simple 10 pings threshold and works great.

    If ping == OK then home
    If ping == NOT OK and pingNotOkCount > 9 then phone/person left home

    So maybe its an idea to make some sort of delay or threshold on the WiFi drop and so not directly act on one WiFi drop situation.


    We know. That is what the GPS fallback is for.
  • I am not receiving any notifications still on my S7 edge, is this a known issue?
  • MarcoFMarcoF Member
    superice said:
    MarcoF said:
    On my Vera is programmed a simple ping from the Vera to our Android phones (yes thats not working with ios).
    I also experienced random false positives in the case WiFi was dropped. I solved this with a simple 10 pings threshold and works great.

    If ping == OK then home
    If ping == NOT OK and pingNotOkCount > 9 then phone/person left home

    So maybe its an idea to make some sort of delay or threshold on the WiFi drop and so not directly act on one WiFi drop situation.


    We know. That is what the GPS fallback is for.
    Nice! Hope to experience it soon :)
  • In the meantime: are there any people that are seeing the audio wave become laggy after some time? There is exactly one person in the office here that has trouble with that, but I haven't been able to reproduce it yet. The issue occurs when you have the audio wave running in the app in the foreground for quite some time apparently. If you guys notice any behaviour like that, please let me know :)
  • superice said:
    In the meantime: are there any people that are seeing the audio wave become laggy after some time? There is exactly one person in the office here that has trouble with that, but I haven't been able to reproduce it yet. The issue occurs when you have the audio wave running in the app in the foreground for quite some time apparently. If you guys notice any behaviour like that, please let me know :)
    Yup, that probably happened to me as well. My phone totally froze up the other day until the Homey app crashed and all went back to normal. Didnt think much of it back then as this sometimes happens when not using the Homey app as well but the fact that it came back to live the instant the Homey app crashed made me suspicious. I'll see if it happens again and will send a crash report if it does.
  • Phuturist said:
    superice said:
    In the meantime: are there any people that are seeing the audio wave become laggy after some time? There is exactly one person in the office here that has trouble with that, but I haven't been able to reproduce it yet. The issue occurs when you have the audio wave running in the app in the foreground for quite some time apparently. If you guys notice any behaviour like that, please let me know :)
    Yup, that probably happened to me as well. My phone totally froze up the other day until the Homey app crashed and all went back to normal. Didnt think much of it back then as this sometimes happens when not using the Homey app as well but the fact that it came back to live the instant the Homey app crashed made me suspicious. I'll see if it happens again and will send a crash report if it does.
    That sounds like another issue I've been encountering, but yes, I'd be very interested in that as well. 

    By the way, just in general: crash reports are awesome! Love those! If you encounter a crash, please report it. I don't really care that much about descriptions or other info, but the debugging information in those reports are so incredibly useful, they're almost as good as plugging a phone directly to my laptop :)
  • bvdbosbvdbos Member
    Yes, I see this too, after a minute or two. However, turning my phone 90 degrees (portrit to landscape) resets this. So that should narrow it down a bit I hope.
  • Yes, I see this too, after a minute or two. However, turning my phone 90 degrees (portrit to landscape) resets this. So that should narrow it down a bit I hope.
    Yeah, that's the view getting rerendered and starting over. Can I ask what phone you use?
  • bvdbosbvdbos Member
    edited June 2016
    Fairphone 2, r4275 -> android 5.1, kernel 3.4.0-perf-gd1d087c with qualcomm MSM8974PRO-AA
  • MarcoFMarcoF Member
    A few minutes ago my "User X left" flow triggered and while;
    1. I left home almost 5 hours ago
    2. "normally" this happens when I leave my work building
    3. this time I did not left the building

    Very strange and I have no idea why it triggered.....
  • MarcoFMarcoF Member
    This evening, while watching TV on the couch, again a false "User X left".
  • MarcoF said:
    This evening, while watching TV on the couch, again a false "User X left".
    And you're absolutely sure you have enabled accurate location? Because that is necessary for the app to even consider location as a fallback for flaky wifi.


  • MarcoFMarcoF Member
    I send you a private message. 
  • @superice ;
    When are devices that do not have the android app installed get removed from the list in Homey? At the moment o have 4 devices listed, but only one has the app installed (actually 2 entries are from the same device).

    Perhaps as a reminder that when you factory reset / wipe an Android device, it gets a new hostname. 
  • I've just released a new build of 2.2 to the beta channel (build 47). If no critical bugs are found, this will be the version to be going to the stable channel. It has all kinds of new improvements, mostly under the hood. You'll hopefully notice the app feels a lot sturdier!

    Because the app breaks compatibility with the old internal settings format you'll probably all have to log in again. This is expected behaviour and can't be avoided without very nasty tricks on our side. On the bright side: this allows you to view our now properly animated login screen ;)

    Work on the home detection is still ongoing. If it doesn't work properly, please report what happened, what behaviour you expected, and what the app actually did.

    @superice ;
    When are devices that do not have the android app installed get removed from the list in Homey? At the moment o have 4 devices listed, but only one has the app installed (actually 2 entries are from the same device).

    Perhaps as a reminder that when you factory reset / wipe an Android device, it gets a new hostname. 
    This is actually something we still have to build, but in our opinions it isn't that urgent because except for the extra entries in the list, there is no damage whatsoever.



  • Hi @superice ;

    When can we expact this update for iOS?
  • Fire69Fire69 Member
    Just installed it, seems way more responsive!  Cards load much faster :)
    Also doesn't seem to crash anymore when switching between apps.
  • Installed it too. No more crashes! :) I hope it will detect it when I get home tonight.
Sign In or Register to comment.