Announcement

Collapse
No announcement yet.

Geo-location trigger and timers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Geo-location trigger and timers

    Have an issue where sometimes, at least twice a week, a phone updates it location outside a geofence area even though it has not moved. For example, HS indicated my phone left home and seconds later it was back home. This caused an automation to run because I entered the geofence area - 🤨 I cannot address the phone issue but I can the automation.

    I have 3 events based on my location:
    1. I leave home
      • Stop Coyote timer
      • Set Coyote to 0
      • Start Coyote timer
    2. When I enter my home geofence and Coyote timer < 5 minutes
      • Stop Coyote timer
      • Set Coyote Timer to 0
    3. When I enter my home geofence and Coyote timer > 5 minutes
      • Stop Coyote timer
      • Set Coyote Timer to 0
      • Run automation announcing "Coyote is home" or whatever it be
    The above seems to be an over kill. I would not want to do this for every user, is there a better way?

    Thank,

    CoyoteRay

    #2
    We use a secondary condition such as being near/inside an iBeacon, in our cars.
    Michael

    Comment


      #3
      I concur that some form of corroborating improves event-based notifications. Occupancy sensors if the automation is for everybody home or away, time of day to ignore geofence updates when they do not make senser, BLE keychain beacons. The more you have the fewer false positive you will get, but also increase the number of false negatives.

      Comment


        #4
        I feel your pain and this probably isn't your answer, but I've run into all kinds of issues from trying to use phones to make geofencing work. Carriers, apps, servers, internet issues, MYHS outages, signal level, etcetera have pretty much all caused failures for me. Having a USB BT in the car to add to the event trigger is pretty much required for any stability. "Sometime" on your trip it will likely get back to HS to know you really are gone. You may wish to have it update via an event based on something like a door opening so it doesn't get "stuck" on. That has caused failures for me before as well. To try to resolve all the other issues I'm about to try flipping the logic. I can't get any anybody to write a plugin to do this so instead I'm going to repurpose my daughters iPhone 8 when she upgrades soon (if/when apple comes out with the next one this fall). There are a bunch of BT LE packet types that not all chips that say they support BT 5 do, and while I can't seem to find those details for her 8, I'm hoping it does as well as my X.

        Anyway, I'm guessing AT&T won't give me much more than 100 bucks to turn it in. If it would solve this issue forever I'd gladly pay/lose more.

        When I say flip the logic... I'm going to load Geofency and Locative on it (talking directly to the IP of my HS4 server) and then put it on a charger where it will permanently connected with NO other dependencies to my home HS4 server over home wifi without needing a carrier (bill). Then I'll plug one of my USB BT LE transmitter devices into my car that has a published line of site range of about a mile (adjustable). I have not set this up yet, but I can't see any reason it won't work and it should completely remove depending on anything but my local network. After all, I'd think most in the group would agree that HS ability to run 100% locally is one of its best advantages over other products. Since one of the most promising/cool things about home automation is "automation," and by that I mean user not having to manually intervein for your home to respond to you, I'm still baffled that there's not a good "in the box" solution for this....yet. Somebody's going to make a ton of money when there is.

        Comment


          #5
          Another layer of improvement I use is setting up nearby geofences that are about 1/4 mile from the house on the roads that I use to travel away. If I enter these fences, then I am definitely away from the house.

          Comment


            #6
            Thank you all for your replies. The iBeacon solution sounds interesting, also a geofence on the only road leaving the subdivision will work as well. Thank you for the suggestions, for now I will use the geofence on the road leaving the subdivision and play with iBeancon (or something similar) in the future.

            Thank you again.

            Comment


              #7
              Sure thing...though I'm in a metro area my cell service when I'm approaching my house is "iffy." It's failed for all the other reasons listed as well, but BT seems to be the most reliable for me.

              I can't think of any home automation solution that "cloud" beats local and I doubt there ever will be.

              Comment


                #8
                What iBeason do you use? I purchased one from DSD Tech (off Amazon) and not happy with it.

                Comment


                  #9
                  I've been pretty happy with these...

                  Feasycom 4000m Mobile USB Long Range eddystone ibeacon

                  $31.99 on Amazon.

                  Comment


                    #10
                    I used Feasycom 500m with my BLE MQTT location isolation project. 50 ft range indoors was about all I could get with RSSI less than -100. An antennae on the 4000m would produce better range, but seems what would be even more important is the antennae on the receiver.

                    What are you using for the receiver? What range do you actually experience?

                    Comment


                      #11
                      I get a couple blocks, but it is physically located due to the location of my power outlet outside on the opposite side of the house from the direction I drive in from on the street. I truely believe their stats saying a mile with clear line of site. These things have range. Since a phone only seems to only need to receive a packet from it to trigger the Geofency app to being in range, I don't think it matters how powerful the receiver or transmitter on the phone is. ...as long as the phone supports the BT 5 version it needs to understand these BLE packets. I'm by no means the BT expert but this works for me. It's never the BT part that fails for me. It's the phone-to-Internet part due to poor reception in the street where it needs to send to MYHS.

                      As I've said a few dozen times on here, if some plugin could be on the server and read the BT events of one of these coming into range (IE One in my car and one on my server) the whole cloud part could be eliminated and would be far more stable. Mr. McSharry if you ever found a few spare cycles for writing a plugin it would run local and be awesome.

                      Meant locative

                      Comment


                        #12
                        I believe I have already done the plugin to recognize BLE presence detection where the BLE receiver is either a RPi or ESP32. If multiple receivers are used then it will also trilateral to to identify the position of the beacon. It looks like your use case is the simplest case of just a single receiver and detected vs not detected. Http://mcsSprinklers.com/mcsMQTT.pdf has a section on BLE location identification. Take a look if you are interested.

                        Comment


                          #13
                          I'd thought we'd chatted and this didn't work for what I wanted a while back. This is great news. Will give it a look. I've never programed one of these boards but assuming it is "relatively" easy? For all us plug and play people it'd still be great to be able to just plug it into the server. I'm guessing system variations make that more difficult.

                          THANKS!

                          Comment


                            #14
                            Wow...not sure how I got that lost. To clarify, I can plug a BT5x USB transceiver (the one mentioned above) into my Jeep and one into my server and it can be used to trigger an event? No phone required etc. The only need for the ESP etc. is when I need remote sensing?

                            That is the most awesome news sir!

                            Comment


                              #15
                              Wow...not sure how I got that lost. To clarify, I can plug a BT5x USB transceiver (the one mentioned above) into my Jeep and one into my server and it can be used to trigger an event? No phone required etc. The only need for the ESP etc. is when I need remote sensing?
                              My input is based upon
                              I've been pretty happy with these...

                              Feasycom 4000m Mobile USB Long Range eddystone ibeacon

                              $31.99 on Amazon.
                              I assumed you would plug the 4000m into your Jeep. This becomes the transmitter side of the communication.
                              On the receiver side (i.e. scanner) you will have either an off-the-shelf RPi 3 or RPi 4 including those sold by HST or you will need an ESP32 into which I need to install the program. Both the RPi and ESP32 have BLE built into the hardware so no dongle is needed. I did not do a port of the receiver for Windows which is what I assume you are intending to use for the BT5x. I can take a look at the Window's Bluetooth stack, but it is not an area I have programmed in the past.

                              On HS you will use the mcsMQTT plugin from where the Feasycom M4000m Figure of Merit, Location or Zone would be selected for association with HS device. When the property goes negative the beacon is no longer in range. Filtering algorithms can be tweaked to to establish how many announcements/pings are needed before triggering.

                              It is not plug'n'play as you will need to install the program in either the ESP32 flash memory or the RPi Linux SD card. The install process is described in the manual. The RPi install (17.15.6.1) is less involved. The ESP32 install is described in Sections 11.2 and referenced again in 17.15.1. The install is more involved than just loading a plugin.

                              Using the ESP32 the files in http://mcssprinklers.com/ESP32BLEScanner.zip are used to flash the firmware. Using RPi it is the files in http://mcssprinklers.com/BLEMQTT.zip



                              Comment

                              Working...
                              X