Announcement

Collapse
No announcement yet.

scripting with the UPB plug-in

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

    scripting with the UPB plug-in

    Sorry but the documentation for the plugin is a bit sparse with regard to scripting (I've reviewed the upb plug-in doc). I'm trying to access a link/device but it doesn't work. Do I use the Code id or name with setdevicestatus? Is there examples out there....

    #2
    you can treat them the same way as you do x10 devices

    you can set links with SetDeviceValue()

    You can access the status with DeviceValue and set it with exec10

    this a snippet that turns off my air cleaner if it is on

    'turn off air cleaner
    If hs.DeviceValue("#2") > 0 Then
    hs.ExecX10("#2", "Off")
    End If


    hope that helps

    Comment


      #3
      all of these don't work

      sub main()
      {
      hs.ExecX10("\30", 2);exit;
      or
      hs.ExecX10("\30", "off");exit;
      or
      hs.ExecX10("\30", "on");exit;
      or
      hs.ExecX10("#30", "on");exit;
      or
      $hs->ExecX10("\30,"off);exit;
      repeat variations...

      the \30 is defined in? I'm assuming the 'code' column of the Device/status page of Homeseer?

      Comment


        #4
        your assumption is correct. I don't know anything about scripting, however, so I can't help ya there.
        Plugins:
        BLLogMonitor, BLGarbage, BLBackup, BLOutGoingCalls, BLUps, BLRfid, JvEss, DooMotion, Applied Digital Ocelot, AC RF Processor, UltraMon, PJC AVR 430, UPB, Rain8net, DSC Panel, JRiver Media center, Windows Media Player, SageMediaCenter, SnevlCID, MCSTemperature.

        Comment


          #5
          You are correct - it is house\device code

          The only two things I can think of is -

          - my example was for .vb - I noticed that you have no parameters in main() so you may be using .txt - in wich case I think it would be hs.ExecX10 "#2", "Off"

          - maybe the capitalization is a factor - try "Off" and "On"

          Comment


            #6
            The standard X10 commands are linked to the approximate UPB commands, but the commands you are using are actually for transmitting X10 commands (legacy HomeSeer stuff). What you generally want to do with non-X10 devices is to set the device status. The plug-in will see the new status that is set and make the devices respond appropriately.

            SetDeviceStatus("D7", 2)

            Would turn the device on.

            With lighting devices you can usually just set the value directly.

            SetDeviceValue("D7", 100)

            Would turn the device on to 100%

            SetDeviceValue("D7", 50)

            Would dim to 50%


            Jon


            Originally posted by JohnBoy70_99 View Post
            You are correct - it is house\device code

            The only two things I can think of is -

            - my example was for .vb - I noticed that you have no parameters in main() so you may be using .txt - in wich case I think it would be hs.ExecX10 "#2", "Off"

            - maybe the capitalization is a factor - try "Off" and "On"
            Jon Ort
            JonOrt@The--Orts.com
            (Remove the dashes in the address, spam is getting out of hand)

            Comment


              #7
              do I add the declaration for the plugin e.g. UPB_System similar to HAI_System

              also I'm assuming that you add punctuation mark associated with UPB device and link codes e.g. ' or \ or # with the number for the device/link.

              in the last example I'm assuming that I can do

              $return=$hs->SetDeviceValue("\30", 100);

              assuming that I don't have to define $hs since its 'pre' declared with Homeseer and the $return will be a 1 for success?

              Comment


                #8
                so when I try this:

                sub main()
                {
                hs.SetDeviceValue("\30", 10);exit;

                I get this...

                9/24/2008 9:09:30 PM - Error - Running script, script run or compile error in file: humidity_shower_lights_master.pl-2147467259:Can't call method "Dispatch" on an undefined value at -e line 5. in line 0 More info: Can't call method "Dispatch" on an undefined value at -e line 5.


                I get no error message when I us

                $hs->SetDeviceValue ("\30", 10);exit;
                but also no response

                Comment

                Working...
                X