Announcement

Collapse
No announcement yet.

How To Monitor Temperature of your Zee S2

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

    #16
    Very nice Christopher! Thank-you.

    It will work just fine and is easier than running additional cron jobs / perl script on the RPi2 running Homeseer 3. Rob's script does that with an externally connected USB 1-Wire hub.

    Many folks are just learning what they can do with the GPIO ports on the RPi2 utilizing Homeseer 3. Many do not tinker much with the RPi2 hardware and just utilize HS3 with external USB devices.

    Yeah here initially it was an experiment on the Zee-2 using an external USB connected 1-Wire hub and posting the one minute sensors stuff to a text file.

    My Zee-2 in the attic has the RTC PiFace clock and GPIO Z-Wave Plus card in it and it has been running in the attic with Homeseer 3 just fine.

    I connected a tiny USB hub on it with 2-temperature and 1 humidly sensor to the hub.

    The stacked RTC shim and GPIO board made it difficult to tinker with the GPIO pins on the device.

    Later on played with doing some bit banging using a DS1307 RTC on my little OpenWRT 2" X 2" microrouter. I really am amazed what the tiny device can do.



    I know here I am venturing a bit to a tangent and this doesn't relate directly to the RPi2 but in fact was a learning tool for me relating to the RPi2.

    I didn't know until I read some about it that I could connect / solder on one 1-Wire temperature sensor on the tiny rtc board. See the image here. The three pins on the top right are for one 1-wire sensor and no pull up resistors are needed.

    The traces though are backwards so you have to install the 1-Wire maxim temperature sensor in reverse. (kind of a gotcha flaw in the design of the board tracings). It should have been labeled with pin #'s simply 1,2 and 3.

    Well too they put a charging circuit on the board for a rechargeable lithium battery. Pictured is the correct battery.

    Bad thing is that it is mostly sold with a non rechargeable lithium battery that could maybe explode?

    Wondering now if folks are putting these in their RPi's and wondering why they are exploding (I haven't hear of any doing this yet).



    I did that and it worked and is working on 2 micro routers with a 400Mhz CPU and hardly any play space (RAM) to speak of.

    That and here been playing a bit with OpenPeak Jogglers and found that the tiny RTC with battery provides a much needed battery backed up RTC for the Joggler which was dependent on the cloud for its time (guessing it was timeless?)

    Relooking at my Zee-2 now and your Homeseer script and thinking of removing the PiFace clock and replacing it with a DS-1307 RTC with 1 1-wire temperature sensor. This way I am killing two birds with one stone per say.
    Last edited by Pete; February 8, 2016, 03:23 PM.
    - 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


      #17
      So, all now up and running, monitoring the various flow temperatures to our ASHP/UFH system.



      The VB script
      Code:
       
       Sub Main(parms As Object)
          dim valid as Double
          dim tpos as Double
          dim w1file as string
          dim resp as string
          dim filename as string
      
           filename = "/sys/devices/w1_bus_master1/28-04159111b4ff/w1_slave"
          w1file = My.Computer.FileSystem.ReadAllText(filename)
          valid = w1file.IndexOf("YES")
          If valid > 0 Then
              tpos = w1file.IndexOf("t=")
              If tpos > 0 Then
                  resp = Mid(w1file, tpos + 3, 5) / 1000
              End If
          End If
          hs.SetDeviceValueByRef(68, resp, True)
      
           filename = "/sys/devices/w1_bus_master1/28-04159113e0ff/w1_slave"
          w1file = My.Computer.FileSystem.ReadAllText(filename)
          valid = w1file.IndexOf("YES")
          If valid > 0 Then
              tpos = w1file.IndexOf("t=")
              If tpos > 0 Then
                  resp = Mid(w1file, tpos + 3, 5) / 1000
              End If
          End If
          hs.SetDeviceValueByRef(69, resp, True)
      
           filename = "/sys/devices/w1_bus_master1/28-0415911140ff/w1_slave"
          w1file = My.Computer.FileSystem.ReadAllText(filename)
          valid = w1file.IndexOf("YES")
          If valid > 0 Then
              tpos = w1file.IndexOf("t=")
              If tpos > 0 Then
                  resp = Mid(w1file, tpos + 3, 5) / 1000
              End If
          End If
          hs.SetDeviceValueByRef(70, resp, True)
      
           filename = "/sys/devices/w1_bus_master1/28-0415913711ff/w1_slave"
          w1file = My.Computer.FileSystem.ReadAllText(filename)
          valid = w1file.IndexOf("YES")
          If valid > 0 Then
              tpos = w1file.IndexOf("t=")
              If tpos > 0 Then
                  resp = Mid(w1file, tpos + 3, 5) / 1000
              End If
          End If
          hs.SetDeviceValueByRef(71, resp, True)
       End Sub
      I could have made the code a bit simpler, but it works! Added a couple of events to detect when the system switches between UFH and DHW.

      Comment


        #18
        Very nice Christopher. I like that the script makes it easy to add multiple sensors. I am going to give it a try today and add more sensors and just adjust your script to read my 1-wire temperature text. I am guessing it should work fine.

        Code:
        TTY /dev/ttyUSB0
        READ_TIME 1000
        LOG_TYPE 1
        LOG_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F"
        CNT_FORMAT "%b %d %H:%M:%S Sensor %s #%n %C"
        HUM_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F H: %h%%"
        SENSORS 2
        ROM 0 0x28 0xCF 0xD8 0xF4 0x02 0x00 0x00 0xF5 
        ROM 1 0x26 0x3B 0x3A 0xF5 0x00 0x00 0x00 0xBD
        Which outputs this text anyplace.

        Code:
        Feb 09 08:29:02 Sensor 0 C: -2.00 F: 28.40
        Feb 09 08:29:03 Sensor 1 C: -2.94 F: 26.71 H: 84%
        IE:

        Code:
        Zee:/usr/share# digitemp_DS9097U -w -s /dev/ttyUSB0
        DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane
        GNU General Public License v2.0 - http://www.digitemp.com
        Turning off all DS2409 Couplers
        ..
        Devices on the Main LAN
        28CFD8F4020000F5 : DS18B20 Temperature Sensor
        263B3AF5000000BD : DS2438 Temperature, A/D Battery Monitor
        Code:
        Zee:/usr/share# digitemp_DS9097U -q -c /etc/digitemp.conf -a
        Feb 09 08:50:22 Sensor 0 C: -1.81 F: 28.74
        Feb 09 08:50:23 Sensor 1 C: -2.78 F: 26.99 H: 85%




        Can you paper draw a schematic relating to how you have your addition 1-wire temperature sensors hooked up to the GPIO pins? Are you using a pull up resistor? What GPIO pins are you using on your RPi2?

        Did you wire directly to the GPIO pins or use a breadboard? Just asking cuz here utilize the PiFace RTC shim and GPIO Z-Wave plus card. Not sure where a good spot to solder the 1-wire stuff would be.

        Did a quickie search and found a few drawings. Here is one. Personally here would prefer to remove the USB 1-wire hub and utilize the GPIO pins inside of my Zee-2 in the attic; but make it plug n play if possible.





        I see too that Sheepwalk electronics makes small internal 1-Wire hubs for the RPi2. With an RTC shim, GPIO Z-Wave plus card which is not a pass through this would would fit.



        My attic installed RPi2 - Zee-2 is using one of these with 2 temperature and one humidity sensor.

        Last edited by Pete; February 9, 2016, 09:46 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


          #19
          I use 3 GPIO leads that plug onto the pins on the Pi. +ve to pin 1, ground to pin 6, and data to pin 7, with a 4.7k pull-down resistor soldered onto a small piece of stripboard for connection between the chain of 1-wire sensors and the Pi. I was going to use a Custard Pi board, but using a piece of stripboard was adequate.
          Attached Files

          Comment


            #20
            Thank-you Christopher.

            Do you have anything else plugged in to the GPIO pins on your RPi2-Homeseer 3 device?

            Internally here is my setup. I could take the 1-Wire connection from one of the higher number GPIO pins and the ground / 3.3VDC from the top terminals on the GPIO Z-Wave plus card eh?
            Attached Files
            - 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


              #21
              I've got the PiFace RTC plugged into the GPIO interface, but because it's only a shim the connecting plug/lead just plugs onto the pin as it sticks through the PiFace RTC shim.

              Comment


                #22
                Thank you Christopher.

                Does the PiFace shim only utilize 4 pins from the GPIO? IE: SDL/SDC/ground and VCC?

                I cannot find any specific drawings or schematics indicating which pins are being utilized on the RTC PiFace shim and Z-Wave Plus devices.

                Ideally for me would be just taking the connections off of the top of the GPIO Z-Wave plus card and using one GPIO pin not used for the two cards.

                Ground and VCC wouldn't be an issue here. Looking closely at the RTC shim I see SDA (pin 3) and SCL (pin 5), ground (pin 6) and VCC.
                Attached Files
                Last edited by Pete; February 9, 2016, 11:52 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


                  #23
                  - 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

                  Working...
                  X