Announcement

Collapse
No announcement yet.

How do YOU do it

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

    How do YOU do it

    If you are entering simple events do you check if something is on/off before you turn it off/on? I think I know what the professional coders will say. I'm struggling between my training to be anal retentive with data and commanding and the practical side saying "what does it matter if you turn on a light that was aready on? After all, we are extremely lazy or we wouldn't spend so much time and money trying to get a machine to occasionally take over some menial tasks!

    My first boss taught me "If you want to find out the best way to do something ask a lazy man."

    #2
    If the event needs to know a status of something before either triggering or not, then yes. Otherwise no. I prefer to have 'lean' events if possible.

    Comment


      #3
      Same for me. For example, I have an event that turns on the living room light if the time is after 4:30pm and the LUX level is below and certain amount.
      I have another event that turns on that same light at sunset. It doesn't check to see if the light is already on. There's not point to it.

      - Robert

      Comment


        #4
        I always check for the status of devices before I send the control to them. I fell that it cuts down on the traffic throughout the system. I feel why turn on a light if it is already on.

        Comment


          #5
          Originally posted by sonypoolplr View Post
          I always check for the status of devices before I send the control to them. I fell that it cuts down on the traffic throughout the system. I feel why turn on a light if it is already on.
          I agree with that also. You could end up sending a wireless (zwave/zigbee/x10 etc) signal through the air every second if you do not check a device was set on or offalready. Besides saving CPU cycles you have to watch the signals being send too. I tend to minimize those as well.

          Wim
          -- Wim

          Plugins:RFXCOM, HSTouch Server, Squeezebox, BLGData, Restart, Jon00's Perfmon and Network monitor, WeatherXML, BLBackup, TenScripting, BC4, Pushover, PHLocation, JowiHue, Zwave, Sonos
          650 devices ---- 336 events ----- 40 scripts

          Comment


            #6
            This is more than just academic. Some events may trigger only when a device turns from off to on, while others may trigger anytime a device is turned on, even if it was on before.

            So, you should consider how other events look at a device's action in deciding how to code your event to set it on/off.

            tenholde
            tenholde

            Comment


              #7
              Originally posted by RJS View Post
              Same for me. For example, I have an event that turns on the living room light if the time is after 4:30pm and the LUX level is below and certain amount.
              I have another event that turns on that same light at sunset. It doesn't check to see if the light is already on. There's not point to it.

              - Robert


              Same here. I initially thought about the extra traffic, but I have roughly 100 physical zwave devices at this point and lost count on the events. No problems and things tick along. There is a lot of zwave traffic if you actually ever look at it (don't look if you have OCD), even when you think there shouldn't be, but HS and the zwave plugin seem to handle it pretty well.

              I understand the logic, but I think you walk a fine line of keeping things clean and overly creating redundancy that isn't needed. The event still used cpu cycles to evaluate the conditions to see if it needs to trigger in either case.

              Comment


                #8
                I don't check ahead a lot, but one time that I found it mattered was with my Yale battery powered locks. I have a variety of events that lock doors on various conditions (alarm armed, etc.) and the battery life on my locks started dropping fairly quickly. I started checking each lock to see if it was locked first, and my battery life returned to normal.

                This kind of surprised me, because I'd assumed that they'd just drop the extraneous lock request if they were already locked (that's probably the way I'd have coded it if I were writing lock software), but apparently not.

                Comment


                  #9
                  Originally posted by tenholde View Post
                  This is more than just academic. Some events may trigger only when a device turns from off to on, while others may trigger anytime a device is turned on, even if it was on before. So, you should consider how other events look at a device's action in deciding how to code your event to set it on/off.
                  That's a good point that I often overlook.

                  Another factor is the likelihood that HS has accurate knowledge of the state of the physical device. Those of us who started with X10 probably assume without question that if you want to be sure a light is off you send an off command, because the controller is often "in the dark" about the actual state of the physical switch.
                  Mike____________________________________________________________ __________________
                  HS3 Pro Edition 3.0.0.548, NUC i3

                  HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

                  Comment


                    #10
                    Originally posted by Uncle Michael View Post
                    That's a good point that I often overlook.

                    Another factor is the likelihood that HS has accurate knowledge of the state of the physical device. Those of us who started with X10 probably assume without question that if you want to be sure a light is off you send an off command, because the controller is often "in the dark" about the actual state of the physical switch.

                    I think most of us have quite a few devices that are not "instant status". Checking to see if a device is on does not always work because there is a delay between the time it actually turns on and the time it reports back that it is on. If I want a device to turn off, I send an off command, regardless of its current state. In some cases, I will send 2 off commands. It makes me feel better!

                    Steve Q


                    Sent from my iPad using Tapatalk
                    HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
                    2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

                    Comment


                      #11
                      As a general practice I don't check device status for simple events unless there is a reason although I have a few events where I do check status before they run.

                      Comment


                        #12
                        We leave some questions here as academic but they are simple questions easily answered by test that would tell us if it is better to have more devices or more events. Better to have fewer gigaflops or fewer Wifi packets. Simple checks and I bet no one ever has. I won't. It is more entertaining to speculate.

                        Me - I just added some wireless hi-def cameras and monitoring software and now my wireless network feels sluggish. Measurable by any of the fancy knobs and dials I have? Nope. But I'm going to add an AP anyway. Cause y'all keep bragging on those Ubiquiti's and I have never had one (stamping feet).

                        Comment


                          #13
                          Personally I trust the Hs accounts for this, but perhaps not. I was under the impression you are not actually sending z wave signal out but rather just getting the last status reported to Hs. I will need to confirm that but given how slow my z wave network is I am sure I would have noticed if Hs was polling devices everything I have an event checking a device status.

                          Comment


                            #14
                            Originally posted by SmarterControl View Post
                            I am sure I would have noticed if Hs was polling devices everything I have an event checking a device status.
                            I'm sure you are correct. Polling devices continually would be highly inefficient, and would probably bring the network down.
                            Mike____________________________________________________________ __________________
                            HS3 Pro Edition 3.0.0.548, NUC i3

                            HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

                            Comment

                            Working...
                            X