Announcement

Collapse
No announcement yet.

Log the Low and High Temperature for the day

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

  • Log the Low and High Temperature for the day

    I have an zwave outdoor temp sensor that reports current temp. I would like to be able to log the high and low for the current 24 hour period and for the previous 24 hour period and have them displayed on Homeseer Mobile.
    s there an easy way to do this?

  • #2
    Originally posted by Jim View Post
    I have an zwave outdoor temp sensor that reports current temp. I would like to be able to log the high and low for the current 24 hour period and for the previous 24 hour period and have them displayed on Homeseer Mobile.
    s there an easy way to do this?
    I believe you can do this with the Device History plugin.


    Sent from my iPhone using Tapatalk
    HS3 3.0.0.500 &HSTouch Designer 3.0.71 with 782 Devices, 479 Events
    Plugin's:
    BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee,
    EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
    weatherXML, Jon00 Alexa Helper, Network Monitor, Z-Wave 3.0.1.252

    Comment


    • #3
      I stole this script form somebody on this board. I run it every 10 minutes. Every night at midnight, I clear the high and low devices, but you could store them in devices for the previous day.

      Sub Main(ByVal Devicenum As String)
      dim nowtemp, hitemp, lotemp As Integer
      dim tempdev As Integer
      tempdev = CInt(Devicenum)

      'create an event to run this script every ten minutes
      'if greater than or less than before, then load hi/lo with current value

      'target hi/lo device numbers
      'high temperature = device 551
      hitemp=hs.DeviceValue(551)
      'msgbox ("High" & hitemp)
      'low temperature = device 552
      lotemp=hs.DeviceValue(552)
      'msgbox ("Low" & lotemp)


      nowtemp=hs.DeviceValue(tempdev)
      'msgbox ("Current temp of Devicenum " & tempdev & " is " & nowtemp)

      If nowtemp < lotemp then
      hs.SetDeviceValueByRef(552, nowtemp, true)
      'msgbox ("lotemp changed")
      End If

      If nowtemp > hitemp then
      hs.SetDeviceValueByRef(551, nowtemp, true)
      'msgbox ("hitemp changed")
      End If

      End Sub
      Mark

      Hometroller S6 w/ HS3Pro, Way2Call
      BLAB8SS, BL Backup, Easy Trigger, HSTouch, Open Sprinkler, SONOS, Ultra1Wire3, UltraM1G, WeatherXML, Z-Wave

      Comment


      • #4
        I don't understand what to do with - tempdev = CInt(Devicenum) to set the device I have the temperature stored in. I use WeatherXml plugin.

        Thanks,
        Tim
        FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

        HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

        No, Im from Iowa. I only work in outer space. Captain Kirk

        Comment


        • #5
          Originally posted by Mark S. View Post
          I stole this script form somebody on this board. I run it every 10 minutes. Every night at midnight, I clear the high and low devices, but you could store them in devices for the previous day.
          Question: SInce you have a device that reports the high and low temperatures, wouldn't it be more efficient just to intercept when the temperature changes (through an event tied to that device), rather than running an event every 10 minutes? That is how I handle the high and low temps from my indoor thermostat.

          Comment


          • #6
            Originally posted by fungun View Post
            I don't understand what to do with - tempdev = CInt(Devicenum) to set the device I have the temperature stored in. I use WeatherXml plugin.

            Thanks,
            Tim
            "tempdev" holds the integer value of the reference number of the device that is reporting the temperature. The input to the "Main" routine is a character string that contains that device number, which needs to be converted into an integer in order to be useful. The two virtual devices that hold the high and low temps for display are hard coded here.

            Comment


            • #7
              Originally posted by aa6vh View Post

              Question: SInce you have a device that reports the high and low temperatures, wouldn't it be more efficient just to intercept when the temperature changes (through an event tied to that device), rather than running an event every 10 minutes? That is how I handle the high and low temps from my indoor thermostat.
              Of course you could. But I am pulling outdoor temperature from either a weather station or a 1-wire device, which provides tenths of a degree resolution. So the temperature can fluctuate several times per minute, so I'd be running the script a lot if it ran on every change. Ten minutes and 2 significant digits is fine for my purposes.
              Mark

              Hometroller S6 w/ HS3Pro, Way2Call
              BLAB8SS, BL Backup, Easy Trigger, HSTouch, Open Sprinkler, SONOS, Ultra1Wire3, UltraM1G, WeatherXML, Z-Wave

              Comment


              • #8
                Originally posted by Mark S. View Post
                I stole this script form somebody on this board. I run it every 10 minutes. Every night at midnight, I clear the high and low devices, but you could store them in devices for the previous day.

                End Sub
                I'm curious how you handle the clearing and storing of the previous day's values.

                Comment


                • #9
                  Originally posted by thomauto@aol.com View Post

                  I'm curious how you handle the clearing and storing of the previous day's values.
                  Click image for larger version

Name:	Temp Reset.jpg
Views:	33
Size:	140.8 KB
ID:	1299423
                  Mark

                  Hometroller S6 w/ HS3Pro, Way2Call
                  BLAB8SS, BL Backup, Easy Trigger, HSTouch, Open Sprinkler, SONOS, Ultra1Wire3, UltraM1G, WeatherXML, Z-Wave

                  Comment


                  • #10
                    Here is an example for how I record max wind gust for the day using Easy Trigger and Big5. I use an Easy Trigger greater than comparison between current wind speed and max recorded gust for the day. If current speed is greater, it triggers an update for the daily max value using a Big5 HTTP JSON call with the new higher value. The "round" regex statement rounds the transferred value to 1 decimal place past a whole number.

                    I use the same type events for the month and year max wind gusts, rain total month to date and year to date, temperature high and low (today, yesterday and year to date), days of precipitation this month and year, etc.,. At 2 seconds after midnight each night I reset the values for daily max devices to 0 and let it start over, and do the same on 1st day of the month and year for monthly and yearly totals using BLReminders plugin.

                    Using this method you get changes in real time as they happen and you don't have to run a script command at regular intervals.

                    Click image for larger version

Name:	gusttoday.png
Views:	43
Size:	50.2 KB
ID:	1299502

                    --Barry

                    Comment


                    • #11
                      Thanks Guys!

                      Comment


                      • #12
                        Originally posted by aa6vh View Post

                        Question: SInce you have a device that reports the high and low temperatures, wouldn't it be more efficient just to intercept when the temperature changes (through an event tied to that device), rather than running an event every 10 minutes? That is how I handle the high and low temps from my indoor thermostat.
                        How are doing this in your setup?

                        Comment


                        • #13
                          Originally posted by Jim View Post

                          How are doing this in your setup?
                          When the temperature changes, an event is run that runs a script. The script checks to see if the current temperature is greater than the high temperature, or lower than the low temperature, and if so, stores the new value.

                          I use global variables to store the high and low temperatures, fully aware that if HS reboots, I loose that information (which is rare). I do this both for inside and outside temperatures. That script will also rebuild a Virtual Switch Device string, so that the high/low information can be displayed on my HS Touch Screens.

                          You could use Virtual Switches for the high/low storage, and also use Easy Trigger for the updated temperatures.

                          Correction: I forgot that I had switched from global variables to storing the values in an ".ini" file, which survives an HS reboot. I also save the time of the high and low temperature in that same ini file.

                          Comment

                          Working...
                          X