Announcement

Collapse
No announcement yet.

send number 500 to turn on light

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

    send number 500 to turn on light

    is it possible to make a event when i press the number 500 on my ir remote
    to turn on lights.

    i can not learn 500 in ir transplugin only 0 to 9

    #2
    Hi Ralphie,
    That's because only individual keys are learned / matched, not sequences.

    However, I suppose there isn't anything stopping you from building up a match to 5 0 0 based on 3 separate events to match the 5, 0, and 0.

    As each digit is matched, have the event call a vb.net script that would build up a string to determine a match on "500".

    If I get a little time today, I'll post up an example that might work for you.

    Comment


      #3
      OK, I've attached an example script that toggles a light on or off based on receiving the IR sequence of "500".

      Here are the steps to make it work for you.

      1. If you haven't already, learn the digit 5 and 0 so that a match can be detected for either of these digits.

      2. Copy the IrExtension.vb script into your scripts folder under the HomeSeer folder or wherever all of your other scripts are located. Note: you'll need to take off the extension .txt as the message board will not allow .vb uploads.

      3. Edit the script and replace "D2" with the code for your own light.

      4. Create 2 events, one to match the digit 5, the other to match the digit 0. Have the event call the script with the appropriate digit as shown in the screen shot below.

      Note: You'll probably want to comment out the hs.WriteLog calls once you know the script is working properly for you.
      Attached Files

      Comment


        #4
        Thanks, I tried it today and it works.

        Comment


          #5

          Comment


            #6
            Hi ralphie,

            I would guess you just don't have the calling syntax just right... (this would not be in the script, but in the event that calls the script...)

            So action would be "Run Script"

            You would choose "IrExtension.vb" from the "Existing Script:" drop list.
            In "Optional parameters...", you would type: ("Main","5") to match on button 5.

            Note the double quotes around both the sub name and digit to match.

            ... I don't see anything wrong with the changes you've made to the script, but I have NO idea why a match on 0 would not work for you either...

            Comment


              #7
              strange I have it all right like you have told, see below


              1 ontvangen
              Match IR Topfield_TF5510PVR,1 (57)
              WHEN
              Everyday
              Last ran: Yesterday 11:51
              Run script: IrExtension.vb("main","1")

              5 ontvangen
              Match IR Topfield_TF5510PVR,5 (61)
              WHEN
              Everyday
              Last ran: Yesterday 20:10
              Run script: IrExtension.vb("Main","5")



              the reason that i don't use 0 is because it is the same command to shutdown windows7 and i can't get that away.

              Comment


                #8
                Ralphie,

                I think the sub names are case sensitive for some reason. Try changing the lowercase m to a capital M in the word "Main" and see what happens...

                Comment

                Working...
                X