Announcement

Collapse
No announcement yet.

To figure out what actually turned on a light......?

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

  • To figure out what actually turned on a light......?

    Yes I know, the title sounds a bit funny ;-)

    Anyway, this is what I am trying to figure out:

    My dinner table has a ceiling lamp, which is controlled by a Fibaro 1*3kW switch.

    There is a script that runs every 20 seconds that decides how much the lamps in the dining and living room are supposed to be at. This scripts uses a logic that, among other things, uses all ligth sensors devices inside, one lightsensor outside, temp outside and humidity. This works like a charm! I am 100% satisfied with this, what I call "sliding scenery of the dimable lamps".

    However from time to time I like to turn on the lamp above the dinnertable by the manual switch on the wall, which is connected direct to the Fibaro 1*3kW switch (S1).

    This however have presented a problem, or a challenge if one prefers, and that is that the script running every 20 seconds above will, well, run-over the dim level from the logic instead the level I have choosen to use for the dining table (most likly will the script that runs every 20 seconds actually turn off that lamp - never mind why the script decides it is to be turned off, that logic is what it is).

    So I need to add some sort of "manual override" on that script.

    I just need to figure out what turned on that lamp, was it the script or the button on the wall switch?

    Any ideas would be lovely :-)

  • #2
    For similar situations, I use virtual devices that tracks whether the change was initiated through an event or locally and whether the switch is in "automatic" mode or "manual" mode. I then have an event that changes it back to "automatic" after a set period of time. I can post some screenshots later if needed.
    HS 3.0.0.548: 1976 Devices 1156 Events
    Z-Wave 3.0.1.262: 123 Nodes on one Z-Net

    Comment


    • #3
      The log filtered by the device?

      I also use virtual devices for potentially complex states, especially motion/presence/occupancy. I don't let sensors directly associate unless it's a simple situation like a motion sensor turning on a closet light.

      Comment


      • #4
        I have used the value of the dimmer as the controlling factor for similar uses. For example, HS will set the light to 99% vs ON; while the manual control at the light switch will set the dimmer to fully on (100% or technically greater than 99%). The event(s) can control a virtual device or used directly within its own conditions. Clearly EasyTrigger makes some of this , , um,,,, easy.

        Comment


        • #5
          You could also use a simple counter as a boolean indicator.

          Have your manual switch run an event that sets a counter to 1. Have all of the other methods to turn the light on set that counter to 0.

          So now you can test the counter, and if it is 1, you know it was manually switched on.

          Comment


          • #6
            Originally posted by aa6vh View Post
            You could also use a simple counter as a boolean indicator.

            Have your manual switch run an event that sets a counter to 1. Have all of the other methods to turn the light on set that counter to 0.

            So now you can test the counter, and if it is 1, you know it was manually switched on.
            That would mean I know when someone presses the switch - and that was the original question, HOW do I know just that?

            As some wrote above, I will add another VD (Virtual Device) that will be used to double check - this will not be bullet prof, but it will be better than current solution.

            Comment


            • #7
              If you're using events for all of that, I would suggest Jon's Event List script which tracks event activity. Knowing the event which fired will help narrow down the search. I know I've used it many times just for that...

              Robert
              HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

              Comment


              • #8
                I'm sorry, but are you referring to Jon00? He's site is completely rubbish in my eyes - it close to never responds, and well I have long time ago given up on anything he does.

                Comment


                • #9
                  Originally posted by larhedse View Post
                  I'm sorry, but are you referring to Jon00? He's site is completely rubbish in my eyes - it close to never responds, and well I have long time ago given up on anything he does.
                  ?? Jon00 is very responsive in helping people out and bug fixes for his plugins/scripts. I use a number of his plugins and all work well.
                  HS 3.0.0.548: 1976 Devices 1156 Events
                  Z-Wave 3.0.1.262: 123 Nodes on one Z-Net

                  Comment


                  • #10
                    Sorry to say, my experience is different. However I am happy you are happy, just not my cup of tea.

                    Comment


                    • #11
                      Originally posted by larhedse View Post

                      That would mean I know when someone presses the switch - and that was the original question, HOW do I know just that?.
                      You do have a point. I assume your Fibaro switch directly controls the power to the light?

                      Maybe try the opposite of my suggestion: Have all your other methods of turning on the light set the counter to 1. If the counter is not 1, then it was the switch that did it.


                      Comment


                      • #12
                        Correct!

                        Yes, my new VD does more or less what you suggests, inverted. Will see if I get it to work this time....

                        Comment


                        • #13
                          Originally posted by larhedse View Post
                          I'm sorry, but are you referring to Jon00? He's site is completely rubbish in my eyes - it close to never responds, and well I have long time ago given up on anything he does.
                          Wow! - I hope that comment just relates to my site....Not sure why you have access problems. I get many visitors per day without issue......

                          If you can't download something, just send me a PM and I'll try to assist.
                          Jon

                          Comment


                          • #14
                            Originally posted by larhedse View Post
                            I'm sorry, but are you referring to Jon00? He's site is completely rubbish in my eyes - it close to never responds, and well I have long time ago given up on anything he does.
                            //Tangent//
                            This is so far from my experience with Jon00 and his site that I'm compelled to respond. Other than the mild awkwardness of having to enter guest credentials twice, I've never had a single issue with searching and downloading his HS3 utilities. And anytime I've contacted him via the forum for support, he's responded within hours and typically sooner. He provides many powerful tools to the HS community--with only voluntary payment I would add--and his active support via these forums is always patient and competent. I obviously don't know your experience and each has a right to one's own opinion, of course, but based on my own experience and my close following of the forums I'd say your opinion is an extremely rare exception.
                            //Off Tangent//
                            -Wade

                            Comment


                            • #15
                              For the record, no I have never had any email/message correspondence with Jon00. I have just, multiple times, tried to get my hands on some software, and NEVER succeeded. So that is why I given up.

                              Jon00: Thanks for your offer, however I will turn it down, since well I now days have what I need in plugins. I would love to see you continue develop your software, who knows when I might change my mind.

                              Comment

                              Working...
                              X