Announcement

Collapse
No announcement yet.

Simple event, light on between sunset and sunrise, how?

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

    #16
    Originally posted by RoChess View Post
    those gardenlights for lack of better term, do you got any links on those?

    I've driven past the driveway a few times during heavy rain or when not paying attention, so I jokingly thought I should add lights along the way and upon location proximity detection fire off a HS3 event that makes them glow towards the house like a landing strip.

    Your video is extremely close to that idea with the lights on the left side.

    Ohio winters can be brutal, so I might need to account for a few feet of snow.
    They are Orbit 120v 4 tier fixtures, available in green or black as far as I know. The 4 tier were the only ones that put the sweet spot of a Hue A19 low enough to look good. The three tier puts the bulb up in the canopy. We wanted colors to be rich and bright. My wife liked the looks of them as well. They are well-made, all metal with glass lenses and gasketed. They come with an 8" riser, but I think it is 1/2" threaded. You can contact them about longer risers. These things are holding up well, though the screws are rusting a little.

    Click image for larger version  Name:	green.png Views:	0 Size:	141.2 KB ID:	1326340

    Click image for larger version  Name:	black.png Views:	0 Size:	53.9 KB ID:	1326341
    I got mine from USA Lighting here

    I mounted mine with PVC ground spikes and ran 14-2 UF cable between them.

    Click image for larger version  Name:	spike1.png Views:	0 Size:	52.2 KB ID:	1326342
    Click image for larger version  Name:	spike2.png Views:	0 Size:	23.9 KB ID:	1326343
    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

    Comment


      #17
      those look awesome, and might look at that before winter hits. Colorado must get good snow as well, and those looked like Christmas videos, so how did you manage snow removal? Are they super sturdy, or did you first crank the Hue bulbs up to snow-melting intensity?

      The driveway here is about 50 feet from road, but that is why I like the idea of these 120V lights and the Hue lights should act as a Zigbee repeater. This also solves my problem of extending sensor range towards mailbox that I wanted to eventually add a sensor on.

      Comment


        #18
        They are sturdy units, never had one broken or knocked over.

        They are in the grass about 6” from the driveway. We get a lot of snow, though only a few major accumulations a season. 6-12” is not unusual, but we’ve seen 3 feet from time to time. On the rare occasions when they have been covered, I have some 3’ rods I stick in the snow to help guide me and the snow thrower. If I suspect a storm I will usually stick them in the ground the night before.
        HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

        Comment


          #19
          Originally posted by rprade View Post
          Code:
          ' lightID is the light or group name
          dim lightID as string = "Porch Lights"
          
          'brightDev is the master brightness control
          dim brightDev as integer = 9170
          
          'transDev is the transition time device
          dim transDev as integer = 9952
          
          'colDev is the color selector device
          dim colDev as integer = 9172
          
          'specDev is the special level device
          dim specDev as integer = 9171
          
          sub Main(ByVal Parms as Object)
          if hs.DeviceValue(colDev) = 1 Then
          hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), 1, 255, hs.DeviceValue(transDev)})
          End If
          
          if hs.DeviceValue(colDev) = 2 Then
          hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), 10752, 255, hs.DeviceValue(transDev)})
          End If
          
          if hs.DeviceValue(colDev) = 3 Then
          hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), 26260, 255, hs.DeviceValue(transDev)})
          End If
          
          if hs.DeviceValue(colDev) = 4 Then
          hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), 42000, 255, hs.DeviceValue(transDev)})
          End If
          
          if hs.DeviceValue(colDev) = 5 Then
          hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), 46848, 255, hs.DeviceValue(transDev)})
          End If
          
          if hs.DeviceValue(colDev) = 6 Then
          hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), 53028, 255, hs.DeviceValue(transDev)})
          End If
          
          if hs.DeviceValue(colDev) = 7 Then
          hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), 4000, 255, hs.DeviceValue(transDev)})
          End If
          
          if hs.DeviceValue(colDev) = 8 Then
          hs.PluginFunction("JowiHue", "", "SetLightsKelvin", {True, lightID, hs.DeviceValue(brightDev), "6000" ,hs.DeviceValue(transDev)})
          
          End If
          
          if hs.DeviceValue(colDev) = 9 Then
          hs.PluginFunction("JowiHue", "", "SetLightsKelvin", {True, lightID, hs.DeviceValue(brightDev), "3000" ,hs.DeviceValue(transDev)})
          End If
          
          End Sub
          Just a suggestion - you could simplify your code a little as follows:
          Code:
          ' lightID is the light or group name
          dim lightID as string = "Porch Lights"
          
          'brightDev is the master brightness control
          dim brightDev as integer = 9170
          
          'transDev is the transition time device
          dim transDev as integer = 9952
          
          'colDev is the color selector device
          dim colDev as integer = 9172
          
          'specDev is the special level device
          dim specDev as integer = 9171
          
          sub Main(ByVal Parms as Object)
           select case hs.DeviceValue(colDev)
            case 1
             hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), 1, 255, hs.DeviceValue(transDev)})
            case 2
             hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), 10752, 255, hs.DeviceValue(transDev)})
            case 3
             hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), 26260, 255, hs.DeviceValue(transDev)})
            case 4
             hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), 42000, 255, hs.DeviceValue(transDev)})
            case 5
             hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), 46848, 255, hs.DeviceValue(transDev)})
            case 6
             hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), 53028, 255, hs.DeviceValue(transDev)})
            case 7
             hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), 4000, 255, hs.DeviceValue(transDev)})
            case 8
             hs.PluginFunction("JowiHue", "", "SetLightsKelvin", {True, lightID, hs.DeviceValue(brightDev), "6000" ,hs.DeviceValue(transDev)})
            case 9
             hs.PluginFunction("JowiHue", "", "SetLightsKelvin", {True, lightID, hs.DeviceValue(brightDev), "3000" ,hs.DeviceValue(transDev)})
           end select
          End Sub

          Comment


            #20
            Originally posted by Tillsy View Post


            Just a suggestion - you could simplify your code a little as follows:
            Thanks, I’ll clean it up. That is a script I use for a lot of different Hue lighting. I am using all hue bulbs, so I could also probably pass the 4 devices as parameters, so that the same script could be used for all lights. I’m not a programmer, so I cobbled something together that worked, then edit the script’s device RefIDs and whether it is referencing a light or a group for the different lights or groups.

            HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

            Comment


              #21
              Originally posted by rprade View Post
              Thanks, I’ll clean it up. That is a script I use for a lot of different Hue lighting. I am using all hue bulbs, so I could also probably pass the 4 devices as parameters, so that the same script could be used for all lights. I’m not a programmer, so I cobbled something together that worked, then edit the script’s device RefIDs and whether it is referencing a light or a group for the different lights or groups.
              Randy,

              This might help you as a starting point.
              Code:
                'Script to set Hue Lights
                  'Parms =
                  '1 = String lightID is the light or group name
                  '2 = Int brightDev is the master brightness control
                  '3 = Int transDev is the transition time device
                  '4 = Int colDev is the color selector device
                  '5 = Int specDev is the special level device
              
                  'Eg. ("Porch Lights",9170,9952,9172,9171)
              
                  'HueSat is the Sat Value to set
                  Dim HueSat As Integer = 0
              
                  'HueKelvin is the Kelvin Value to set
                  Dim HueKelvin As String = Nothing
              
              
                  Sub Main(ByVal Parms As Object)
              
                      Dim SplitParam() As String = Split(Parms, ",")
              
                      Dim lightID As String = SplitParam(1)
                      Dim brightDev As Integer = SplitParam(2)
                      Dim transDev As Integer = SplitParam(3)
                      Dim colDev As Integer = SplitParam(4)
                      Dim specDev As Integer = SplitParam(5)
              
                      Select Case hs.DeviceValue(colDev)
                          Case 1
                              HueSat = 2
                          Case 2
                              HueSat = 10752
                          Case 3
                              HueSat = 26260
                          Case 4
                              HueSat = 42000
                          Case 5
                              HueSat = 46848
                          Case 6
                              HueSat = 53028
                          Case 7
                              HueSat = 4000
                          Case 8
                              HueKelvin = "6000"
                          Case 9
                              HueKelvin = "3000"
                      End Select
              
                      If HueSat > 0 Then
                          hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), HueSat, 255, hs.DeviceValue(transDev)})
                      Else
                          hs.PluginFunction("JowiHue", "", "SetLightsKelvin", {True, lightID, hs.DeviceValue(brightDev), HueKelvin, hs.DeviceValue(transDev)})
                      End If
                  End Sub
              Greig.
              Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
              X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
              Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
              Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
              Scripts =
              Various

              Comment


                #22
                Thanks Greig;

                That makes sense and adds more to my scripting understanding. I will employ those changes as well.

                One last thing to hand off as a parameter determines if it is addressing a light or a group.

                For a group:
                hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), HueSat, 255, hs.DeviceValue(transDev)})
                For a Light:
                hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {False, lightID, hs.DeviceValue(brightDev), HueSat, 255, hs.DeviceValue(transDev)})
                HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                Comment


                  #23
                  Originally posted by rprade View Post
                  Thanks Greig;

                  That makes sense and adds more to my scripting understanding. I will employ those changes as well.

                  One last thing to hand off as a parameter determines if it is addressing a light or a group.

                  For a group:
                  hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, lightID, hs.DeviceValue(brightDev), HueSat, 255, hs.DeviceValue(transDev)})
                  For a Light:
                  hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {False, lightID, hs.DeviceValue(brightDev), HueSat, 255, hs.DeviceValue(transDev)})
                  Randy,
                  Glad I can help you for a change and not the other way round!
                  I have added the Boolean and named it IsGroup but I am not sure if it should be called IsLight as I don't know which way round it works.
                  I also removed your specDev param as it is not used in the script, If you need it and want it to do something drop me an email.


                  Code:
                      'Script to set Hue Lights 
                      'Parms = 
                      '1 = Bool Is a lighting Group
                      '2 = String lightID is the light or group name
                      '3 = Int brightDev is the master brightness control
                      '4 = Int transDev is the transition time device
                      '5 = Int colDev is the color selector device
                  
                  
                      'Eg. (False,"Porch Lights",9170,9952,9172)
                  
                      'HueSat is the Sat Value to set
                      Dim HueSat As Integer = 0
                  
                      'HueKelvin is the Kelvin Value to set
                      Dim HueKelvin As String = Nothing
                  
                  
                      Sub Main(ByVal Parms As Object)
                  
                          Dim SplitParam() As String = Split(Parms, ",")
                  
                          Dim IsGroup As Boolean = Parms(1)
                          Dim lightID As String = Parms(2)
                          Dim brightDev As Integer = Parms(3)
                          Dim transDev As Integer = Parms(4)
                          Dim colDev As Integer = Parms(5)
                  
                  
                          Select Case hs.DeviceValue(colDev)
                              Case 1
                                  HueSat = 2
                              Case 2
                                  HueSat = 10752
                              Case 3
                                  HueSat = 26260
                              Case 4
                                  HueSat = 42000
                              Case 5
                                  HueSat = 46848
                              Case 6
                                  HueSat = 53028
                              Case 7
                                  HueSat = 4000
                              Case 8
                                  HueKelvin = "6000"
                              Case 9
                                  HueKelvin = "3000"
                          End Select
                  
                          If HueSat > 0 Then
                              hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {IsGroup, lightID, hs.DeviceValue(brightDev), HueSat, 255, hs.DeviceValue(transDev)})
                          Else
                              hs.PluginFunction("JowiHue", "", "SetLightsKelvin", {IsGroup, lightID, hs.DeviceValue(brightDev), HueKelvin, hs.DeviceValue(transDev)})
                          End If
                      End Sub
                  Greig.
                  Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
                  X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
                  Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
                  Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
                  Scripts =
                  Various

                  Comment


                    #24
                    Originally posted by enigmatheatre View Post

                    Randy,
                    Glad I can help you for a change and not the other way round!
                    I have added the Boolean and named it IsGroup but I am not sure if it should be called IsLight as I don't know which way round it works.
                    I also removed your specDev param as it is not used in the script, If you need it and want it to do something drop me an email.



                    Greig.
                    Thanks again for the help. It is actually Group = True, Light = False, so it looks like you got it right. specDev is from an earlier iteration, I don't think I use it in any of the scripts. I think that does it. I will work on it later tonight.
                    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                    Comment

                    Working...
                    X