Announcement

Collapse
No announcement yet.

Possible integrate The Tile as a presence sensor

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

    #31
    Originally posted by mrhappy View Post
    I am in the market for a presence detection system although I am not overly keen on paying for a tile that only lasts a year and does not have a replaceable battery (although I would do my best to take it apart and either replace the battery or convert it to run off a power supply (for a car)), I actually don't have a house to put a system in although that will hopefully change early next year so I don't really want to buy something for no reason at the minute.

    If no one has picked up the baton by then I will look at doing something, my thoughts at the minute are a Linux install (be it R-Pi or whatever), BTLE dongle and then the Python BluePy package. A small Python script can easily talk to HS via the new JSON interface, albeit from the brief research I think it would be limited to just ascertaining whether or not a device is in range rather than trying to talk to one.
    Adam,

    Thank you for your insight. I believe I came across some BLE tags that have replaceable coin batteries. Radius Networks has one.
    I completely understand your position and wanting to wait. You've always helped out this community very kindly through your educational posts and cool plugins. Really!
    The more I read about BLE it's the prefect complement to home automation and if anything it is a must. BLE will be an integral part of future home automation.
    Do you think it would be possible to make PiBeacon a device in HS, then using BluePy-Python Scripts - JSON that range data ( Far, Near, Immediate) and sent to HS. And if the BLE Tag is from a smartphone, PiBeacon could send out hello and goodbye messages to your guest.

    Thanks
    Also check out Ninja Sphere: https://ninjablocks.com/#home/
    Tom
    baby steps...starting again with HS3
    HS3Pro: Z-NET & 80 Z wave Devices,
    HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
    Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
    In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
    System: XP on Fanless Mini-ITX w/ SSD

    Comment


      #32
      I don't think the PiBeacon is much more than software and from what I have read I am not sure it is needed, there appears to be enough native support in the Linux BT stack to at least check whether a device is in range and communicable and I think the Python library is shortly going to let you do that in Python (which in turn is easy enough to get talking to HS). Until I sat down and really looked into it I am afraid it is just ideas but I think it should be possible.

      From what I understand of the PiBeacon it looks to be the reverse of what I would want although it does say "The PiBeacon comes with the power to sense other beacons, making it a valuable proximity beacon tool. With multiple output format options, you can easily export scan data for use in any application." - I don't know enough as to whether your iPhone is a beacon in it's own right and as such this would mean that it is useful to work out whether things are in range of it.

      Comment


        #33
        Estimote seem to suggest that their app allows you to create a virtual iBeacon out of your iPhone to test out your own app built via the SDK. Not sure if that helps at all. Very interesting stuff.
        cheeryfool

        Comment


          #34
          Originally posted by mrhappy View Post
          I don't think the PiBeacon is much more than software and from what I have read I am not sure it is needed, there appears to be enough native support in the Linux BT stack to at least check whether a device is in range and communicable .
          Adam, yes PiBeacon is just rasberry pi (or use old pc w linux loaded)
          + BLE dongle (iogear GBU521W6($20), (not all BLE dongles work w Bluez)
          + Bluez software(BTLE stack for Lunix)

          Cheeryfool,
          Yeah the Estimote looks very interesting. Yes, I believe the smartphone can behave has BLE tags or BLE Beacons(with software).

          From my current research iOS (or android) scans for beacons even when the app that started the monitoring isn't running. If iOS detects a beacon the app that initiated the scan is automatically run or woken up(if in background)
          This seems to differ from what Jared from Radius Network seems to have said above. I may be missing something?
          Tom
          baby steps...starting again with HS3
          HS3Pro: Z-NET & 80 Z wave Devices,
          HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
          Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
          In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
          System: XP on Fanless Mini-ITX w/ SSD

          Comment


            #35
            Just doing more research, will be posting back with iphone and beacon results soon. Main snag I hit with the pi is that the bluez stack you can get using repository is 4.99 - 2.5 years old, so no wonder its not exactly behaving for me.

            Trying to manually update to the latest 5.26 version is not for the faint of heart, especially as sites differ in what you need to run (there are a lot of dependencies needed before running make, and it takes forever to compile)
            Using this page along with this page seems to have got me some way there, doesn't help that there are a lot of assumptions made by the posters.

            Comment


              #36
              It's funny that you bring up thethingsystem I had proposed that someone make a plugin for this system just to get proximity devices into homeseer.

              If you look at devices supported by TTS you can see a few ble tracking type devices.

              Also they have documentation for developing clients for TTS

              I'm not sure it is still a good idea. I guess development on TTS is halted.
              _______________________________________________

              HS3 : HSpro (3.0.0.460) on Win2012 (vm on ESXi)
              Plugins: HSTouch, UPBSpud, Kinect, Nest, IFTTT, DirecTV, EasyTrigger, Imperihome, Zwave, RFXcom, UltraMon3, UltraWeatherBug3, UltraGCIR3, UltraLog3, UltraPioneer, PHLocation, Pushover, Pushalot, MCSSPrinklers S, JowiHue
              Jon00 Plugins: Bluetooth Proximity, Performance Monitor, DB Chart, Links

              Comment


                #37
                This whole BLE things has confusing terminology it seems or people use terms incorrectly.
                Ok I just tested what Jared from Radius told us(iphone's won't be a reliable BLE tag/transmitter/beacon) in the email which contradicts what someone others have said in proximity articles had stated.
                Used two different iPhones:
                First iPhone as a Virtual Beacon(Transmitter):

                If you make your phone/ipad into a virtual beacon you can only get then the the virtual beacon app has to always be loaded and upfront for it to be transmitting. App- iBeacon Scanner( has a Virtual Beacon setting)

                Second iPhone as a Locator(Scanner):
                If you make your phone/ipad into a Locator/Scanner to display Entry & Exit messages of the Beacon(Transmitter), has to only be loaded, but not upfront. App-Locate by Radius Networks.

                In the Locate app you will need to register the Beacon you're looking for, in our case the Virtual Beacon. You'll need to put the Beacon Name(your choice), Proximity UUID, Major&Minor( not necessary).
                Once this is done, the Locate App will show you Entry & Exit info of the Virtual Beacon. And it will show you the distance from the Virtual Beacon.

                It was pretty neat to see the distances change. Both apps are free.

                You can make your own UUID for your setup or have app generate it:
                http://www.famkruithof.net/uuid/uuidgen

                UUID, Major & Minor:

                -an unique identifier known as a proximity UUID, which uniquely identifies a beacon or set of beacons as being of a certain type or from a certain organization
                -an internal identifier, for your own reference when identifying this beacon
                -a major identifier, to differentiate this beacon from other beacons with the same proximity UUID.
                -a minor identifier, to differentiate this beacon from other beacons with the same proximity UUID and major identifier.

                the major property might identify different stores in the same chain, and the minor property might identify different checkout tills within a specific store. Or the major property might identify the Floor of house, and minor might identify the room.

                http://daveaddey.com/?p=1252
                Tom
                baby steps...starting again with HS3
                HS3Pro: Z-NET & 80 Z wave Devices,
                HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
                Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
                In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
                System: XP on Fanless Mini-ITX w/ SSD

                Comment


                  #38
                  Originally posted by Furious View Post
                  Trying to manually update to the latest 5.26 version is not for the faint of heart, especially as sites differ in what you need to run (there are a lot of dependencies needed before running make, and it takes forever to compile)
                  Using this page along with this page seems to have got me some way there, doesn't help that there are a lot of assumptions made by the posters.
                  Furious, Use this. It's a disk image with everything loaded.
                  http://developer.radiusnetworks.com/...on-update.html
                  Tom
                  baby steps...starting again with HS3
                  HS3Pro: Z-NET & 80 Z wave Devices,
                  HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
                  Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
                  In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
                  System: XP on Fanless Mini-ITX w/ SSD

                  Comment


                    #39
                    Ah, thanks for that. Appreciated

                    I spent til way too late trying to get the damn 5.26 version to compile (it's like 30-45 minutes), my linux is rusty to say the least, but managed to get the flags put into the makefile so it would complete compiling eventually.

                    Then I ran into a problem where my polling script being called at startup from rc.local seemed to be cached between reboots on the pi. I had to make a change to bring up the 2 BT dongles in the script when it initialises, but it took like 5 reboots before it actually ran the script with the change in.

                    All this to just test beacons. It better work after all this fiddling.... I'll report back once i can grab my daughters iphone to test.

                    Comment


                      #40
                      Massive waste of time rolling my own config - using the same make/model dongle as others, just couldn't get the thing to do the LE commands and scans.
                      "Set scan parameters failed: Input/output error" - I really don't have the time to become a BTLE and Bluez expert, and there are only a handful of pages out there that are actually relevant or offer semi-meaningful help.

                      Now onto using the pibeacon install. Fingers crossed.

                      Comment


                        #41
                        I started testing on pibeacon....
                        Well that didn't take long to discover a massive bug in Bluez - apparently having a BT2.0 device as first device (hci0) means that LE stuff just flat out doesn't work. I/O error my foot.

                        Once I swapped over the usb slots so that the LE device is hci0, lestates and other hciconfig commands *magically* work.

                        Just for those who are searching on the almighty web for "sudo hciconfig hci0 lestates" and getting the above posts error - remove the BT2 device completely. Only reason I went back to a BT2 device was down to the LE device locking up when polling. I'm now back on my old installation, I'll tinker some more with that.
                        Last edited by Furious; December 16, 2014, 01:39 PM.

                        Comment


                          #42
                          Success!
                          Using the following device, and the switchdoclabs python scripts, I can successfully get pings from the beacons for presence detecting - next step is to integrate them into a script to do presence.

                          The devices are hit and miss with android - the app is shockingly bad to use to configure the device, to the point where i had to borrow an iphone as you cant set the password in the android version. The devices can be configured to send a beacon up to every 10 seconds to really draw out the battery life to years (apparently).

                          Basically, as long as you have configured the beacon to be transmitting, then you will be able to pick up the mac address of it with "sudo hcitool lescan --duplicates"
                          Alternatively, you can use the python script - this gets all the detail such as the signal strength, so you could do proximity, it's not reliable though:
                          Code:
                                  UDID: ef d0 83 70 a2 47 c8 98 37 b4 db 4d b4 d0 07 00 None
                                  MAJOR: 01 00 None
                                  MINOR: 01 ff None
                                  MAC address:  e2:4d:ec:ec:26:f0
                                  (Unknown): 52
                                  RSSI: -93

                          Comment


                            #43
                            Nice find. I wonder if those are available in the U.S.?
                            _______________________________________________

                            HS3 : HSpro (3.0.0.460) on Win2012 (vm on ESXi)
                            Plugins: HSTouch, UPBSpud, Kinect, Nest, IFTTT, DirecTV, EasyTrigger, Imperihome, Zwave, RFXcom, UltraMon3, UltraWeatherBug3, UltraGCIR3, UltraLog3, UltraPioneer, PHLocation, Pushover, Pushalot, MCSSPrinklers S, JowiHue
                            Jon00 Plugins: Bluetooth Proximity, Performance Monitor, DB Chart, Links

                            Comment


                              #44
                              Originally posted by Furious View Post
                              Success!
                              Alternatively, you can use the python script - this gets all the detail such as the signal strength, so you could do proximity, it's not reliable though:
                              Good work Furious. I still haven't gotten all my pi stuff in. Doing a lot of reading in the mean time about pi and iBeacon. What exactly wasn't reliable when you tested.?

                              Originally posted by jlrichar View Post
                              Nice find. I wonder if those are available in the U.S.?
                              I think the last one listed down there,Dashuhuwai, is the same as the one Furious pointed to but in US Amazon, but you can use any of the other BLE tags. Like Rainbow Networks Tag(on page two of this thread), LassoTag iBeacon(amazon), Eudora Smart Tag(white one below -amazon), and Dashuhuwai



                              Ok just posted and realized the massive size of these images...sorry
                              Tom
                              baby steps...starting again with HS3
                              HS3Pro: Z-NET & 80 Z wave Devices,
                              HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
                              Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
                              In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
                              System: XP on Fanless Mini-ITX w/ SSD

                              Comment


                                #45
                                Using the python script has been rock solid, as I've had it polling non stop for 3 days - just don't rely on the signal strength, as it is not reliable enough for distances. Value may vary as much as +/-20db even when static, using the app, it can think more than 30cm is 5 metres, etc.
                                The device is just a rebranded jaalee fob, so should be able to source like those above quite easily.

                                Comment

                                Working...
                                X