Announcement

Collapse
No announcement yet.

EZsnsRF (dakota motion sensor) external script

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    question about data values (bit vs decimal)

    Jeff was kind enough to send me the EZIO8SA script that he uses.

    I would like to ask someone though to explain the logic for the if-then test. For the following excerpt, I need to understand the bit-to-decimal conversion within Jon's and Jeff's code:

    If (Val("&H" & Data(12)) And &H01) <> &H01 Then ' input 1 is not set
    End If

    If (Val("&H" & Data(12)) And &H02) <> &H02 Then ' input 2 is not set
    End If

    If (Val("&H" & Data(12)) And &H04) <> &H04 Then ' input 3 is not set
    End If

    If (Val("&H" & Data(12)) And &H08) <> &H08 Then ' input 4 is not set
    End If

    In this logic, &H01 applies to input 1, &H02 applies to input 2, &H04 applies to input 3, etc. I assume that &H16=input 5, &H32=input 6, etc. Is this correct? Can anyone elaborate further?

    Thanks, Blake

    Comment


      #32
      I would have to check the docs for the EZIO to be sure but yes, that is the general idea. There is one bit per input. The code is grabbing the hex value (which is in text form) and then anding out the "other" bits to test just for the one we want.

      If you want to forward me the current version I can take a look at the callback portion to see what is up.

      Jon


      Originally posted by shermbb View Post
      Jeff was kind enough to send me the EZIO8SA script that he uses.

      I would like to ask someone though to explain the logic for the if-then test. For the following excerpt, I need to understand the bit-to-decimal conversion within Jon's and Jeff's code:

      If (Val("&H" & Data(12)) And &H01) <> &H01 Then ' input 1 is not set
      End If

      If (Val("&H" & Data(12)) And &H02) <> &H02 Then ' input 2 is not set
      End If

      If (Val("&H" & Data(12)) And &H04) <> &H04 Then ' input 3 is not set
      End If

      If (Val("&H" & Data(12)) And &H08) <> &H08 Then ' input 4 is not set
      End If

      In this logic, &H01 applies to input 1, &H02 applies to input 2, &H04 applies to input 3, etc. I assume that &H16=input 5, &H32=input 6, etc. Is this correct? Can anyone elaborate further?

      Thanks, Blake
      Jon Ort
      JonOrt@The--Orts.com
      (Remove the dashes in the address, spam is getting out of hand)

      Comment


        #33
        update device status for EZIO8SA

        Can anybody help me out? I have implemented the script and I can see the added device in Homeseer, the relays output are working fine but I can't seem to get the device status on the inputs to work!

        Thanks

        Dan Noiseux
        SDA Domotique
        www.sda.ca

        Comment


          #34
          Hi all does anyone have a copy of a script that handles the remotelink and the ezio with the call back working......

          Thank you Robert

          Comment


            #35
            EzSnsRF - No Script Actions

            Hi Bob,

            I just loaded the 8/31/2007 vers of your script to support a new EZSnsRF I received. It appears the script isn't firing as I don't see any reference to it on the Insteon Config page, nor in the log when I set it for detailed logging. I do see this error on startup for my EZSnsRF:
            2/4/2012 3:53:29 PM ~!~Insteon~!~Error: An attempt was made to initialize an external Insteon device ID# 1E.7A.DD. This device is already supported within the plug-in itself. The request was denied.
            12/4/2012 3:53:29 PM ~!~Insteon~!~External Device Registration complete.


            I have updated the address for the EZSnsRF device in the Insteon_ExtDevSupport.vb script in the scripts dir, and did pair a Dakota transmitter to the EZSnsRF. I then linked the EZSnsRF to my PLM. I also see the E40-48 in Status.

            Const EZSnsRFAddress As String = "1E.7A.DD"
            Const EZSnsRFDevName As String = "EZSnsRF1"
            Const EZSnsRFDevLocation As String = "TOutsideT"
            Const EZSnsRFDeviceCodeStart As Integer = 40
            Const EZSnsRFNumSensorsToWatch As Integer = 8

            When I push the transmitter button I see this in the detailed logs (no mention of the script)
            12/4/2012 4:24:00 PM Insteon Received STX 0x50 (Raw Insteon Rec):1E 7A DD 07 03 6F 8B 27 81
            12/4/2012 4:24:00 PM Insteon Received message from House EZSndRF (1E.7A.DD) taking hops: 1
            12/4/2012 4:24:02 PM Insteon Received STX 0x50 (Raw Insteon Rec):1E 7A DD 07 03 6F 8B 27 01
            12/4/2012 4:24:02 PM Insteon Received message from House EZSndRF (1E.7A.DD) taking hops: 1

            Somehow I've missed something but can't figure out why the script isn't working.

            Insteon Plug-in 1.7.3.1
            HS2 2.5.0.58

            Thanks for any help you can provide
            David


            Originally posted by bobwondernut View Post
            All:

            Here's a significantly improved version of the script. I've got this confirmed to work at home now with the following equipment:


            I've posted this one as a zip, so just unzip and copy the single script file into your Homeseer 2 Scripts directory.

            Install instructions are almost the same: follow the EZsnsRF manual's instructions to pair the sensors (one at a time) against your PLM/PLC. Then, edit the script in Notepad and give it the Insteon address of your EZsnsRF, make sure EnableEZSnsRF is set to True, and (optionally) set EZsnsRFNumSensorsToWatch to the number of Dakota Alert sensors/devices/channels you intend to monitor. Shut down and restart homeseer and you should see the devices appear in the status screen starting at E40 (unless you've changed the starting code in the script). Each device corresponds to the sensors bound to the ezsnsrf (in the order you bound them.)

            I also cleaned up a couple of lines of code for the other EZ devices simplehomenet makes. I don't have those devices so I can't test if they work now, but there was little chance of them working before.

            Range here is great -- I've got the outdoor sensors at least 300 feet away from the EZsnsRF! It's also very reliable!

            Comment


              #36
              Hi, David.

              I recently decommissioned my EzSNSRF after years of consternation. I think, if I recall correctly, the weird thing about these was that they only sent group commands vs. targeted device commands, you had to link it to an existing device that wasn't the PLM, and then monitor the insteon command messages to sniff when it was manipulating the group.

              That could be entirely incorrect, though, too.

              Once the dual band stuff came along, I just replaced all the monstrous dakota alert boxes with the new Insteon RF motion sensors and put an in-line dual band relay in a deadhead box to make sure the RF signal gets repeated the 150' it needs to go. Works like a charm and the native device support is much nicer.

              Comment

              Working...
              X