Announcement

Collapse
No announcement yet.

Need Tutorial On 'get' Commands

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

    Need Tutorial On 'get' Commands

    Here is what I am trying to do. I want get the current temperature from the thermostat and the current setpoints, then populate them to virtual devices.

    I can't figure out how format it correctly in a script.

    My temperature device will be t1.
    My heat setpoint device will be t2.
    My cool setpoint device will be t3.

    It's probably really simple, but I have very very little scripting experience.

    Any help is appreciated.

    Jim

    #2
    Take a look at the following and this should help you figure out the others. This is what I'm using to get the temps from thermostats which are setup as standalone. It might be slightly different when setup as zones, however I received numerous errors when I attempted to do anything with a zone setup.

    sub main()
    dim rcs
    set rcs=hs.plugin("RCS Serial Thermostats")
    dim zone1
    dim zone2
    dim zone3

    zone1=rcs.GetTemp(1)
    zone2=rcs.GetTemp(2)
    zone3=rcs.GetTemp(3)
    '*********************************
    '* Update Homeseer device values *
    '*********************************
    hs.setdevicevalue "^1",cint(Zone1)
    hs.setdevicevalue "^8",cint(zone2)
    hs.setdevicevalue "^15",cint(zone3)
    '**********************************
    '* Update Homeseer device strings *
    '**********************************
    hs.setdevicestring "^1",cstr(zone1)
    hs.setdevicestring "^8",cstr(zone2)
    hs.setdevicestring "^15",cstr(zone3)
    end sub
    HS: 2.5.0.60
    Environment: Virtual XP as guest in VMWare Server running under Win 7
    Plug-ins: MLHSPlugin|RCS Serial Thermostat|UltraLog|UltraMon|
    Misc: 303 Devices, 313 Events, 68+ Scripts

    HSeer: 3.0.0.54
    Environment: Virtual XP as guest in VMWare Server running under Win 7
    Plug-ins: BLGData|BLRF|BLRadar|BLRandom|BLSpeech
    UltraM1G3|UltraECM3|UltraMon3|UPBSpud|Z-Wave
    Misc: 148 Devices, 116 Events, 9+ Scripts (so far, still converting)

    Comment


      #3
      Originally posted by jstaab View Post
      Take a look at the following and this should help you figure out the others. This is what I'm using to get the temps from thermostats which are setup as standalone. It might be slightly different when setup as zones, however I received numerous errors when I attempted to do anything with a zone setup.

      sub main()
      dim rcs
      set rcs=hs.plugin("RCS Serial Thermostats")
      dim zone1
      dim zone2
      dim zone3

      zone1=rcs.GetTemp(1)
      zone2=rcs.GetTemp(2)
      zone3=rcs.GetTemp(3)
      '*********************************
      '* Update Homeseer device values *
      '*********************************
      hs.setdevicevalue "^1",cint(Zone1)
      hs.setdevicevalue "^8",cint(zone2)
      hs.setdevicevalue "^15",cint(zone3)
      '**********************************
      '* Update Homeseer device strings *
      '**********************************
      hs.setdevicestring "^1",cstr(zone1)
      hs.setdevicestring "^8",cstr(zone2)
      hs.setdevicestring "^15",cstr(zone3)
      end sub
      Thanks jstaab, it worked great. Took me a few minutes but once I replaced your example with what I needed, realized I can't have spaces in the names within the script, it worked the way I want it to.

      Thanks for your help,

      Jim

      Comment

      Working...
      X