Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. How would you do something like a SmartSense Presence sensor

How would you do something like a SmartSense Presence sensor

Scheduled Pinned Locked Moved My Project
presence sensor
18 Posts 8 Posters 9.5k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • BulldogLowellB BulldogLowell

    @gbfromhb

    At what range are you looking to be detected?

    your question made me think that you may want to use an arduino beacon attached to a car or a person or a pet, pulsing out "Hey I'm close".

    I would think that those could be rolling numbers, transmitted and processed by vera with Lua or PLEG. You could then look for the timestamp of the last update. If the update times out, presence is lost.

    Is that something like you want?

    Security is an issue if you are unlocking your house, but you can still do fun stuff with that approach, like getting it to work whilst you investigate a suitable way to secure the radio. (i.e. a secure radioset that you can use point-to-point and integrate the 'receiver station' with your MySensor network).

    G Offline
    G Offline
    gbfromhb
    wrote on last edited by gbfromhb
    #6

    @BulldogLowell, yes this is what I'm thinking about. I saw that Samsung was thinking about buying SmartThings. After going through their website I saw their Presence Sensor, and was intrigued. Here is a link to there product. https://shop.smartthings.com/#!/bundles/i-can-know-whos-home-when-im-not

    It looks like it may sense presence as they connect to the house's WiFi would be my first guess.. If you have their smart phone app, it can also be configured to notify their hub you are home also.

    BulldogLowellB 1 Reply Last reply
    0
    • G gbfromhb

      @BulldogLowell, yes this is what I'm thinking about. I saw that Samsung was thinking about buying SmartThings. After going through their website I saw their Presence Sensor, and was intrigued. Here is a link to there product. https://shop.smartthings.com/#!/bundles/i-can-know-whos-home-when-im-not

      It looks like it may sense presence as they connect to the house's WiFi would be my first guess.. If you have their smart phone app, it can also be configured to notify their hub you are home also.

      BulldogLowellB Offline
      BulldogLowellB Offline
      BulldogLowell
      Contest Winner
      wrote on last edited by
      #7

      @gbfromhb

      So, there is the iPhone locator on the Vera MiOS marketplace, along with the Ping app that can sense your mobile device as it connects to your router.

      You could put a WiFi module on an Arduino and use the ping app... just have to use MAC address filtering, which is reasonably secure.

      GPS/GSM combination might get you there too,

      I think that there are a few approaches that you can explore with Arduino and MySensors...

      1 Reply Last reply
      0
      • hekH Offline
        hekH Offline
        hek
        Admin
        wrote on last edited by
        #8

        Should be pretty simple to archive a presence sensor using a node that sends a value every X second.
        In 1.4 you will have an option to disable parent-auto-searching which makes this presence sensor much simpler and reliable to implement.

        https://github.com/mysensors/Arduino/commit/104fb4c35f0be8c6aa5a6877c72c9a370dab8646

        G 1 Reply Last reply
        0
        • hekH hek

          Should be pretty simple to archive a presence sensor using a node that sends a value every X second.
          In 1.4 you will have an option to disable parent-auto-searching which makes this presence sensor much simpler and reliable to implement.

          https://github.com/mysensors/Arduino/commit/104fb4c35f0be8c6aa5a6877c72c9a370dab8646

          G Offline
          G Offline
          gbfromhb
          wrote on last edited by
          #9

          @hek thank you. So I see it in the constructor, but what do I pass. I'm guessing the IODevice Varable from the MySensors Plugin device?

          hekH 1 Reply Last reply
          0
          • G gbfromhb

            @hek thank you. So I see it in the constructor, but what do I pass. I'm guessing the IODevice Varable from the MySensors Plugin device?

            hekH Offline
            hekH Offline
            hek
            Admin
            wrote on last edited by
            #10

            @gbfromhb

            You pass the node id of the closest (repeater node) or the gateway itself (0).

            So if you for instance have a repeater node out at the gate (i.e. node 2) you can create a mobile node in your car where you initialize node 2 as your static parent.
            The car node will try to send a message to controller each 5-10 second. Normally you're our driving back and forth to your mother-in-law and the car node won't reach node 2. And by statically initializing the parent it will not try to find a new parent like normal nodes does.

            But once you reach your gate/home it will successfully transfer a message through node 2 back to your gateway/controller. And your controller will open the gate automatically.

            G 1 Reply Last reply
            1
            • greglG Offline
              greglG Offline
              gregl
              Hero Member
              wrote on last edited by
              #11

              I was thinking about this too...i think i also posted here or micasaverde or whirlpool forum about it...

              My thoughts are to use some of these types of "ibeacon" tags
              http://www.phonecruncher.com/features/2227173/chipolo_vs_tile_vs_sticknfind_battle_of_the_bluetooth_finders.html There are loads of these types of devices out there... i have some trackr.com tags on the way...another drunken purchase ;-)

              Anyway, each person in the house wears/carries one. ( personally id love to be able to embed one under skin...but unbelievably low WAF when mentioned!!!)

              And in each room, i have a mySensors device with a BLE "receiver" reporting back who's in the room etc.

              Why do this?

              • its my hobby....
              • so lights turn off when the kids leave them on!!!!! "how many times do i need to ask??!!!
              • activate alarm when everyone has left ( doors already lock automatically - little interest in unlocking)
              1 Reply Last reply
              1
              • hekH hek

                @gbfromhb

                You pass the node id of the closest (repeater node) or the gateway itself (0).

                So if you for instance have a repeater node out at the gate (i.e. node 2) you can create a mobile node in your car where you initialize node 2 as your static parent.
                The car node will try to send a message to controller each 5-10 second. Normally you're our driving back and forth to your mother-in-law and the car node won't reach node 2. And by statically initializing the parent it will not try to find a new parent like normal nodes does.

                But once you reach your gate/home it will successfully transfer a message through node 2 back to your gateway/controller. And your controller will open the gate automatically.

                G Offline
                G Offline
                gbfromhb
                wrote on last edited by
                #12

                @hek Thank you.

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  naveen
                  wrote on last edited by
                  #13

                  I've always thought the easiest way to do this would be to detect people's smartphones on the WiFi network...almost everyone already has one and already connects to the WiFi network.

                  I've seen it discussed before but no one has really proposed any implementations from what I've seen - any ideas? Wouldn't this be easier?

                  YveauxY 1 Reply Last reply
                  0
                  • N naveen

                    I've always thought the easiest way to do this would be to detect people's smartphones on the WiFi network...almost everyone already has one and already connects to the WiFi network.

                    I've seen it discussed before but no one has really proposed any implementations from what I've seen - any ideas? Wouldn't this be easier?

                    YveauxY Offline
                    YveauxY Offline
                    Yveaux
                    Mod
                    wrote on last edited by
                    #14

                    @naveen as long as you plan to give everyone in the household a mobile phone with WiFi (including the kids, dogs, cats, etc :-) ) this should be relatively easy.
                    E.g. give the phones a static IP and ping these ip's continuously from a server. When the ping returns, the person is in.
                    The OP also wanted to track people in the house which will be a lot harder using Wi-Fi.

                    http://yveaux.blogspot.nl

                    N 1 Reply Last reply
                    0
                    • YveauxY Yveaux

                      @naveen as long as you plan to give everyone in the household a mobile phone with WiFi (including the kids, dogs, cats, etc :-) ) this should be relatively easy.
                      E.g. give the phones a static IP and ping these ip's continuously from a server. When the ping returns, the person is in.
                      The OP also wanted to track people in the house which will be a lot harder using Wi-Fi.

                      N Offline
                      N Offline
                      naveen
                      wrote on last edited by naveen
                      #15

                      @Yveaux

                      Ah good point!

                      Any idea how to implement (or begin to implement) pinging the phone IP and recognizing that on vera? Can you ping in lua code?

                      Actually, I may have answered my own question with this:
                      commandArray = {}

                      ping_success=os.execute('ping -c1 192.168.1.156')
                      if ping_success then
                        print("ping success")
                        commandArray['Ping']='On'
                      else
                        print("ping fail")
                        commandArray['Ping']='Off'	
                      end
                      
                      return commandArray
                      

                      And then just set the output of the code to change the state of a home/away switch

                      YveauxY 1 Reply Last reply
                      0
                      • N naveen

                        @Yveaux

                        Ah good point!

                        Any idea how to implement (or begin to implement) pinging the phone IP and recognizing that on vera? Can you ping in lua code?

                        Actually, I may have answered my own question with this:
                        commandArray = {}

                        ping_success=os.execute('ping -c1 192.168.1.156')
                        if ping_success then
                          print("ping success")
                          commandArray['Ping']='On'
                        else
                          print("ping fail")
                          commandArray['Ping']='Off'	
                        end
                        
                        return commandArray
                        

                        And then just set the output of the code to change the state of a home/away switch

                        YveauxY Offline
                        YveauxY Offline
                        Yveaux
                        Mod
                        wrote on last edited by
                        #16

                        @naveen I can ping in any code :+1:
                        Anyway, maybe you should make it a bit more robust. Now when a single ping fails your lights will go off, so to say.
                        Test for a number of successive failures before concluding someone went away. Detecting presence can be done from a single successful ping.

                        http://yveaux.blogspot.nl

                        1 Reply Last reply
                        1
                        • korttomaK Offline
                          korttomaK Offline
                          korttoma
                          Hero Member
                          wrote on last edited by
                          #17

                          Just thought I would mention that there is a Ping sensor plugin available for Vera incase you did not know. It should have all needed features for occupancy sensing.

                          http://apps.mios.com/plugin.php?id=1228

                          • Tomas
                          N 1 Reply Last reply
                          1
                          • korttomaK korttoma

                            Just thought I would mention that there is a Ping sensor plugin available for Vera incase you did not know. It should have all needed features for occupancy sensing.

                            http://apps.mios.com/plugin.php?id=1228

                            N Offline
                            N Offline
                            naveen
                            wrote on last edited by naveen
                            #18

                            @korttoma said:

                            Just thought I would mention that there is a Ping sensor plugin available for Vera incase you did not know. It should have all needed features for occupancy sensing.

                            http://apps.mios.com/plugin.php?id=1228

                            Awesome, thanks! I will try it out.

                            Quickly realized that the iPhone won't connect when in sleep mode, so its not really a good home/away detector.

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            18

                            Online

                            11.7k

                            Users

                            11.2k

                            Topics

                            113.1k

                            Posts


                            Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • MySensors
                            • OpenHardware.io
                            • Categories
                            • Recent
                            • Tags
                            • Popular