Announcement

Collapse
No announcement yet.

Virtual Home Occupancy Device via Mobile Device Status

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

    Virtual Home Occupancy Device via Mobile Device Status

    I'm attempting to create a virtual home occupancy device based on mobile device(s) status connected to local WiFi network to start, and will build out from there.

    I'm currently testing the MeiUnifi plugin for network monitoring since all our network equipment is Ubiquiti Unifi and some advantages to this plugin may be useful going forward. This plugin seems for the most part fairly quick at detecting the phone.

    I have 2 events(Home, Away) created to track the status of the 2 mobile devices, along with a virtual occupancy device. These events seemed to initially function as intended, although an issue has arisen.

    Click image for larger version

Name:	OccuAway.PNG
Views:	148
Size:	42.1 KB
ID:	1395105

    Click image for larger version

Name:	OccuHome.PNG
Views:	77
Size:	32.0 KB
ID:	1395106

    The first issue I have come across is that when a mobile device decides to roam to another AP(have 6 AP’s to cover property) MeUnifi reports the device as Offline for a few seconds and it can be a bit before its status is updated to Online again due to the cycle time of the plugin.

    I've tried inserting a 2 minute wait/delay conditions within the events to allow for the roaming time but I've been unsuccessful at piecing together the required steps within the away event to allow for this to happen due to limited knowledge of the event engine. I've spent several days trying different ideas, reading the forums looking for ideas and reached a dead end. Now looking for some help for ideas from the people who truly understand how the cogs turn in homeseer. Do I need to set up a counter?

    These plugins are being used or available to be used:
    1. MeiUnifi
    2. EasyTrigger

    Thanks in advance for any help

    #2
    The easiest way I see you can do it is to have separate events for each person but they both update the same virtual device.


    Just a single liner each because it matters if each one to be home for things to happen then combine the events for "Away" because you don't what to trigger the alarm when one of you still at home.



    Tip: If you have more than one APs then that's when you need to use OR IF (connected to either Bedroom, Living......etc) and again for each person.


    Disclaimer : Don't set for the Alarm because unstable You have to be arming the house manually, for above was just an example


    Eman.
    TinkerLand : Life's Choices,"No One Size Fits All"

    Comment


      #3
      This should work :


      Occupancy Home

      IF Meiunifi Suzanes-iPhone changes and becomes Online

      OR IF MeiUnifi Brian's 959XL changes and becomes Online

      Then Set Device Virtual Status Device Occupancy to Home




      Occupancy Away

      IF Meiunifi Suzanes-iPhone changes and becomes Offline

      AND IF MeiUnifi Brian's 959XL has a value of Offline

      OR IF MeiUnifi Brian's 959XL changes and becomes Offline

      AND IF Meiunifi Suzanes-iPhone has a value of Offline

      Then Set Device Virtual Status Device Occupancy to Away




      Eman.
      TinkerLand : Life's Choices,"No One Size Fits All"

      Comment


        #4
        I would try the away event to be "Phone A has been offline for exactly xx minutes and phone B is offline". That should give it time for the plug in to see the phone again. There will be a delay of xx minutes when the house is actually unoccupied, but if this is short enough it shouldn't matter that much. Hope this helps

        Comment


          #5
          Thanks for the responses for help. I stepped away from the screen for a couple of days and read and reread Randys great explanations for the Event engine, and I believe I now have it functioning correctly. It is a way more involved than originally anticipated. I'll write it up and post it here for use or scrutiny.

          Comment


            #6
            The goal was to provide a nocost or lowest cost solution for a Home Occuppancy status. We can build on this in the future with additional physical devices as I am sure the phones and wifi will NOT be 100% flawless.

            The MeiUnifi(network Device Monitoring) plug-in created the following devices:

            Click image for larger version  Name:	MeiUnifi Devices.PNG Views:	0 Size:	16.4 KB ID:	1395924

            I Created 3 Virtual Devices, one for Home, and one for each phone. The phone virtual devices were created to deal with the phones roaming to different WAP's creating unwanted offline/online status changes.

            Click image for larger version  Name:	Virtual Devices.PNG Views:	0 Size:	29.2 KB ID:	1395925
            The number of events went from 2 to 10. A more experienced person may be able to get that number down. There are 4 events for each phone, I included one set of 4 screen grabs for a phone here, you would have to copy and rename additional sets for other phones like Sues.

            Click image for larger version  Name:	Brian1.PNG Views:	0 Size:	23.9 KB ID:	1395926
            Click image for larger version  Name:	Brian2.PNG Views:	0 Size:	35.2 KB ID:	1395929
            Click image for larger version  Name:	Brian3.PNG Views:	0 Size:	29.5 KB ID:	1395928
            Click image for larger version  Name:	Brian4.PNG Views:	0 Size:	29.2 KB ID:	1395930

            The last 2 events were for Home Occupancy.

            Click image for larger version  Name:	Occupancy.PNG Views:	0 Size:	74.3 KB ID:	1395931
            Attached Files

            Comment

            Working...
            X