Announcement

Collapse
No announcement yet.

Turning off all lights for a Room or Floor

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

    Turning off all lights for a Room or Floor

    Like many others I had HS Events using the Z-Wave actions for ALL ON /OFF commands to control devices based on their assigned Room or Floor. With this feature removed in V4 of the Z-Wave plugin I have been looking for alternatives. EasyTrigger is often mentioned for this use case. I love ET but found this less than ideal. It requires creating device groups for each room and each floor. Groups can be not only static, requiring devices to be manually added, but also dynamic. I found the options for creating dynamic groups to be limiting. I can't easily exclude devices I may not want. It gets very cumbersome to build and manage all of these groups regardless of the method. If you want to control these groups by voice or with the app you have to make events. One for On, and one for Off, for each room and floor. Unless I am approaching this wrong, it feels like a lot to manage.

    I have found a method that is working for me, but would like to suggest that HST make it more of a defined feature (with easier access) rather than a workaround. After the Z-Wave ALL feature was removed, I noticed that my Alexa voice command "tell HomeSeer to turn off all <floor/room> lights" continued to work. I use these commands fairly often. Especially when I notice that a light is burning on another floor, but I don't necessarily know which light. I can call out these commands and it Just Works. I don't have to make ET groups or events. I can add a device to a brand new room and I can immediately issue voice commands. This is a testament to HomeSeer's built-in natural language processor. This engine predates Alexa and other assistants but can be very useful. It just figures out what you want. I have found that using this interface to turn all lights on or off for a given space is not reliant on the similar Z-Wave feature at all. It even works on Virtual devices.

    My suggestion is that this be made accessible from Events. The functionality is there. I can trigger it with my voice from Alexa. I think it would be great to trigger from Events too. I think there should be an action with selectable commands (ON/OFF) and selectable room/floor.

    Taking this idea a bit further: It's a bit of a black-box as to how HS determines which devices will be included in these commands. I have some Z-Wave smart-plugs that are also energy monitors. They have around 5 child devices and one of them is a Switch. This Switch child device is unaffected by the ALL ON/OFF commands. I have Z-Wave outlets that are a simple, single-child Switch that ARE controlled. I'm not sure why. Ultimately this works for my use-case as the smart-plugs are behind Kitchen appliances mainly for energy monitoring. I do not want them controlled by these commands. That said, it occurred to me that it would be useful to put control in the user's hands. The "Is Light" checkbox does not seem to impact this functionality but I feel like it should. If defined as a light then it should be included in these commands as they are specifically for turning on all the *lights* in a room or floor. If not this checkbox then perhaps another one could be added with this goal in mind.

    Stretch goal: While a niche feature, I think it would be neat if text-based commands could be passed directly to the voice command engine as an event action. I am currently doing this albeit in a hacky way. I am using a immediate script statement to call hs.GetURL and hitting the JSON voicecommand interface and passing a string. This allows me to effectively issue "turn off all the downstairs lights" as part of an event, without the use of any plugins. I just think it would be cool if I could do this with a dedicated action instead of hs.GetURL.

    I'm just brainstorming before I submit an official feature request in the support portal. I appreciate any feedback.

    Thanks.

    #2
    You can use HS4 Categories. Add all Office lights to the category "Office" and then:

    DeviceOff(hs, GetRefsByCategoryName(hs4, "Office"))

    See: http://tenholder.net/tenWare2/Script...Reference.aspx

    tenholde

    Comment


      #3
      Originally posted by tenholde View Post
      You can use HS4 Categories. Add all Office lights to the category "Office" and then:

      DeviceOff(hs, GetRefsByCategoryName(hs4, "Office"))

      See: http://tenholder.net/tenWare2/Script...Reference.aspx
      +1 for this. I have several virtual devices called "room" and they are used to call this function to control categories. I still use ET groups as conditions for events.
      "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

      Comment


        #4
        Originally posted by tenholde View Post
        You can use HS4 Categories. Add all Office lights to the category "Office" and then:

        DeviceOff(hs, GetRefsByCategoryName(hs4, "Office"))

        See: http://tenholder.net/tenWare2/Script...Reference.aspx
        This is an interesting approach to the problem. I think it still shares some of my concerns though. As someone who currently does not use categories it creates another layer of manual device management. I think most people are assigning devices to rooms and floors by default. The functionality to control devices by these existing criteria already exists, it's just hard to access. My ultimate goal is to accomplish this without script statements. I think having a native event action for turning all devices on or off by a given room or floor would be very useful. Having it as a selectable action would certain help with end-user discovery. I think HomeSeer needs more touches along those lines.

        Comment


          #5
          Originally posted by AZweimiller View Post

          This is an interesting approach to the problem. I think it still shares some of my concerns though. As someone who currently does not use categories it creates another layer of manual device management. I think most people are assigning devices to rooms and floors by default. The functionality to control devices by these existing criteria already exists, it's just hard to access. My ultimate goal is to accomplish this without script statements. I think having a native event action for turning all devices on or off by a given room or floor would be very useful. Having it as a selectable action would certain help with end-user discovery. I think HomeSeer needs more touches along those lines.
          You need the EasyTrigger plugin. Can create static or dynamic groups based on certain criteria.

          And yes, the Easy Trigger plugin functionality should be a part of HS already, but the author was hired by HST and I suspect they worked out a deal where they wouldn't interfere with that revenue stream.

          Comment


            #6
            Originally posted by TC1 View Post

            You need the EasyTrigger plugin. Can create static or dynamic groups based on certain criteria.

            And yes, the Easy Trigger plugin functionality should be a part of HS already, but the author was hired by HST and I suspect they worked out a deal where they wouldn't interfere with that revenue stream.
            My first post goes into a lot of detail as to why I don't think EasyTrigger is a good solution for this. Happy to hear if I am not utilizing it effectively. As it stands now, creating static or dynamic groups are both more overhead than is needed. HomeSeer has built-in logic for turning off all lights in a given room or floor. It just needs to be more accessible.

            Comment


              #7
              Originally posted by tenholde View Post
              You can use HS4 Categories. Add all Office lights to the category "Office" and then:

              DeviceOff(hs, GetRefsByCategoryName(hs4, "Office"))

              See: http://tenholder.net/tenWare2/Script...Reference.aspx
              I just got caught with this problem after updating to HS 4.2.19.0 and no longer can put house to sleep with all lights off. I added all the devices I want to shut off at once to the Category "Lights" can you wild card all rooms in this script or do you have to create a separate script for each room? Seems ridiculous having to pay $30 for ET when this basic function existed back in HS 1.0 with X-10

              Comment


                #8
                Any help appreciated I added all the devices in the kitchen to the default category "lights" using this script:

                ' This script Turns off Kitchen Lights
                '
                '
                sub main()

                DeviceOff(hs, GetRefsByCategoryName(hs4, "Lights"))

                end sub​

                I get this error in the log

                Compiling script (1)KitchlLightOff.vb: 'GetRefsByCategoryName' is not declared. It may be inaccessible due to its protection level.

                Comment


                  #9
                  Did you install the scripting extensions?
                  tenholde

                  Comment


                    #10
                    https://tenholder.net/tenWare2/Scrip.../Overview.aspx

                    tenholde

                    Comment


                      #11
                      The current version allows you to specify a category name for DeviceOff, or a List of category names. So if you wanted to turn off lights in three differnet categories, you could use:

                      Code:
                      DeviceOff(hs4, {"Office", "Hallway", "Kitchen"})
                      You could do this directly from an event with an immediate script per above
                      tenholde

                      Comment


                        #12
                        Working fine here with 4.2.19.0
                        "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

                        Comment


                          #13
                          Originally posted by tenholde View Post
                          Did you install the scripting extensions?
                          Guess that's the problem no I did not is that a plug-in?

                          Comment


                            #14
                            Not a plug-in. Copy a .dll library to hs4 root folder and add a reference to settings.ini in the config folder.
                            tenholde

                            Comment


                              #15
                              Originally posted by tenholde View Post
                              Not a plug-in. Copy a .dll library to hs4 root folder and add a reference to settings.ini in the config folder.
                              Thank you found it here doing it now
                              https://tenholder.net/tenWare2/Scrip...tallation.aspx

                              Comment

                              Working...
                              X