Announcement

Collapse
No announcement yet.

dancing leds

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

    dancing leds

    Howto make the leds dance on my Crystal switch using the Stipus PLCbus connector.

    #2
    Just follow the steps in the crystal switch documentation to enable the dancing led feature (if not already done).

    Then, go to the PlcBus Connector plugin Web configuration interface, and create an Appliance Device P15. --> Device code must be P15.

    Then each time you click P15 ON (HomeSeer status page), crystal switch leds start dancing. Press P15 ON again, and the dance pattern changes (there are a few dance patterns available).

    Press P15 OFF, and leds stop dancing.
    --
    stipus

    Comment


      #3
      I don't have PLCBUS-4034 controller, so how to send the initial sequence from homeseer to activate. Changing the patterns seems straight forward,

      Comment


        #4
        I have been snooping the T4034E controller while holding P15 OFF, and pressing All Lights ON for 5 Secs.

        This sends a Scene Address Programming for P15, with databyte set to 3.

        Received: (255) P15 SceneAddressSetup Data1:3 Data2:0 Tx:False AckReq:False Ack:False IDreq:False Id:False 3PhReq:False RiscOK:True PlcBusOK:True

        If you have 3 crystal switches C1, D1, E1 that you want to see dancing:

        - Create a new PlcBus Scene Device P15
        - Add a scene entry C1 OFF
        - Add a scene entry D1 OFF
        - Add a scene entry E1 OFF
        - Program the scene

        I can't test as I don't have any crystal switch anymore, but I think it should work.
        --
        stipus

        Comment


          #5
          thanks, I'll give a go when I have spare moment of free time.

          Comment


            #6
            well that didn't work for me .... any suggestion(s)

            Comment


              #7
              I don't have any more suggestion.

              It should have worked as the PLCBUS-4034E is sending the same command when snooped.
              --
              stipus

              Comment


                #8
                You can also try with P16 instead of P15.

                Did you really set the PLCBUS switches to be OFF in the P15 scene before programming ?

                Then after programming, when you pressed P15 ON from HS status screen, the switches did not start dancing ?
                --
                stipus

                Comment


                  #9
                  Did you really set the PLCBUS switches to be OFF in the P15 scene before programming ?
                  Yes

                  Then after programming, when you pressed P15 ON from HS status screen, the switches did not start dancing ?
                  Yes

                  Comment


                    #10
                    It should have worked as the PLCBUS-4034E is sending the same command when snooped.
                    What do you use to snoop plcbus commands

                    Comment


                      #11
                      I have been using the PLCBUS 1141 interface, with the plugin in DebugMode.

                      I did press the keys on the PLCBUS 4034E controller in the order shown in the doc to enable dancing leds, and I watched the HomeSeer log.

                      I could see a Scene programming Plcbus command for P15 with databyte set to 3 (that's to set devices off).

                      Programming a scene with off devices from the plugin should send the exact same command.

                      However the plugin also sends other commands during scene programming... and this might interfere...

                      I'll see if I can add a plugin API to send any PlcBus command from a HS Script.
                      --
                      stipus

                      Comment


                        #12
                        thanks, looking forward.

                        Comment


                          #13
                          Here is a new version with 2 new APIs:

                          hs.Plugin( "PLCBUS Connector" ).SendPlcBusByteCommand( byteArrayString as String )

                          the string parameter must be the array of bytes that are sent to the Plcbus 1141 interface. You have to know the Plcbus protocol to use this.

                          This sends A1 ON for usercode 100
                          hs.Plugin( "PLCBUS Connector" ).SendPlcBusByteCommand( "2,5,100,0,2,0,0,3" )


                          hs.Plugin( "PLCBUS Connector" ).SendPlcBusCommand( deviceCode as String, plcBusFunction as Integer, data1 as Integer, data2 as Integer, feedback as Boolean )

                          This one is easier to use.

                          hs.Plugin( "PLCBUS Connector" ).SendPlcBusCommand( "A1", 2, 0, 0, false )

                          The second argument (PlcBusFunction) must be one of:

                          AllUnitsOff = 0,
                          AllLightsOn = 1,
                          On = 2,
                          Off = 3,
                          Dim = 4,
                          Bright = 5,
                          AllLightsOff = 6,
                          AllUserLightsOn =7,
                          AllUserUnitsOff =8,
                          AllUserLightsOff = 9,
                          Blink = 10,
                          FadeStop = 11,
                          PresetDim = 12,
                          StatusOn = 13,
                          StatusOff = 14,
                          StatusRequest =15,
                          ReceiverMasterAddressSetup =16,
                          TransmitterMasterAddressSetup =17,
                          SceneAddressSetup =18,
                          SceneAddressErase =19,
                          AllSceneAddressErase = 20,
                          Reserved1 = 21,
                          Reserved2 = 22,
                          Reserved3 = 23,
                          GetSignalStrength = 24,
                          GetNoiseStrength = 25,
                          ReportSignalStrength = 26,
                          ReportNoiseStrength = 27,
                          GetAllIdPulse = 28,
                          GetOnlyOnIdPulse = 29,
                          ReportAllIdPulse3Phase = 30,
                          ReportOnlyOnIdPulse3Phase = 31


                          If I follow the documentation for the dancing function assuming switch is C1:

                          1) Switch on the light on this crystal switch

                          hs.Plugin( "PLCBUS Connector" ).SendPlcBusCommand( "C1", 2, 0, 0, false )

                          2) using the PLCBUS controller, press and hold P15 OFF. This sends P15 OFF

                          hs.Plugin( "PLCBUS Connector" ).SendPlcBusCommand( "P15", 3, 0, 0, false )

                          3) press and hold "All lights On" for about 5 seconds. This sends the scene address programming with databyte1 set to 3

                          hs.Plugin( "PLCBUS Connector" ).SendPlcBusCommand( "P15", 18, 3, 0, false )


                          PS: these commands work from a VB.NET script. You have to remove function parenthesis () after SendPlcBusCommand, if you try this from the HomeSeer immediate command window as it's not VB.NET



                          [EDIT] attachement removed as it's now available from the updater.
                          Last edited by stipus; October 16, 2008, 12:24 PM.
                          --
                          stipus

                          Comment


                            #14
                            Change Status of P15 everytime you change dancemode.

                            Hi, this is only a idea to let the status message change to Dance1,Dance2,Dance3,Dance Ended so you can have different symbols for the dancing mode.

                            Setup a Trigger based on "Device Status Change" , "Set Any Status" and call this script.

                            I have notice that the value does not change in realtime on P15, mybe someone could update the script to fix this? If you refresh the page you se the right value.

                            PHP Code:
                            Sub Main
                            str_debug 
                            true
                            dim dancenumber
                            If hs.isoff("P15") = true Then
                            hs
                            .setdevicestring "P15","Dance off"
                            hs.SetDeviceLastChange "P15",now
                            hs
                            .SaveINISetting "Settings","plcbus",0,""
                            if str_debug true  then hs.writelog "Dance","Dance Ended" dancenumber
                            exit sub
                            Else
                            dancenumber hs.getINIsetting("Settings","plcbus",0,"")
                            if 
                            dancenumber 2 then 
                            hs
                            .SaveINISetting "Settings","plcbus",1,""
                            dancenumber 1
                            else
                            dancenumber dancenumber 1
                            hs
                            .SaveINISetting "Settings","plcbus",dancenumber,""
                            End If
                            If 
                            str_debug true  then hs.writelog "Dance","No:" dancenumber
                            hs
                            .setdevicestring "P15","Dance" dancenumber
                            hs
                            .SetDeviceLastChange "P15",now
                            End 
                            If
                            End Sub 
                            Please excuse any spelling and grammatical errors I may make.
                            --
                            Tasker Plugin / Speech Droid
                            Tonlof | Sweden

                            Comment


                              #15
                              dancing leds feature removed in new Crystal Switches

                              There has been a change of design with PLC-Bus to Crystal Switches.
                              Because there could be some flickering issue's with the 3 IC's setup (white label) they now produce introduced a 1 IC (red label) wich should be more stable.

                              Also they removed the dancing led feature and the intensity indicator (center leds)... verry sad

                              and added a local push button to change (in 3 steps) the intensity of the leds.

                              See http://www.s10.cn/uu.htm for official statement.

                              Comment

                              Working...
                              X