Announcement

Collapse
No announcement yet.

The "Proper" or best way to trigger events based on Wireless X10 received

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

    The "Proper" or best way to trigger events based on Wireless X10 received

    Blade (or anyone else that has a good answer),

    What is the "proper" / best way to trigger an event based on the reception of a standard wireless X10 signal being received by the W800?

    Here is my thought (I have not tried it yet since I just setup HS3 from scratch rather than migrate my setup from HS2.. So now I wanted to do it clean and "right").

    1) I have a W800 and many X10 wireless Palm Pads and X10 (non-security) motion sensors (Only sends codes A1 - P16)

    2) I create some kind of Status only device in HS3 for each and every Wireless X10 [A1-P16] (256 Devices Total - Some are Motion Sensor, Some Are Light Sensor, Some Are Palm Pad Button)

    3) I Use the shadow function of the BLRF plugin to map each and every one of the 256 possible wireless X10 (A1 - P16) to the 256 devices I created in #2 above.

    4) Now I can see the status of each of the X10 Wireless devices (Motion Sensor, Light Sensor, Palm Pad Button) and associate an HS3 event with each of those devices.

    - Will this approach work?
    - Is there a better way to accomplish this?
    - Will Dim / Brighten work?
    - Can the event re-trigger when, for example, the Palm Pad A1 is ON and I were to hit ON again? What if I hit ON a third time, will the event re-trigger yet again even though the shadowed device is already in an ON state (I want this behavior... I want an event trigger for every X10 A1-->P16 that is received by BLRF.

    Thanks for your help in setting up my reincarnation of HomeSeer using HS3.

    Jean-Marie
    ---------------------------------------------------
    Jean-Marie G. Vaneskahian
    jean@vaneskahian.com
    ---------------------------------------------------

    #2
    Does anyone have a reply to this? I figure it must be a pretty common setup?
    ---------------------------------------------------
    Jean-Marie G. Vaneskahian
    jean@vaneskahian.com
    ---------------------------------------------------

    Comment


      #3
      I have found that the shadow device seems to work good. This is how I use my palmpads to control my zwave lights
      Cheers,
      Bob
      Web site | Help Desk | Feature Requests | Message Board

      Comment


        #4
        Blade, can you give me some details on how best to set it up and keep it clean?

        1) I create some kind of Status only device in HS3 for each and every Wireless X10 [A1-P16] (256 Devices Total - Some are Motion Sensor, Some Are Light Sensor, Some Are Palm Pad Button)

        2) I Use the shadow function of the BLRF plugin to map each and every one of the 256 possible wireless X10 (A1 - P16) to the 256 devices I created in #2 above.

        3) Now I can see the status of each of the X10 Wireless devices (Motion Sensor, Light Sensor, Palm Pad Button) and associate an HS3 event with each of those devices.

        Do I need to create an ON event and an OFF event? How about Dim?

        Is there a better way to do this? Can you give me some details on how you have yours setup?
        ---------------------------------------------------
        Jean-Marie G. Vaneskahian
        jean@vaneskahian.com
        ---------------------------------------------------

        Comment


          #5
          I use BLRadar here with my X10 sensors. BLRadar has it own conversion tool to convert all devices from HS2 to HS3 but I believe they are status only devices for the X10 code you are using for the X10 sensor

          You would need to create your own events for the new devices if you are not using BLRadar.
          Cheers,
          Bob
          Web site | Help Desk | Feature Requests | Message Board

          Comment


            #6
            Blade, I am a long time user of your plugins. I have been using BLRader for a long time. I am not converting from HS2 to HS3, I am starting over from scratch.

            I want to use 2 types of Wireless X10 (Motion/Light MR14A and the handheld PalmPad)

            Since I am starting over from a greenfield environment, I assume I will need to create each and every device one by one?

            I created a test device for a PalmPad button (X10 Address L1). The Device I created was a test with "Address" Test_001. I assume device codes are no longer needed here anymore (A1, B1, etc). I told HomeSeer that the device WAS dimmable. I then shadowed in BLRF, L1 to the new device.

            When I hit PalmPad L1 on, the Test device in HomeSeer now turns on. When I hit PalmPad L1 off, the Test device in HomeSeer now turns off. But it does not dim even though the Log in HomeSeer shows BLRF sending L1 dim.

            I assume I would need to create devices as status only for Motion and Light sensors, but not Status only for PalmPads since they should be controllable.

            I can then add the decvices I create that are Motion and Light Sensors to BLRadar, but I would still need to create BOTH on and off events for PalmPad devices? How do I trigger an event for a Dim?

            Thanks for your help, please let me know where I am doing something wrong or could be better.
            ---------------------------------------------------
            Jean-Marie G. Vaneskahian
            jean@vaneskahian.com
            ---------------------------------------------------

            Comment


              #7
              Yes for dim you would need to make sure the device is dimmable and has status
              Cheers,
              Bob
              Web site | Help Desk | Feature Requests | Message Board

              Comment


                #8
                Blade, I am not trying to be dense, but I am still at a loss. Let me break down what I want to its bare essentials:

                - Only using X10 Wireless PalmPads

                - If a Wireless X10 PalmPad sends the command L1 On, L1 Off, L1 Dim or L1 Brighten, how do I get 4 events associated with those 4 commands to execute?


                (I assume I would manually create a device that will shadow L1 in BLRF. I would then create events based on that device? What if the device is already on, and another on is sent? How could the event re-trigger based on the second ON that BLRF receives.)

                What kind of device do I need to create for each of the PalmPad buttons to be able to use Dim? Does it have to be status ONLY?
                ---------------------------------------------------
                Jean-Marie G. Vaneskahian
                jean@vaneskahian.com
                ---------------------------------------------------

                Comment


                  #9
                  So here is the path I am taking. I am triggering an event on any wireless X10 received. Since the event conditions for BLRF can be "ANY" HouseCode or "ANY" UnitCode but does require 1 of 4 possible commands (ON, OFF, DIM, BRIGHT), I will need to create 4 events. One for each possible command. Then each event will call the same script:

                  Code:
                  Public Sub ProcessWirelessX10Received(ByVal Parms As Object)
                  	Dim HouseCode As String = ""
                  	Dim UnitCode As String = ""
                  	Dim Command As String = ""
                  
                  	HouseCode = hs.PluginFunction("BLRF", "", "LastHouseCode", nothing)
                  	UnitCode = hs.PluginFunction("BLRF", "", "LastDeviceCode", nothing)
                  	Command = hs.PluginFunction("BLRF", "", "LastCommand", nothing)
                  
                  	hs.writelog("** Debug **" , "HouseCode: " & HouseCode)
                  	hs.writelog("** Debug **" , "UnitCode: " & UnitCode)
                  	hs.writelog("** Debug **" , "Command: " & Command)
                  End Sub
                  I found the "LastCommand" in a previous thread, it is not documented as part of BLRF.

                  I will then call another Subroutine to perform some task. I am doing this since I could not find how to process a DIM or BRIGHT from a PalmPad. This does not even make sense since part of BLRF asks what % you want to DIM or BRIGHT by. But where is this even processed?
                  ---------------------------------------------------
                  Jean-Marie G. Vaneskahian
                  jean@vaneskahian.com
                  ---------------------------------------------------

                  Comment


                    #10
                    jeanv - I'm not sure I understand your problem, but my setup is very similar to yours. I have motion sensors and PalmPads controlling X10 modules. I simply set up each device as an X10 device, no shadowing on anything. When I want to control C3, I simply press the correct button on the PalmPad and it works fine with a W800. I don't understand your need for shadowing, unless you are trying to control some other technology, such as Zwave. Hey, we are almost neighbors, so we can figure this out.

                    Addendum - I just now caught on, you are using BLRadar and I'm not. Does BLRadar receive the data from the W800? I assumed you needed a plugin such as Blade's BLRF to receive W800 signals. With that said, you may need to install BLRF to receive W800 signals, then use BLRadar to process them. Your comment about House and Unit codes not being used puzzles me. They are still used in all X10 devices, except for my X10 door sensors. These you set up in BLRF after sending the signal (i.e., open the door) and BLRF receives a 4 or 5 digit code for the door sensor. Motion detectors, if they are X10, still use the House and Unit Code you set on the Motion detector (remember it defaults to A1 when you change or insert batteries). I have all motion detectors set up as a simple Appliance module, so you can always see the status on the device list page.
                    Last edited by prnorton; June 30, 2015, 10:42 PM. Reason: Added last sentence.

                    Comment


                      #11
                      That is exactly what I am trying to do... X10 Wireless to control Insteon... I have no X10 Powerline in the house. Also I just want X10 Wireless to control anything at all (Thermostat Setpoint, Radio Volume, etc...) That is why I also wanted a device DIM function to work.

                      I have it working now... No Shadowing... Just 4 events that call a script and then the script controls a device with the Address of: "X10_Wireless_A1 or X10_Wireless_A2 or X10_Wireless_B1, etc..."

                      So it looks for a device with the HouseCode and UnitCode at the end of the Device address...

                      Here are the events that are called when ANY X10 Wireless is received:
                      • Process Wireless X10 - BRIGHT
                      • Process Wireless X10 - DIM
                      • Process Wireless X10 - OFF
                      • Process Wireless X10 - ON


                      Each of those events calls this same script (I had to create 4 events since there is not an Action "ANY" for BLRF)

                      Code:
                      Public Sub ProcessWirelessX10Received(ByVal Parms As Object)
                      	Dim HouseCode As String = ""
                      	Dim UnitCode As String = ""
                      	Dim Command As String = ""
                      	Dim DeviceAddress As String = ""
                      	Dim DeviceReference As Integer
                      			
                      	HouseCode = hs.PluginFunction("BLRF", "", "LastHouseCode", nothing)
                      	UnitCode = hs.PluginFunction("BLRF", "", "LastDeviceCode", nothing)
                      	Command = hs.PluginFunction("BLRF", "", "LastCommand", nothing)
                      	DeviceAddress = "X10_Wireless_" & HouseCode & UnitCode
                      	DeviceReference = hs.DeviceExistsAddressFull(DeviceAddress, True)
                      			
                      	hs.writelog("** Debug **" , "HouseCode: " & HouseCode)
                      	hs.writelog("** Debug **" , "UnitCode: " & UnitCode)
                      	hs.writelog("** Debug **" , "Command: " & Command)
                      	hs.writelog("** Debug **" , "DeviceAddress: " & DeviceAddress)
                      	hs.writelog("** Debug **" , "DeviceReference: " & DeviceReference)
                      	
                      	If DeviceReference <> -1 Then
                      		Dim X10WirelessDeviceValue As Integer
                      		Dim NewX10WirelessDeviceValue As Integer
                      		X10WirelessDeviceValue = hs.DeviceValue(DeviceReference)
                      		If Command = "ON" Then
                      			NewX10WirelessDeviceValue = 100
                      		ElseIf Command = "OFF" Then
                      			NewX10WirelessDeviceValue = 0
                      		ElseIf Command = "BRIGHT" Then
                      			NewX10WirelessDeviceValue = X10WirelessDeviceValue + 10
                      			If NewX10WirelessDeviceValue > 100 Then NewX10WirelessDeviceValue = 100
                      		ElseIf Command = "DIM" Then
                      			NewX10WirelessDeviceValue = X10WirelessDeviceValue - 10
                      			If NewX10WirelessDeviceValue < 0 Then NewX10WirelessDeviceValue = 0
                      		End If
                      		hs.SetDeviceValueByRef(DeviceReference, NewX10WirelessDeviceValue, True)
                      		hs.writelog("** Debug **" , "X10WirelessDeviceValue: " & X10WirelessDeviceValue)
                      		hs.writelog("** Debug **" , "NewX10WirelessDeviceValue: " & NewX10WirelessDeviceValue)
                      	End If
                      End Sub
                      Now when any X10 Wireless is sent, it looks for a device with the Address "X10_Wireless_{HC}{UC}" and then controls that device including DIM and BRIGHT by steps of 10.

                      Then events can be created based on the device, or even break out more complex calls from this same script.
                      ---------------------------------------------------
                      Jean-Marie G. Vaneskahian
                      jean@vaneskahian.com
                      ---------------------------------------------------

                      Comment


                        #12
                        Sorry to bring up the old post, BUT glad to found it. I have just started rewriting my HS2 X10 to Zwave script that used hs.LastX10. The LastX10 is no longer available but the BLRADAR functions fit the bill.

                        Jean, have you made the change HS3 & converted your script?
                        If so do you mind sharing?
                        Larry

                        Comment

                        Working...
                        X