Announcement

Collapse

Contacting HomeSeer This Week

HomeSeer is open and operational this week. All orders are being processed and shipped as usual. However, some staff are working from home. If you need to contact HomeSeer for support or customer service, please use our Email or Chat options. https://homeseer.com/contact-us/
See more
See less

Occupancy description - is there a better way?

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

  • Occupancy description - is there a better way?

    Hi,
    I wanted to create a virtual device "Occupancy" that displays the names of who is at home.

    The same virtual device will also be very useful to ensure that heating goes off if no one is at home and also to sound alarm sirens if motion is detected internally when no one is at home.

    Basically I treat a counter "OccupancyIndex" like a set of Binary switches with 0 = home and 1= away. One switch for each user. The resulting number in decimal determines who is at home and who is away so I can display a label appropriately.

    Below I describe how I did it but my question is:
    Is there a better way to do this WITHOUT scripting?

    Virtual devices created
    Occupancy: status values will be
    1. "All away"
    2. "John"
    3. "Jane"
    4. "John and Jane"
    5. "Mark"
    6. "Mark and John"
    7. "Mark and Jane"
    8. "Mark, John and Jane"
    John home (three status values "Home" "Away" "Holiday"). I can manually set them on Holiday if needed
    Jane home (three status values "Home" "Away" "Holiday"). I can manually set them on Holiday
    Mark home (three status values "Home" "Away" "Holiday"). I can manually set them on Holiday

    The next three virtual devices are created by PHLocation2 used alongside GeoFency in iPhones
    John geofence
    Jane geofence
    Mark geofence


    Lastly I needed a Counter:
    OccupancyIndex

    Next I created a series of events to tie it all together. I created the following 14 events

    Events created

    Event 1
    If "John goefence" = entering home then
    Virtual device "John home" to On
    AND
    Increment OccupancyIndex counter by 1

    Event 2
    If "John geofence" = leaving home then
    Virutal device "John home" to Off
    AND
    Decrement OccupancyIndex counter by 1

    Event 3
    If "Jane goefence" = entering home then
    Virtual device "Jane home" to On
    AND
    Increment OccupancyIndex counter by 2

    Event 4
    If "Jane geofence" = leaving home then
    Virutal device "Jane home" to Off
    AND
    Decrement OccupancyIndex counter by 2

    Event 5
    If "Mark goefence" = entering home then
    Virtual device "Mark home" to On
    AND
    Increment OccupancyIndex counter by 4

    Event 6
    If "Mark geofence" = leaving home then
    Virutal device "Mark home" to Off
    AND
    Decrement Occupancy counter by 4

    Event 7
    If OccupancyIndex = 0
    Then set Virtual Device Occupancy "All away"

    Event 8
    If OccupancyIndex = 1
    Then set Virtual Device Occupancy "John"

    Event 9
    If OccupancyIndex = 2
    Then set Virtual Device Occupancy "Jane"

    Event 10
    If OccupancyIndex = 3
    Then set Virtual Device Occupancy "John and Jane"

    Event 11
    If OccupancyIndex = 4
    Then set Virtual Device Occupancy "Mark"

    Event 12
    If OccupancyIndex = 5
    Then set Virtual Device Occupancy "Mark and John"

    Event 13
    If OccupancyIndex = 6
    Then set Virtual Device Occupancy "Mark and Jane"

    Event 14
    If OccupancyIndex = 7
    Then set Virtual Device Occupancy "Mark John and Jane"

    So, is there a better way to do this WITHOUT scripting?

    Thanks for your considerations.
    /Marcus

  • #2
    I think you need Events 4&5 to increment/decrement by 4, not 2. Otherwise it looks okay from an accounting standpoint. It's critically dependent on your geofence working flawlessly. Are you really confident that it will not miss a change? If not (and probably even if you are), you need a backup method or protocol to deal with a geofence error.
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF, Rain8Net+ | RFXCOM | QSE100D | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3

    Comment


    • #3
      Originally posted by Uncle Michael View Post
      I think you need Events 4&5 to increment/decrement by 4, not 2. Otherwise it looks okay from an accounting standpoint. It's critically dependent on your geofence working flawlessly. Are you really confident that it will not miss a change? If not (and probably even if you are), you need a backup method or protocol to deal with a geofence error.
      Thanks! you are right, I cut and pasted and didn't correct the number. I have edited and corrected the original post.
      As you mentioned, I do expect goefence to work in this instance.

      BTW - Any backup Geo fence recommendations?

      Comment


      • #4
        Originally posted by metkhoo View Post
        BTW - Any backup Geo fence recommendations?
        Not directly, but my experience with geo fence was hit or miss, so my backup was to use the security system to determine if someone was home or no one was home and left it at that. Jon00 has a Bluetooth occupancy detector that might be of interest as a backup, but I have not used it.

        Also, as an aside, I assume your "events" were intended to be placeholders, but for the events that start with 'If A =', the trigger you will want is, 'If A changes and becomes".
        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF, Rain8Net+ | RFXCOM | QSE100D | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3

        Comment


        • #5
          Originally posted by metkhoo View Post



          BTW - Any backup Geo fence recommendations?
          I tend to use wtv I can . My occupency logic is also like you, It is set by person , not just someone is home/ no one is home.

          it is easier to know that someone is home then not home. Ex: If someone’s laptop wifi change from offline to online it means that this person ‘’is home’’. But if the same laptop goes offline, it means nothing here.

          To know if someone enter ‘is home ‘ state I use Geofency app. I use wifi (iphones) as a backup (my openwrt router push that info to mqtt ) . Could also use bluetooth.

          To know if someone enter’’ is not home’’state. I only use Geofency for now.


          I do not plan to use occupency for opening a garage door or unlocking/locking the principal door. I would not feel secure with this. I would need a system that is 100% flawless before going that route.

          Comment


          • #6

            Assuming you already have UniFi products
            With the exception of how long (5 mins +) it takes for a devices to disappear from the network, the MeiUnifi plugin is quite solid right now. (the re connection is a 1 min and few secs). So unless someone switched their device off or away it remains connected to the network. In other words the connection events are first! And of course you can do other crazy things with the plugin. You can even trigger if a device roams on to any of your APs. For tracking outside then obviously PHLocation is top dog wright now.

            So if you include or mix with your events above (post # 1) as back up you will have a smart system.


            Eman.
            The People's Advocate.

            Comment


            • #7
              Originally posted by Eman View Post
              Assuming you already have UniFi products
              That would be nice but I am using the LinkSys Velop product which has none of those advanced features you describe.
              I think I'll try the BluTooth (BlueTooth) beacon since my HomeSeer software is on a Windows machine and the hardware already has bluetooth.
              Thanks for all your ideas
              /Marcus

              Comment


              • #8
                Is LinkSys Velop only suited for the basic needs or something?

                Comment


                • #9
                  Originally posted by ArthurM View Post
                  Is LinkSys Velop only suited for the basic needs or something?
                  Personally, I think the LinkSys Velop system is a great mesh network technology - but it does not support IFTTT (which Google and TP-Link do). IFTTT would have been an easy way to integrate presence awareness (albeit dependent on the cloud service).

                  One of my main drivers for adopting HomeSeer is having the flexibility to choose what to do local and what to use the cloud for. In so many other solutions there is so much dependency on cloud services.

                  I admit that using GeoFency and PHLocation2 is dependent on the HomeSeer servers forwarding the request but their service seems rock solid (not so with the Zipato service I have used previously). I also like the Bluetooth Proximity concept as a "local only" proximity detector but have yet to get that working.



                  Comment


                  • #10
                    Originally posted by metkhoo View Post

                    BTW - Any backup Geo fence recommendations?
                    Life360 does a fantastic job of this: https://www.life360.com/ The plugin by Simplex is great: https://forums.homeseer.com/forum/ul...hnology?f=1587
                    It allows for creation of devices for each user that shows their current location, latitude, longitude, whether or not they are moving, how fast, etc.

                    The service itself is extremely accurate and reliable, and they have apps for Android, iOS, and a web console. You can opt for a couple of premium tier services with extra benefits, I do, but it isn't required. It is available in the UK. I think it would greatly simplify what you are wanting to do. I've been using the service and plugin for quite some time and have been nothing but pleased with it. I use it primarily for opening the garage, unlocking the door, and (if night) turning on lights when arriving home. The only issue I've had, and it is not a service or plugin issue, is that I have a dead spot in cellular coverage just before I arrive home and it would affect when events would trigger from time to time. Luckily, the web console allows for adjusting the perimeter of entering/exiting locations and I solved it by extending it a thousand feet or so. You probably won't have this issue with strong cell coverage. I'm not exactly sure if the free tier would limit what you would want from the plugin, but the good thing is the service is free and there is a trial for the plugin.

                    Food for thought.

                    Comment

                    Working...
                    X