Announcement

Collapse

Contacting HomeSeer This Week

HomeSeer is open and operational this week. All orders are being processed and shipped as usual. However, some staff are working from home. If you need to contact HomeSeer for support or customer service, please use our Email or Chat options. https://homeseer.com/contact-us/
See more
See less

Speaking HAI Outside Temperature

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

  • Speaking HAI Outside Temperature

    I'm new to scripting.
    Can anybody tell me a easy way to speak the outside HAI temperature and humidity. I know how create events and do basic scripting. I can get Homeseer to speak the zone value but not the actual temperature.

    Ray

  • #2
    If the temp and humidity are devices in HomeSeer then this script should work:
    sub main()
    sTemp = hs.deviceString("A1")
    sHumidity = hs.deviceString("A2")
    hs.speak "The temperature is " & sTemp
    hs.speak "and the humidity is " & sHumidity
    end sub

    Change the A1 and A2 to your devices for temp and humidity.
    -Rupp
    sigpic

    Comment


    • #3
      Rupp thanks for the quick reply, that worked great.

      I'm also working on script to log TED readings and temperatures.
      How do I add temperature and humidity to my log (I have the TED part working).
      Here is the script I have so far.

      Dim fso,file 'for HVAC log routine
      dim HVACinfo 'string to write to file for HVAC log
      Const OpenFileForReading = 1 'for HVAC log routine
      Const OpenFileForWriting = 2 'for HVAC log routine
      Const OpenFileForAppending = 8 'for HVAC log routine
      Const HVAClogpath = "c:\Program Files\Homeseer 2\HVACLOG.log1" 'for HVAC log routine
      HVACinfo = date & "," &_
      time & "," &_
      hs.DeviceValue("&9") & "," &_
      hs.DeviceValue("&5") & "," &_
      hs.DeviceValue("&10") & "," & "," &_
      hs.DeviceValue("_13")& "," &_
      hs.DeviceValue("_11")& "," &_
      hs.DeviceValue("_12")& "," &_
      hs.DeviceValue("_10")
      Set fso = CreateObject("Scripting.FileSystemObject")
      Set file = fso.OpenTextFile(HVAClogpath, OpenFileForAppending,True)
      file.WriteLine(HVACinfo)
      file.Close

      Comment


      • #4
        You should be able to add the devicestrings to the string you are already building. IE
        Dim fso,file 'for HVAC log routine
        dim HVACinfo 'string to write to file for HVAC log
        Const OpenFileForReading = 1 'for HVAC log routine
        Const OpenFileForWriting = 2 'for HVAC log routine
        Const OpenFileForAppending = 8 'for HVAC log routine
        Const HVAClogpath = "c:\Program Files\Homeseer 2\HVACLOG.log1" 'for HVAC log routine
        HVACinfo = date & "," &_
        time & "," &_
        hs.DeviceValue("&9") & "," &_
        hs.DeviceValue("&5") & "," &_
        hs.DeviceValue("&10") & "," & "," &_
        hs.DeviceValue("_13")& "," &_
        hs.DeviceValue("_11")& "," &_
        hs.DeviceValue("_12") & "," &_
        hs.DeviceValue("_10") & "," &_
        hs.deviceString("A1") & "," &_
        hs.deviceString("A2")
        Set fso = CreateObject("Scripting.FileSystemObject")
        Set file = fso.OpenTextFile(HVAClogpath, OpenFileForAppending,True)
        file.WriteLine(HVACinfo)
        file.Close
        -Rupp
        sigpic

        Comment


        • #5
          I did that before but got the HAI zone value and not the actual temperature of sensor.

          Ray

          Comment


          • #6
            Extra temperature and humidity sensors connect to the HAI panel using an Input Zone. If you have the plug-in configured to create devices for the zones, then you are plugging in the address for the device representing the zone input that the temperature/humidity sensors are connected to.

            If you configure the HAI plug-in to create devices for HVAC (thermostats and aux temp sensors) then you will get devices for each of these items, and then you can use the display string (e.g. 74.6°F) or the value (746) using the commands Rupp showed you.

            The other way to do this is to go to the HAI plug-in documentation, and there you will find script commands to access this information directly from the plug-in, and that way you will not have to have all of the devices on your system, which is nice if you are not using those devices for anything else. There is a way to get Aux temp readings if you know which aux temp sensor it is, and then you can write it to the log file.

            It sounds like the easiest method for you is to create the HVAC devices so that you can use the commands Rupp gave you, which with the right device should give you the values you want.
            Regards,

            Rick Tinker (a.k.a. "Tink")

            Comment


            • #7
              I hate to ask a stupid question but how do I setup a create the HVAC devices?

              Ray

              Comment


              • #8
                In the HAI config (/HAIWebConfig) put a check in the box in the "create devices" section for thermostats - of course now that I write that it dawns on me that it may only create thermostat devices and not aux temp/humidity devices, but it has been so long since I have worked with that code that I cannot recall... Try it and if it does not create all of the devices you need, you can use the thermostat ones it creates and then I can help you get the other information you want with a script. The documentation for the plug-in is in the \html\HAI System Plug-In\WebHelp folder, and in the newest version of the plug-in I think it is registered (to make it easier to access) from the HomeSeer help page at /help.
                Regards,

                Rick Tinker (a.k.a. "Tink")

                Comment

                Working...
                X