No announcement yet.

Davis Weather Station & HomerSeer Discussion

  • Filter
  • Time
  • Show
Clear All
new posts

  • Davis Weather Station & HomerSeer Discussion

    This is the thread to post questions about using the Davis “WeatherLink” software with HomeSeer.

    Find the “How-To use WeatherLink with HomeSeer here”.

    The WeatherLink software is included with the Davis “Data Logger” and can be purchased as an add-on for use with most, if not all Davis weather consoles.

    The Davis data logger is available in USB, RS232 serial and IP versions. See the Davis website for more information.

    I have had numerous people email me with comments, thanks and questions because we cannot carry on a discussion in the “How-To’ area, so this thread will be the place for that discussion.

    I have now updated the “How-To” post with a new WeatherLink template (.htx) that creates a dynamic script, which can be run from a recurring event.

    This “How-To" has received a five star rating from it's readers and some of the comments I have heard are:
    “This works so well and is very simple, Thanks for posting! ”
    “No need to purchase additional software like VWS - Virtual Weather Station, Thanks!”
    “This method uses far less CPU power than anything I’ve tried before.”

    I hope this helps you interface your Davis weather station with HomeSeer.


    Let the discussion begin…
    Last edited by HiTech; February 20th, 2010, 10:15 PM.

  • #2
    Thanks for this writeup - was great to see a way to connect these two programs.

    One suggestion for the script -- I've changed it to use the WeatherLink unit tags instead of them being hardcoded in the script. This way the script works as is for European & other users. Also, if anyone changes your configuration, you'll know about it. Sample:
    strTmp = "<!--outsideTemp--><!--tempUnit-->"
    If hs.DeviceString("w42") <> strTmp Then 'Test device & new temperature for change
    Call hs.SetDeviceLastChange("w42", Now) 'Sets device time of temperature change
    Call hs.SetDeviceValue("w42", <!--outsideTemp-->) 'Sets device value to the current temperature
    Call hs.SetDeviceString("w42", strTmp) 'Sets device string to the current temperature
    End If

    Call hs.SetDeviceValue("w51", <!--outsideHumidity-->) 'Sets device value to outside humidity
    Call hs.SetDeviceString("w51", "<!--outsideHumidity--><!--humUnit-->") 'Sets device string to outside humidity


    • #3

      You are correct, I made the same change a while back because it looked like a logical thing to do, I just never did post it. Good catch!

      Glad you liked it, thanks.

      Here is the complete updated template file:

      Sub Main()
          Dim strForecast
          strForecast = "<!--ForecastStr-->" 
           If hs.DeviceString("w48") <> strForecast Then 		'Test for forecast change
               Call hs.SetDeviceLastChange("w48", Now)		'Sets device time of forecast change 
               Call hs.SetDeviceString("w48", strForecast)
               Call hs.SetDeviceStatus("w48", 2)			'Trigger by "Set To ON" for forecast change  
           End If
          Dim strTemp
          strTemp = "<!--outsideTemp--><!--tempUnit-->"
           If hs.DeviceString("w50") <> strTemp Then		'Test for temperature change
               Call hs.SetDeviceLastChange("w50", Now)		'Sets device time of temperature change
               Call hs.SetDeviceValue("w50", <!--outsideTemp-->)
               Call hs.SetDeviceString("w50", strTemp)
          End If
          Call hs.SetDeviceValue("w51", <!--outsideHumidity-->)
          Call hs.SetDeviceString("w51", "<!--outsideHumidity--><!--humUnit-->")
          Call hs.SetDeviceValue("w52", <!--barometer--> * 1000)	'See multiplier notes (* 1000)
          Call hs.SetDeviceString("w52", "<!--barometer--><!--barUnit-->")
          Call hs.SetDeviceValue("w53", <!--windHigh1-->)
          Call hs.SetDeviceString("w53", "<!--windHigh1--><!--windUnit-->")
          Call hs.SetDeviceValue("w54", <!--windDir-->)
          Call hs.SetDeviceString("w54", "<!--windDirection-->")
          Call hs.SetDeviceValue("w55", <!--hiWindSpeed-->)
          Call hs.SetDeviceString("w55", "<!--hiWindSpeed--><!--windUnit--> at <!--hiWindSpeedTime-->")
          Call hs.SetDeviceValue("w56", <!--rainRate--> * 100)	'See multiplier notes (* 100)
          Call hs.SetDeviceString("w56", "<!--rainRate--><!--rateUnit-->")
          Call hs.SetDeviceValue("w57", <!--dailyRain--> * 100)	'See multiplier notes (* 100)
          Call hs.SetDeviceString("w57", "<!--dailyRain--><!--rainUnit-->")
          Call hs.SetDeviceValue("w58", <!--stormRain--> * 100)	'See multiplier notes (* 100)
          Call hs.SetDeviceString("w58", "<!--stormRain--><!--rainUnit-->")
          Call hs.SetDeviceValue("w59", <!--monthlyRain--> * 100)	'See multiplier notes (* 100)
          Call hs.SetDeviceString("w59", "<!--monthlyRain--><!--rainUnit-->")
          Call hs.SetDeviceValue("w60", <!--totalRain--> * 100)	'See multiplier notes (* 100)
          Call hs.SetDeviceString("w60", "<!--totalRain--><!--rainUnit-->")
          strTemp = "<!--outsideHeatIndex--><!--tempUnit-->"
           If hs.DeviceString("w61") <> strTemp Then		'Test for temperature change
               Call hs.SetDeviceLastChange("w61", Now)		'Sets device time of temperature change
               Call hs.SetDeviceValue("w61", <!--outsideHeatIndex-->)
               Call hs.SetDeviceString("w61", strTemp)
          End If
          strTemp = "<!--windChill--><!--tempUnit-->"
           If hs.DeviceString("w62") <> strTemp Then		'Test for temperature change
               Call hs.SetDeviceLastChange("w62", Now)		'Sets device time of temperature change
               Call hs.SetDeviceValue("w62", <!--windChill-->)
               Call hs.SetDeviceString("w62", strTemp)
          End If
        strTemp = "<!--hiOutsideTemp--><!--tempUnit--> at <!--hiOutsideTempTime-->"
           If hs.DeviceString("w63") <> strTemp Then		'Test for high temperature change
               Call hs.SetDeviceLastChange("w63", Now)		'Sets device time of high temperature change
               Call hs.SetDeviceValue("w63", <!--hiOutsideTemp-->)
               Call hs.SetDeviceString("w63", strTemp)
          End If
        strTemp = "<!--lowOutsideTemp--><!--tempUnit--> at <!--lowOutsideTempTime-->"
           If hs.DeviceString("w64") <> strTemp Then		'Test for low temperature change
               Call hs.SetDeviceLastChange("w64", Now)		'Sets device time of low temperature change
               Call hs.SetDeviceValue("w64", <!--lowOutsideTemp-->)
               Call hs.SetDeviceString("w64", strTemp)
          End If
      End Sub
      Again, thanks for reminding me about the unit tags, I had forgotten that I made that change to my template file and wish I would have posted it back when I changed mine. You beat me to it!

      -Rick Higgs
      Last edited by HiTech; May 11th, 2010, 07:52 PM.


      • #4
        Davis Weather station

        Hi Rick...

        I certainly am not a scripting guy at all...but, believe it or not, I followed your instructions and now have my Davis Weather station communicating to Homeseer.

        What is the best way to use the virtual device values as conditions for other events? (Example: I want to have a condition that triggers at >80 degrees. With the Davis input being stored as virtual devices, Homeseer only lets me have conditions of "on", "off", but not "greater than", "less than", etc)

        Thank you for the great instructions and script!
        Last edited by cjrs27; May 11th, 2010, 12:28 PM. Reason: Fixed typo


        • #5

          I’m glad I could help. Honestly I’m not very good at scripting either.

          Try this:
          For your event trigger, under “Select trigger”, “Current Trigger Type” select “Device Value Change”. Then under “Edit Device Value Change Trigger” select your device and under the “Value is:” select “Greater Than" or “Less Than”


          For “Current Trigger Type”, “Condition” you could “Add a Device condition to Group 1” and select “Value is within the range” and in the “Offset” box input the range “80…120”. This would trigger the event if the value is between 80 and 120 for greater than 79. Alternately you could input the range as “32…79” to trigger the event if the value is less than 80, but greater than 32.

          That should do it for you.

          Also, here is a fun thing to try: (assuming you used the same device code numbers. Ex: w48 is your forecast)

          Create an event named Forecast changed
          Set the trigger to location 1 location 2 Forecast is set to “ON”
          And the action to speak Our weather forecast has changed. The updated forecast is, $$DS:w48.

          Each time the forecast changes on you Davis Weather Station it will speak the new forecast.

          Have fun and if you have any other questions, please post them here and I will reply as soon as I can.
          Last edited by HiTech; May 11th, 2010, 08:22 AM. Reason: corrected information


          • #6
            Outstanding! That works great.

            Thank you!


            • #7
              Bob, I'm happy to help, glad you got it figured out. Your welcome.

              New May 11, 2010...

              Updated “WeatherDevices.htx” template in post #3 above.

              -Added time of high wind to the device string of w55 “High Wind Speed” (Device value unchanged)
              -Added device value & device string to code w63 “Today’s High Temperature” with time of high temperature in the device string.
              -Added device value & device string to code w64 “Today’s Low Temperature” with time of low temperature in the device string.

              If you use the same device codes I do, then you can copy and paste the entire code above to replace the code you currently have. Remember to make this change to the “WeatherDevices.htx” template found in “C:\WeatherLink\your station name\Templates” folder and the dynamic script in HomeSeer’s script folder will change automatically. You should also manually add the devices w63 and w64.


              • #8
                Hi Rick...

                Awesome, I am now using the above script.

                Good tip...I would have forgotten to add 63 & 64 into HomeSeer. Have now. All working extremely well. Thank you!

                Before I got the Davis unit, I was using WeatherPlug with data from an airport several miles from here. Because the airport is closer to the coast than my house is, the weather was always cooler and wetter than at my actual house. So heating/cooling/sprinkler decisions in HomeSeer were better than nothing, but were more like "approximations" based on data several miles from me.

                When I got the Davis unit and then followed your great instructions and installed your scripts, all I had to change was the "w" prefixes to "d" prefixes so that that the WeatherPlug devices didn't stomp on the Davis' devices.

                Yesterday, I switched all of my HomeSeer weather conditions over to Davis data. Last night, all of the HomeSeer functions worked flawlessly. (Example: Switched my house thermostat to "heat" and set the "heat" temp for the desired night temperature because the outside temperature had dropped below 60 degrees.) This morning, I deactivated WeatherPlug and am strictly using the Davis data.

                WeatherPlug worked great and did exactly what it was supposed to do. Just feel that having the Davis weather station at my house is giving me real-time data for conditions at my house which gives HomeSeer even better control of things for me.
                Last edited by cjrs27; May 12th, 2010, 03:32 PM. Reason: typos


                • #9


                  • #10
                    Hi Rick...

                    It is indeed a small world. I didn't know you and Dale were related.

                    It would be great to see more tips and tricks that you have created.

                    One of the things I hate is to have the yard sprinklers turn on with my vehicle parked out front and the wind blowing the spray onto, invariably, a fresh wax job. So HomeSeer now checks to see if I'm home, which way the wind is blowing, and confirms that it isn't currently raining nor has it rained in the last 24 hours.


                    • #11
                      Hi Rick...

                      I have a HomeSeer thermostat event conditional on the Davis outside temp being 70...120. I was was watching it this morning and the event triggered at 69.8.

                      Not at all a huge deal, but thought it was curious. Is there round-off happening somewhere?


                      • #12
                        Hi Rick...

                        OK, it's early for me. After my brain woke up I remembered your original posting saying something about round-off and there I found this note from you:
                        HomeSeer automatically rounds off numbers after the decimal point for the “Device Value".


                        • #13


                          • #14
                            Hi Rick...

                            Thank you for the tip.


                            • #15
                              Hi Rick...

                              Is there a WeatherLInk HTML Tag for yesterday's high temperature?

                              (Figured if there wasn't I could build a virtual device in HomeSeer and capture today's high temp at 11:59 PM, which I could then use as a reference for the next day.)

                              Any ideas?