Announcement

Collapse
No announcement yet.

Polling and Recording Temperatures

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

    Polling and Recording Temperatures

    I've installed an HTZ S2 and linked it to my Omni Pro II. (Pete - thanks for the info on capabilities - http://board.homeseer.com/showthread...errerid=119168)

    I need help understanding my options for capturing temperatures and storing them. For example - I see a MySQL option but I have no experience with it.

    Can data be store on the HTZ S2? Or do I need a computer or some other storage that's on all the time, such as a NAS ? Ideally I'd like to get the values in an excel spreadsheet on a Mac.

    Is there a thread that discusses this ? I looked but didn't see one.

    #2
    You can install MySql on the the RPi2.

    I have never done this and believe that it would be too much utilization with HS running.

    I am writing this but I do not really know how much or what it would do to the utilization of HS.

    It is part of a standard Linux server build with Ubuntu Server (LAMP) and have a few Linux servers running today.

    Is there a thread that discusses this ?

    no.

    Temperature data doesn't utilize too much space

    I am seeing a trending towards utilizing MariaDB these days which is an opensource like mySQL db.

    Thinking these days data import from mySQL to Microsoft Excel would not be an issue Years ago I would just do a query with export to a delimited text file. There is a nice Windows program called HeidiSQL which I use in Linux and it works fine for me.
    Last edited by Pete; February 16, 2017, 08:27 AM.
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
    HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

    HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
    HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

    Comment


      #3
      Here's what I would do:

      Create an event that triggers every time a temperature device changes value.
      The action for that event would run a simple script to write that value to a CSV file.
      Then, you can just bring that file over into Excel whenever you need it.

      Here's a sample script:
      Code:
      Public Sub Main(parms As Object)
      Dim sw as System.IO.StreamWriter
              Try
                   sw = New System.IO.StreamWriter("/usr/local/HomeSeer/Data/Temperature.csv",True)
                   sw.WriteLine(Now().ToString("MM-dd-yyyy") & "," & hs.deviceString(1234) & "," & hs.deviceValue(1234))
                   sw.Flush()
              Catch ex as Exception
                   hs.writeLog("TemperatureError",ex.message)
              Finally
                   If(Not sw Is Nothing) then sw.Close()
              End Try
      End Sub
      **Replace 1234 with the device id of your Temperature device. This can be found by clicking on the device, then clicking on the Advanced tab.
      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


        #4
        Here is a thread on writing to a .CSV file and graphing. I bookmarked long ago and have on my todo list.

        https://board.homeseer.com/showthread.php?t=164081

        Includes pulling into HStouch screens.

        Comment


          #5
          Thanks for the script. I'll try the CSV option. That should give me what I'm after.

          Comment

          Working...
          X