Announcement

Collapse
No announcement yet.

Aprilaire Thermostat as Temp Source?

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

    Aprilaire Thermostat as Temp Source?

    Pre-sale question here:

    Is is possible to use an Aprilaire thermostat as a temperature sensor source for mscTemperature? My primary application is not control, but simply logging of temperatures and, if possible, equipment cycle status.

    Thanks!

    #2
    I'm not familiar with the specific thermostat, but I use a HAI one and record the temperature it reports. If it shows up in the HS Device in the Device String or Device Value then it can be used.

    Comment


      #3
      Okay, it does show up as a device in HS. But I'm having all sorts of trouble finding where to map a HS device value into mscTemperature. I see where to tap into all sorts of other sensors and text files, but beyone the "Transfer mapped virtual devices to database at interval" check box I don't see anything in the options or the manual on how to link the two... I know I'm just missing it, but I can't seem to find it!

      Comment


        #4
        Put the device code of the aprilaire temperature reading device on one line of the Sensor setup page in mcsTemperature. Assign a database-friendly name in the database column such as "aprilaire"

        Comment


          #5
          Okay, I enter [2 in the Name / Low Resolution box, and Foyer in the DB Field box. I leave all the other fields blank. When I hit save it just disappears.

          (Attached is the view of the thermostats from the devices screen for reference)

          Earlier today I got this error. Not sure if this is related to me not being able to save the sensor?

          9/8/2009 2:23:42 PM - mcsTemperature - InitINIVariables sensorType=0, index=0 on line 52 Overflow


          .
          Attached Files
          Last edited by fulkerson; September 8, 2009, 05:15 PM.

          Comment


            #6
            The plugin that is posted at the top of this subforum will have the problem your are experiencing corrected

            Comment


              #7
              I figured out what I was doing wrong. You have to enter the device code in the DC column, not the Name column. Oops. The Name is automatically populated from the actual device name from HS.

              However, after if finally added the devices properly, it still did not show the temperature... I eventually realized that I had entered invalid characters (a set of parentheses) in the database field. It had automatically removed the space I had also entered, but accepted the other characters. When I removed that device the temperatures magically started showing up on the other devices (I have three thermostats I'm tracking).

              Now, I need some guidance on how to extract the thermostat set points and operating status (fan, heat, and cool cycles) from the HS device (see image in previous post). I assume this would involve some sort of scripting? (I do have some programming experience, but obviously have no prior experience with HS...) Any direction on where to start would be greatly appreciated. Thanks!

              Comment


                #8
                Some plugins will populate individual devices so first see if that option is available. If not then you will have to create and populate virtual devices with scripting. mcsTemperature provides some scripting support to extract numbers from HTML. The following is a start to give you the idea. Note that the LineBreak in your device string is the four characters less than, b, r, and greater than. I cannot put them here as the browser would interpret them so I used {br} in the example. You will need to change it in your script.

                This script would be called from a HS periodic event. The new devices would be used in mcsTemperature. The three new virtual devices would be created from HS Device/Status page before the script is first run.

                Code:
                sub main()
                    set mcs = hs.Plugin("mcsTemperature")
                    OldDC = "[2"
                    NewHC = "T"
                    NewUC = 1
                    LineBreak = "{br}"
                
                    'split the string into individual lines
                    arrString = split(hs.DeviceString(OldDC),LineBreak) 
                
                    if ubound(arrString) > 2 then
                        'keep only the 3 lines with numbers
                        redim preserve arrString(2)
                    else
                        'if there are fewer than 3 lines then must not be good so exit
                        exit sub
                    end if  
                 
                    'look in each line and move the number part to its own virtual device
                    For iLine = 0 to ubound(arrString)
                       hs.SetDeviceString NewHC & NewUC, mcs.GetNumber(arrString(iLine))
                       NewUC = NewUC + 1
                    Next
                    set mcs = Nothing
                end sub

                Comment

                Working...
                X