Announcement

Collapse
No announcement yet.

Introducing AK Smart Device plugin for HomeSeer

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Introducing AK Smart Device plugin for HomeSeer

    AK Smart Device plugin converts dumb devices to smart self-contained devices – so each device knows how to react to other devices changes. The aim of the plugin was to reduce use of convoluted HS event system and make creating basic automation an easy process. It doesn't completely eliminate HS event system (of course) – you still are free to use it for things AK Smart Device can't do (yet).

    AK Smart Device has a lot of configuration options which allows easily create complex setups without using a single event.
    And by chaining multiple devices complexity of the system is reduced which helps improve system maintainability and simplify troubleshooting.

    Note: before uninstalling the plugin make sure that all devices controlled by the plugin have all timer/trigger/linked device disabled. See https://forums.homeseer.com/forum/ul...76#post1290476

    Youtube Video

    Features:
    • Simple user interface for setting up system without using HS events
    • Trigger Device change based on states of other devices
    • Setup countdown delay for each state
    • Countdown Delay depending on other Linked Device State (i.e. occupancy/scene etc.)
    • Enforcing/Inhibiting Trigger Devices
    • Delayed Trigger option
    • Adding trigger device name to triggered device status string
    • Chaining devices to simplify maintenance and troubleshooting
    • Power Fail recovery
    • Performance optimised design
    • Internal self-diagnostics
    • Per-device log option (automatically enabled if errors detected)

    Following post provide step-by-step guide for easy set-up of simple system - no single event.

    Click image for larger version  Name:	Fig6.PNG Views:	2 Size:	299.1 KB ID:	1290786

  • #2
    1. Configuring Trigger devices

    Here's our small but smart home setup consisting of
    • Dusk-Dawn sensor
    • Two motion sensors
    • And one light
    • Occupancy device (Home/Night/Away)
    Click image for larger version  Name:	FigLast.png Views:	2 Size:	189.0 KB ID:	1290785

    Our task is to switch the light ON only at night time and for a certain time – depending on the Occupancy status.

    Note: in this example we could trigger the light directly from the Motion Sensors, but I suggest creating extra intermediate devices to simplify maintenance and troubleshooting.

    The first step is linking Motion Sensors to the "Motion Zone" virtual device:
    Go to "Motion Zone" configuration => AK Smart Device tab => Triggers tabClick image for larger version  Name:	Fig2.PNG Views:	1 Size:	223.5 KB ID:	1285061
    1. "Enable" the group
    2. Group Logic set to "Any" – so Any Motion Sensor in the group will trigger our "Motion Zone" device
    3. Select the "Motion Zone" device state when the trigger happens (Motion)
    4. In Trigger Group 1 add two Motion Sensor devices and select their trigger state (Motion)
    5. Optionally select "Add to Status" – so the trigger sensor device name will be appended to "Motion Zone" device status string

    Comment


    • #3
      2. Setting countdown delay

      We want our Motion Zone device to return to "No Motion" state automatically soon after it's triggered by the motion sensors. So on the "Timer" tab - "Enable" Countdown Timer and set the delay to a couple of seconds for the "Motion" state:

      Click image for larger version  Name:	Fig3.PNG Views:	1 Size:	192.7 KB ID:	1285063

      That's it – we have our Motion Zone virtual device setup without using any events.

      Comment


      • #4
        3. Using Linked State Device

        Our "Active Zone" virtual device is triggered by the "Motion Zone" virtual device we just setup above. But this device defines how long our lights (and other devices – heating, entertainment, etc) will stay ON. And this time delay will be different depending on the Occupancy status – i.e. 1 hour for Home state and 5 minutes for Nighttime, etc.

        a. Configure "Active Zone" Trigger tab - to go to Active state when "Motion Zone" becomes "Motion":

        Click image for larger version  Name:	Fig4.PNG Views:	1 Size:	167.3 KB ID:	1285065

        b. Now on the "Timer" tab - "Enable" Linked State Device and select our "Occupancy" status device and
        c. For each state of the "Occupancy" device (Home/Away/Night) select desired delay for our "Active Zone":

        Click image for larger version  Name:	Fig5.PNG Views:	1 Size:	217.3 KB ID:	1285066

        Note: the "State to set on timer expire" doesn't have to be always OFF. If our lights are dimmable – here we can use different end of timeout state, i.e. at night trigger the lights to 50% and leave them after timeout at 20%.

        If you set states i.e. "ON" => 1 sec delay => "OFF" and "OFF" => 1 sec delay => "ON" – you get flashing light!

        Comment


        • #5
          4. Using "Enforcing" trigger group option

          The last device to setup is our "Main Lights". As you can see the last group has "Enforcing" option selected – thus preventing lights from switching ON when "Dusk-Down" is in "Light" state:

          Click image for larger version  Name:	image_77449.png Views:	1 Size:	299.1 KB ID:	1290784

          Comment


          • #6
            5. Using Delayed trigger

            Each Trigger Group has a "Delay" option – so the device doesn't change its state for some time even if all other trigger group conditions are satisfied. This may be used for:
            a. Debouncing noisy devices (i.e. light sensors)
            b. Countdown delay – i.e. to give the user a chance to move a bit to prevent lights from switching off

            6. Diagnostics and Logging

            AK Smart Device has some additional features to assist with troubleshooting and diagnostics.
            a. The HS logging can be enabled for each device separately for troubleshooting. But even the log is not enabled, each device keeps internally last 1000 events for troubleshooting:

            Click image for larger version  Name:	image015.png Views:	1 Size:	316.3 KB ID:	1285073

            b. For each device which is used by other devices as Trigger or Linked State Device you can see the list of controlled (dependant) devices in the "Controlled" tab:

            Click image for larger version  Name:	image018.png Views:	1 Size:	214.3 KB ID:	1285074

            c. The Device List page shows all devices used by AK Smart Device plugin – controlled devices, trigger devices and Linked State Devices:

            Click image for larger version  Name:	image020.png Views:	1 Size:	414.4 KB ID:	1285075

            Comment


            • #7
              It is the first time i try to install your plugin ( linux user)
              Feb-20 18:09:25 Updater Install/Update of package AK Smart Device failed.
              Feb-20 18:09:25 Updater Error Installation of package AK Smart Device failed. Try disabling the plugin first, then re-try the update.
              Feb-20 18:09:25 Updater Error Unable to open install.txt file for update \HomeSeer\Updates3\AK Smart Device1.0.0.1
              Feb-20 18:09:24 Updater Installing package AK Smart Device
              Feb-20 18:09:24 Updater Update hspi_aksmartdevice.exe downloaded successfully
              Feb-20 18:09:21 Updater Downloading update: AK Smart Device
              Feb-20 18:09:21 Updater Starting download of updates

              Comment


              • #8
                Originally posted by MattL0 View Post
                Unable to open install.txt file for update \HomeSeer\Updates3\AK Smart Device1.0.0.1
                I think it's a known problem with text files created in Windows - Linux doesn't understand line endings. I'll check.

                Comment


                • #9
                  thanks!

                  Comment


                  • #10
                    Most likely it's the spaces in the name:
                    Unable to open install.txt file for update \HomeSeer\Updates3\AK Smart Device1.0.0.1

                    Comment


                    • #11
                      Originally posted by Simplex Technology View Post
                      Most likely it's the spaces in the name:
                      Unable to open install.txt file for update \HomeSeer\Updates3\AK Smart Device1.0.0.1
                      That's another possibility. But it worked for others....
                      Problem is - I don't control how HS handles installation - they unzip files into folder using Assembly info, not file name. I don't have any spaces in any of my files.
                      I'll see what I can do.

                      Comment


                      • #12
                        I updated line endings in INSTALLER.TXT, submitted new installer to updater.
                        As it's unpredictable how long it will take HS to update the file - here's the link to the installer, and attached updater_override.txt
                        https://1drv.ms/u/s!Ak57ZQxlTL9PhvYh89H0zIo3ngMwsQ

                        Note: if you don't know how to manually install update:
                        https://forums.homeseer.com/forum/an...dater-override
                        Attached Files

                        Comment


                        • #13
                          Originally posted by alexbk66 View Post
                          I updated line endings in INSTALLER.TXT, submitted new installer to updater.
                          As it's unpredictable how long it will take HS to update the file - here's the link to the installer, and attached updater_override.txt
                          https://1drv.ms/u/s!Ak57ZQxlTL9PhvYh89H0zIo3ngMwsQ

                          Note: if you don't know how to manually install update:
                          https://forums.homeseer.com/forum/an...dater-override
                          If you use the developer portal, you can release "beta" versions in real time. Just give the beta version in the edit screen, upload the beta using the correct form field on the form and click "Save and release Beta".

                          If you just upload a new file for normal release, you have to wait for HS to approve it, which this late at night will likely be tomorrow.
                          Thanks,
                          Frank

                          Comment


                          • #14
                            Originally posted by Simplex Technology View Post
                            Most likely it's the spaces in the name:
                            BTW, did you get the same issue, or just guessing?

                            Comment


                            • #15
                              Originally posted by alexbk66 View Post
                              BTW, did you get the same issue, or just guessing?
                              Just guessing. I haven't tried your plugin yet, but I've been down the road with my plugins and the nuances between Windows and Linux. Next up you will encounter the Mono problems

                              Comment

                              Working...
                              X