Announcement

Collapse
No announcement yet.

Tracking usage on Trane thermostat

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Tracking usage on Trane thermostat

    I'm using a Trane thermostat and Z-wave usb stick. I am curious if there is a way to track the amount of time the ac/heater unit runs? I know that this information is viewable on the tstat, but can it be logged somehow within HS? Is the tstat device stat reported to HS or would I have to poll it constantly to see if the unit is running or not?

    #2
    I'm not sure the Z-Wave protocol provides the capability to transmit this information to the primary controller.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      Right, so I figure I'd have to track it. Does HS know when the device state of the tstat changes?

      Comment


        #4
        Originally posted by dinki View Post
        Right, so I figure I'd have to track it. Does HS know when the device state of the tstat changes?
        If you poll it then it should. The only issue will be the lost time between polls and the fact that too much polling can wreak havoc on your Z-Wave network.
        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

        Comment


          #5
          Originally posted by dinki View Post
          I'm using a Trane thermostat and Z-wave usb stick. I am curious if there is a way to track the amount of time the ac/heater unit runs? I know that this information is viewable on the tstat, but can it be logged somehow within HS? Is the tstat device stat reported to HS or would I have to poll it constantly to see if the unit is running or not?
          You should look at Blade's Z-Wave Thermostat plug-in. I wrote a ASPX page that he now includes in the install, and the source is open. The page actually reads his database (where he logs when the system is heating / cooling) and totals up the times on a per-day basis. You certainly could hack / re-use the code in my web page to do what you are talking about. From what you've said, it may be that the web page is already doing what you want. I wrote it for my Tran t-stat.

          Steve

          Comment


            #6
            I have been tracking my furnace run time for the past 4 years. I use a x10 powerflash module connected to the "humidifier" terminals on the furnace controller board. Perhaps there is a z-wave device equivalent to the x10 powerflash.

            Steve Q
            HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
            2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

            Comment


              #7
              I use a combination of Jon00's uptime utility and SQL Server Express/ChartDirector to track my uptime:
              Attached Files
              HS4Pro on a Raspberry Pi4
              54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
              Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

              HSTouch Clients: 1 Android

              Comment


                #8
                I am also using Jon00's uptime utility. It does a real nice job.
                Billy

                Comment


                  #9
                  Originally posted by rmasonjr View Post
                  I use a combination of Jon00's uptime utility and SQL Server Express/ChartDirector to track my uptime:
                  Would it be possible to share your scripting config information? This is exactly what I'd like to do.

                  Comment


                    #10
                    Originally posted by dinki View Post
                    Would it be possible to share your scripting config information? This is exactly what I'd like to do.
                    I don't mean to push, but... Did you look at my Graph? Like I said it is mostly an VB.NET script inside of an ASPX web page. You could lift the script and use it directly with no other components. Unless I'm missing something....

                    Steve

                    Comment


                      #11
                      Originally posted by dinki View Post
                      Would it be possible to share your scripting config information? This is exactly what I'd like to do.
                      Here's how mine works. Keep in mind, this relies on SQL Server express and ChartDirector and Jon00's uptime monitor. stevea's approach is likely a little simpler to setup.

                      Here's the script:
                      PHP Code:
                      Imports ChartDirector
                      Imports System
                      .Data.SqlClient

                      Public Const DEVICE_LIST As String "V13,V14"
                      Public Const CONN As String "Server=HOMESEER\SQLEXPRESS;Database=uptime;integrated security=SSPI;"

                      Public Sub BuildGraph(ByVal Parms As Object)
                          
                      Dim data0(6) As Double
                          Dim data1
                      (6) As Double
                          Dim labels
                      (6) As String
                          Dim c 
                      As XYChart = New XYChart(300180, &Hffffc0, &H0000001)
                          
                      Dim layer As LineLayer
                          Dim d 
                      As Date Now()
                          
                      Dim i As Integer
                          Dim s 
                      As New SqlConnection
                          Dim cm 
                      As SqlCommand
                          Dim sqlDr 
                      As SqlDataReader Nothing

                          
                      Try
                              
                      s.ConnectionString CONN
                              s
                      .Open()

                              
                      ''build labels so that today is on the right of the graph
                              
                      For 6 To 0 Step -1
                                  labels
                      (i) = Left(weekdayname(DatePart("w"d)), 3)
                                  
                      cm = New SqlCommand("select uptime from uptime where device='V13' and CONVERT(varchar,date,112)='" d.toString("yyyyMMdd") & "'"s)
                                  
                      ''hs.writelog("debug"d.toString("yyyyMMdd"))
                                  
                      sqlDr cm.ExecuteReader
                                  
                      While (sqlDr.Read)
                                      
                      data0(i) = CDbl(sqlDr(0))
                                  
                      End While
                                  
                      sqldr.close()

                                  
                      cm = New SqlCommand("select uptime from uptime where device='V14' and CONVERT(varchar,date,112)='" d.toString("yyyyMMdd") & "'"s)
                                  
                      ''hs.writelog("debug"d.toString("yyyyMMdd"))
                                  
                      sqlDr cm.ExecuteReader
                                  
                      While (sqlDr.Read)
                                      
                      data1(i) = CDbl(sqlDr(0))
                                  
                      End While
                                  
                      sqldr.close()

                                  
                      DateAdd("d", -1d)
                              
                      Next i

                              c
                      .setPlotArea(4535240120, &HFFFFFF, -1, -1, &HC0C0C0, -1)
                              
                      c.addLegend(4512False""8).setBackground(Chart.Transparent)
                              
                      c.addTitle("HVAC Usage in Minutes""Arial Bold"9, &HFFFFFF).setBackground(c.patternColor(New Integer() {&H4000, &H8000}, 2))
                              
                      c.yAxis().setLabelFormat("{value}")
                              
                      c.xAxis().setLabels(labels)
                              
                      layer c.addLineLayer()
                              
                      layer.addDataSet(data0, &HCF4040"LR TStat").setDataSymbol(Chart.SquareSymbol7)
                              
                      layer.addDataSet(data1, &H40CF40"BR TStat").setDataSymbol(Chart.DiamondSymbol9)
                              
                      layer.setDataLabelFormat("{value|0}")

                              
                      c.makeChart("C:\Program Files\HomeSeer 2\html\Images\hvacUptime.jpg")
                          Catch 
                      ex As exception
                              hs
                      .writelog("Uptime"ex.message)
                          Finally

                              
                      s.close()
                          
                      End Try


                      End Sub


                      Public Sub Main(ByVal Parms As Object)
                          
                      Dim s As New SqlConnection
                          Dim c 
                      As SqlCommand
                          Dim sensors 
                      As String DEVICE_LIST
                          Dim ary
                      () As String
                          Dim i 
                      As Integer

                          ary 
                      Split(sensors",")
                          
                      s.ConnectionString CONN
                          
                      Try
                              
                      s.Open()

                              For 
                      0 To UBound(ary)
                                  
                      = New SqlCommand("delete from uptime where device='" ary(i) & "' and CONVERT(varchar,date,101)=CONVERT(varchar,getdate(),101)"s)
                                  
                      c.executenonquery()
                                  
                      = New SqlCommand("INSERT INTO [uptime].[dbo].[uptime] ([device],[uptime],[date]) " _
                                   
                      "VALUES('" ary(i) & "'," CInt(hs.DeviceValue(ary(i))) & ",getdate())"s)
                                  
                      c.ExecuteNonQuery()
                              
                      Next i

                          
                      Catch ex As Exception
                              hs
                      .WriteLog("uptime"ex.Message)
                          Finally
                              
                      s.Close()
                              
                      Nothing
                              s 
                      Nothing
                          End 
                      Try
                      End Sub

                      Public Sub PurgeRecords(ByVal Parms As Object)
                          
                      Dim s As New SqlConnection
                          Dim c 
                      As SqlCommand

                          s
                      .ConnectionString CONN
                          
                      Try
                              
                      s.Open()
                              
                      = New SqlCommand("delete from uptime.dbo.uptime where(DATEDIFF(day, dateTime, GETDATE()) >= 30)"s)
                              
                      c.ExecuteNonQuery()

                          Catch 
                      ex As Exception
                              hs
                      .WriteLog("uptime"ex.Message)
                          Finally
                              
                      s.Close()
                              
                      Nothing
                              s 
                      Nothing
                              hs
                      .WriteLog("uptime""PurgeRecords completed.")
                              
                      End Try
                      End Sub

                      Public Sub ShrinkDatabase(ByVal Parms As Object)
                          
                      Dim s As New SqlConnection
                          Dim c 
                      As SqlCommand

                          s
                      .ConnectionString CONN
                          
                      Try
                              
                      s.Open()
                              
                      = New SqlCommand("dbcc shrinkdatabase (uptime,2)"s)
                              
                      c.ExecuteNonQuery()

                          Catch 
                      ex As Exception
                              hs
                      .WriteLog("uptime"ex.Message)
                          Finally
                              
                      s.Close()
                              
                      Nothing
                              s 
                      Nothing
                              hs
                      .WriteLog("uptime""ShrinkDatabase completed.")
                          
                      End Try

                      End Sub 
                      Attached Files
                      HS4Pro on a Raspberry Pi4
                      54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
                      Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

                      HSTouch Clients: 1 Android

                      Comment


                        #12
                        @Steve, I did look for it but couldn't find it. Just found it as BLStat. Will give it a go.

                        Comment


                          #13
                          @rmasonjr, thanks. I'm trying out the BLStat plugin but do appreciate your posting.

                          Comment


                            #14
                            Originally posted by dinki View Post
                            @rmasonjr, thanks. I'm trying out the BLStat plugin but do appreciate your posting.
                            No problem - you wont go wrong with Blade's plugins - very high quality!
                            HS4Pro on a Raspberry Pi4
                            54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
                            Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

                            HSTouch Clients: 1 Android

                            Comment

                            Working...
                            X