Announcement

Collapse
No announcement yet.

IR Devices

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

  • IR Devices

    I am starting to put together an IR devices web page and I have started setting up the buttons and also have a web page that I am trying to call up but it isn't working. If I go to the web page that has the devices set up and click on "control" then the buttons come up. But if I try to call the page up from the links at the top of the web pages I get this error :"Error finding device, try refreshing your status page" Here is the link I have set up: <input type="button" value="Remotes" onClick="window.parent.location.href='/irct?irct_location=Remotes&irct_name=garage_amp'">
    Not sure what is going on. Thanks for any help with this.

  • #2
    Are you using the HS Web Server?

    Comment


    • #3
      Yes I am. Something I found while looking at the scripts and such on the updater is the Remote Control script by Jeff Farmer. I installed that and I like the fact that it has dropdowns that can select the remote you want. However I have noticed that if I use the HS web control the status changes to reflect the last command given. But if I control it from Jeff's script then the status doesn't change. This looks like the way I might stay with so I was wondering if anyone has worked with this to get the status to change.

      Comment


      • #4
        If you are using a java dropdown menu setup, you can get different actions by using onchange vs onclick in the control line. Maybe something totally different, but I noticed the onclick in what was posted above.
        Why I like my 2005 rio yellow Honda S2000 with the top down, and more!

        Comment


        • #5
          sonypoolplr,
          Give me about 20 more minutes and I'll have a change for you to add to the page to set the status.
          --
          Jeff Farmer
          HS 3, HSPhone
          My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
          Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

          Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

          Comment


          • #6
            Here is remotecontrol.asp.
            Replace the one you have. This one will now set the status based on the button that is clicked.
            Attached Files
            --
            Jeff Farmer
            HS 3, HSPhone
            My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
            Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

            Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

            Comment


            • #7
              Thanks Jeff that is working great. Now if I may, one more request. I would like HS to know what status the devices are in especially the amps so that they can change based on something happening and then change back to their original state. Is there a way I can do this with your script? I have values set up for the status of the amps (input CD, input Tuner etc) but if I change them using your script then they are out of whack with how HS sees them. Thanks for the help with this.

              Comment


              • #8
                Can you explain how you have the values setup? How do you normally change them?
                --
                Jeff Farmer
                HS 3, HSPhone
                My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
                Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

                Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

                Comment


                • #9
                  I am using 10,20,30,and 40 for either CD input, tuner input, video 1 input, and video 2 input. When I change the input of the amp by x10 received I am setting a virtual device to that corresponding value. That way if I am listening to a cd and the phone rings HS switches the input to video 2 (for caller ID announcement) and after a minute it looks at the value of the virtual device to see what the input was before the change and in this case would set the amp back to input CD. Hope this is what you need to help me out. Thanks again.

                  Comment


                  • #10
                    Do you have the values stored somewhere? Like in an ini file. If there is no way for the page to look up what value should go with each button, then the only way would be to hard code in those values.

                    On line 8, I set dv to the device being controlled.
                    You could enter some if statements. Compare the location and device name being controlled to ones that you track the status of. If it matches then trigger the same event that the x10 would or just set the device's value and hard code in the correct number.
                    --
                    Jeff Farmer
                    HS 3, HSPhone
                    My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
                    Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

                    Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

                    Comment


                    • #11
                      I am not storing them in an ini file I am using a HS event to set the device value to either 10,20,30 or 40. So could I use something like:
                      If dv=input_cd then hs.SetdeviceValue("s30"),10

                      And then have other If/then statements for the other inputs and on/off and mute on/off?

                      Thanks

                      Comment


                      • #12
                        No, you would need a bit more information.
                        The page as it is right now, doesn't send the label for the clicked button. You would need that to test for "input_cd"
                        Line 164 is the end form tag so add this right above that line.
                        <pre class="ip-ubbcode-code-pre">
                        fs.Add "&lt;input type=""hidden"" name=""keylabel"" value="""
                        fs.Add arrKeys(0,w)
                        fs.Add """&gt;"
                        </pre>
                        This now sends you the label which is something easy for you to match on.

                        And your if would be more something like this.
                        <pre class="ip-ubbcode-code-pre">
                        if dv.Location = "Living Room" AND dv.Name="Some Amp" Then
                        Select Case Request.Form("keylabel")
                        Case "input_cd" hs.SetDeviceValue("s30"),10
                        Case "input_video1" hs.SetDeviceValue("s30"),20
                        End Select
                        End if
                        </pre>
                        Then just repeat the Case "label" lines to cover all your options. Replace Living Room and Some Amp with the correct location and device name that you want to control.

                        Repeat the if sections for each device. Doing it this way will allow for situations where you might have input_cd on more than one device.

                        If you have trouble with this, I'll be around tonight to answer questions or help.
                        --
                        Jeff Farmer
                        HS 3, HSPhone
                        My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
                        Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

                        Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

                        Comment


                        • #13
                          I just got around to trying this and I think I did everything right but I am getting the following error:
                          Script error: Object required: 'fs' With a box over on the right with this in front of it: fs.Add "
                          Since I am not that good with scripting I don't understand this error. Thanks for any help I can get with this.

                          Comment


                          • #14
                            Did you add both of the sections of the code for testing the label?

                            If so I would remove them, make sure the page is working, then add just one of the code snippets. Test the page and then add the second code snippet. That will narrow down which part is causing the error.
                            --
                            Jeff Farmer
                            HS 3, HSPhone
                            My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
                            Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

                            Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

                            Comment


                            • #15
                              If I put in this:
                              fs.Add "&lt;input type=""hidden"" name=""keylabel"" value="""
                              fs.Add arrKeys(0,w)
                              fs.Add """&gt;"
                              Then I get this error:
                              Script error: Object required: 'fs' fs.Add "
                              with a box after the "fs.Add" that I can type something into.
                              If I put this in:
                              if dv.Location = "Living Room Amp" AND dv.Name="Amp Input" Then
                              Select Case Request.Form("keylabel")
                              Case "input_cd" hs.SetDeviceValue("n35"),10
                              Case "input_cd" hs.SetDevicetring"n35","&lt;img align=""absmiddle"" src=""cdrom1.gif""&gt; " & "CD"
                              Case "input_tuner" hs.SetDeviceValue("n35"),20

                              Then I get this error:
                              Script error: Expected 'Select' End if Next
                              If I keep them both in I get the same error as the second.
                              Thanks again

                              Comment

                              Working...
                              X