Announcement

Collapse
No announcement yet.

Setting up Weather and Forecast

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

    Setting up Weather and Forecast

    My goal is to obtain outdoor temperatures from a web weather source as I have no outdoor sensors. I only have temperature and humidity sensors in my lab only.

    I am trying to setup weather and forecasting, and I just confusing myself with all the options.

    I tried a ton of different approaches, and none seem to work. It seems like there is a small detail that I am missing, and I can't find it. I am sure it is something stupid, but damned if I can see it.

    Here is where I currently stand.

    The weather.jpg shows what I get when I click weather in mcsTemperature. It is not pretty as it looks really broken. I am not sure exactly what is being pulled from local sensors attached to my computer, and what is to be pulled from weatherxml. No values are showing up except the 75 degrees which seems to be temp in the room with the computer.

    The word local throws me off. Is it local as in the computer, or what the weather source calls local. The local outdoor weather for my region is 60 degrees. The local temperature in my lab is 75 degrees. I have no sensors outside. Just indoors. So I am dependent on the weatherxml for outside temperatures.

    The forecast.jpg shows how I have forecast setup in mcsTemperature. I think I have it setup correctly, but I have doubts about everything. I think it is configured to pull info from weatherxml.

    Then I interpreted the "Store Forecast Data in Devices and Database" as to put values it pulled from weatherxml and put them into a database and virtual devices.

    The Homeseer.gif shows that none of my forecast values are being populated in Homeseer. Also I looked in the mcsTemperature.mdb in Access and its forecast table exists but is empty.

    The weatherxml.gif shows that weatherxml is working. The values displayed here are all correct.

    I think I am misinterpreting something which is making how I set things up wrong.
    Attached Files

    #2
    Here are error messages that I am getting:

    8/6/2007 11:18:29 AM Error Web Server Error 404, cannot serve file: C:\Program Files\HomeSeer 2\html/images/weather/_w.gif

    8/6/2007 11:19:50 AM mcsTemperature GetWeather2 C:\Program Files\HomeSeer 2\mcsTemperature.mdb Forecast, F1Max, SQL=SELECT * FROM Forecast WHERE v_LastUp = #2007-08-06 9:45:00 AM# DB=Provider = Microsoft.Jet.OLEDB.4.0; Data Source= Item cannot be found in the collection corresponding to the requested name or ordinal. on line 2450

    Comment


      #3
      Your pages are sparse because no data has yet been imported from Weather.com (WeatherXML) and that is likely the reason for the log error messages as well.

      I thought I added the path to the WeatherXML file in the setup, but apparently I did not. The location is definded in the Forecast.ini file with the default of \data\weathercom_xml\weathercom.xml relative to the Homeseer folder. If yours is not in this location then you can add it or corrrect it. Different vesion s of the weather.xml scripts use different paths.

      [WeatherXML]
      WeatherXMLFilePath=c:\program files\homeseer 2\data\weathercom_xml\weathercom.xml

      The other item to verify is that the Inteface page has the checkbox to transfer Forecast data from virtual devices to database as some rate.

      Comment


        #4
        What I did.

        I found a file named mcsForecast.ini here:
        C:\Program Files\HomeSeer 2\Config

        It contained the following:
        [Forecast]
        myACCID="KMUX"
        MetricForecast=0
        excludeCredits=0
        showOnlyWebData=1
        DatabaseName="mcsTemperature.mdb"
        ForecastTable="Forecast"
        City="San Francisco"
        Country="USA"
        Region="UnitedStates"
        BigRadarURL="http://image.weather.com/web/radar/u..._plus_usen.jpg"
        RadarURL="http://image.weather.com/web/radar/u...small_usen.jpg"
        LocalTimeOffset="-3"
        LocalTemperatureDevice=""
        LocalRainDevice=""
        LocalWindDevice=""
        LocalBarometerDevice=""
        LocalHumidityDevice=""
        LocalHumidityDevice2=""
        ForecastUpdateInterval="30"
        ForecastRetry="0"
        HumiditySensitivity="16"
        RainSensitivity="16"
        BarometerSensitivity="16"
        UseInet=0
        [WeatherXML]
        CodeArea="USCA0350"
        PartnerID="XXXXXX"
        License="XXXXXXXXXX"
        Units="s"
        lastran=8/2/2007 4:01:58 AM
        [Debug]
        ErrorCode=0
        I then found the weathercom.xml file already existing here:
        C:\Program Files\HomeSeer 2\Data\weathercom_xml

        So I modified the mcsforecast.ini to the following:
        [Forecast]
        WeatherXMLFilePath=C:\Program Files\HomeSeer 2\Data\weathercom_xml\weathercom.xml
        myACCID="KMUX"
        MetricForecast=0
        excludeCredits=0
        showOnlyWebData=1
        DatabaseName="mcsTemperature.mdb"
        ForecastTable="Forecast"
        City="San Francisco"
        Country="USA"
        Region="UnitedStates"
        BigRadarURL="http://image.weather.com/web/radar/us_sfo_closeradar_plus_usen.jpg"
        RadarURL="http://image.weather.com/web/radar/us_sfo_closeradar_small_usen.jpg"
        LocalTimeOffset="-3"
        LocalTemperatureDevice=""
        LocalRainDevice=""
        LocalWindDevice=""
        LocalBarometerDevice=""
        LocalHumidityDevice=""
        LocalHumidityDevice2=""
        ForecastUpdateInterval="30"
        ForecastRetry="0"
        HumiditySensitivity="16"
        RainSensitivity="16"
        BarometerSensitivity="16"
        UseInet=0
        [WeatherXML]
        CodeArea="USCA0350"
        PartnerID="YYYYYYYY"
        License="YYYYYYYYY"
        Units="s"
        lastran=8/2/2007 4:01:58 AM
        [Debug]
        ErrorCode=0
        I then saved the file and restarted. Now just waiting to see what happens.

        Comment


          #5
          I looked at the interface panel, and tried to find the check box you described. I did not find a check box worded exactly as you described, but I found two that come close.

          One says "Transfer Mapped Virtual Devices to Database upon receipt of Temp Sensor 01 from Temp05". The fact it is talking about the Temp05 and says nothing about rates has me puzzled.

          The other one says "Collect Forecast data at Update Interval of X Minutes with Y 1-Minute Interval Retries". It says nothing about virtual devices though. It says interval, but not rate. I assume they mean the same.
          Attached Files

          Comment


            #6
            I rebooted and it is still looking broken. It is 8:30 pm, so I guess I may have to wait for a script or something to run in the background some place.

            While I am waiting for that, I am curious what "Web:" and "Loc:" in the upper left hand corner mean? It is for time, but when would these two values be different?

            I see "Current Conditions", and I think that might be the outdoor temperatures as reported from the weather provider.

            I guess "Local" must be the computer sensor in the lab, but I don't remember configuring it to which sensor to use. This machine could have up to 5 sensors attached at one time. How did it know to grab that one?

            Comment


              #7
              It is 9:19 PM and it is still broken, but wait.

              I just noticed I put the value under the wrong header in the mcsForcast.ini. I cut and pasted under [Forecast] and not [WeatherXML].

              Well, back into the pot it goes. Lets see what happens.

              Comment


                #8
                Web is the data from the Forecast Site. Local is data from the six virtual devices that were identified for Forecast Display and Control. If you have 6 temperature sensors then select any that you want to on this page with the data from Weather.com and your radar site. Both the 16 or so Internet-sourced virtual devices and the 6 Homeseer-sourced virtual device are setup on the same Forecast page/tab.

                I see your earlier posting where the local temperature was setup with blank entries. Based on this I would not expect a Local reading for temperature. It does go look in both virtual devices and the database for the reading. The key in the Forecast.ini file that it is using to assess if it should show anything is LocalTemperatureDevice=??? where ??? is blank to not show or a virtual device to get the value to show.

                If the only reason you are using the WeatherXML script is to download data that will be used in mcsTemperature, then you may find it easier to just have mcsTemperature download it by selecting to download from the site rather than reading from the file. If you are using the script then look to assure the file is present in the location I pointed out earlier.

                I would also suggest setting the Download method to Use Inet rather than Use GetWebFile as this should be more efficient.

                Comment


                  #9
                  I am not sure if I have my settings correct.

                  In "Forecast Location Information", I chose "NWS Site ID (ICAO)" KMUX for San Francisco. I entered "San Francisco" into the City field.

                  Is this right? It is what I got from the link provided on the "Forecast Location Information" page from the "Major Sites" link.

                  I then chose "Use INET" for "Download Method".

                  For "Sensor Virtual Devices for Forecast Display and Controls", I was puzzled. I don't have any sensors for Days Rain, Wind Speed, Barometer, and Humidity Out. So I took the virtual sensor values I found in "Store Forecast Data in Devices and Database".

                  Now I do have actual sensors in the lab that read temperature and humidity. So I put temperature sensor "R13" into "Temperature", and humidity sensor "R12" into "Humidity In".

                  For "WeatherXML", I chose "Do not Use WeatherXML". I then erased all the values in this section.

                  mcsTemperature still does not work.

                  As you can see from the picture, WeatherXML works and its file C:\Program Files\HomeSeer 2\Data\weathercom_xml\weathercom.xml exists.

                  So that means that I have my Location Code, PartnerID, License for Weather.com correct.
                  Attached Files

                  Comment


                    #10
                    I did just notice these new error messages:

                    8/6/2007 11:36:28 PM mcsTemperature TCPClient GetURL0 http://www.weather.gov/forecasts/xml...ebust=02796582 on line 40 Component 'msinet.ocx' or one of its dependencies not correctly registered: a file is missing or invalid

                    8/6/2007 11:36:28 PM mcsTemperature TCPClient GetURL1 http://image.weather.com/web/radar/u...small_usen.jpg on line 40 Component 'msinet.ocx' or one of its dependencies not correctly registered: a file is missing or invalid

                    I have not idea what they mean, but it looks like they are bad.
                    Attached Files

                    Comment


                      #11
                      OK, it is official. Bruce Padmore is not human.

                      It is 5:30 AM, I am going to my car litterly about to cry over mcsTemperature not working. I am bitching about how it is 5 AM and the computer is not working and I have no coat.

                      Walking past without even slowing down he says check to see if I have msinet.ocx installed, and if I don't to get it from activex.microsoft.com. Out of the blue with me giving no details.

                      I go back and I check, and there it is in my error log. This is like the third time he has done this. What are the chances of that happening? Totally freaked me out.

                      He never says a word and never smiles, and yet everyone in the building keeps asking him questions and he always has the right answer. I don't think the guy eats or sleeps. Dresses so well we think he is gay, but he has a girlfriend no one has ever seen. I think it is a cover story for him being an alien. No joke.

                      This is my X-File story for today.

                      Well, anyway back to crappy reality. mcsTemperature is still broken, but that one error message is gone. I think I fixed it right, but not sure.
                      Last edited by SeattleGirl5122; August 7, 2007, 09:41 AM.

                      Comment


                        #12
                        This should not be that difficult. I used your San Francisco code here and the download was clean and the Weather Page shows a lot of rain for the week.

                        The interface page has a setting at the bottom for Special Debug Log. When that box is checked mcsTemperature will make an image of the file that it downloads and put it at Homeseer 2\Data\mcsTemperatureGetWeatherOut.txt. For SF that I just ran the file was 208 KB with XML encoding if you were to open it up.

                        The Forecast page has a Get Forecast Now button. This will cause an immediate download of the data from the internet. Set the Special Debug checkbox and then click the Get Forecast Now button and observe the mcsTemperatureGetWeatherOut.txt file.

                        The other thing you can do is attach you mcsTemperature.ini and mcsForecast.ini and I can run with them here to compare results.

                        Another thing I noticed is that the mcsTemperature menu pulldown will not cause a browser page to be produced. It acts as if nothing was done. If I use the mcsTemperature button on the HS Device Status page then it will bring up the browser. I do not know if this is a Vista issue or a Homeseer 2 issue. I'm guessing it is Vista siince I do not recall it in the past when I had it running under XP. Since then however, both the OS and Homeseer have been updated.

                        Comment


                          #13
                          Well a little more progress.

                          I set "Special Debug Log" on "Debug Settings".

                          I then hit "Get Forecast Now" Button on "Forecast Location Information"

                          Here is where things get strange. You got a 208 KB file with XML encoding. I got 2,213 KB file with XML encoding. My file is from the Weather Channel and for Emeryville and Berkely. I was not expecting that. From my screen captures above you would think it would be from NWS and for San Francisco. I had blanked out all the WeatherXML stuff.

                          I am thinking now that I should delete and recreate all my mcsTemperature ini files. I think something broke when upgraded.

                          Should I do that, or is that a bigger mess?

                          I will go post mcsTemperature.ini and mcsForecast.ini in my next post.

                          Comment


                            #14
                            Let us move forward with your current .ini files. There should be no need to start over. We just need to understand why the current configuration has a problem.

                            Comment


                              #15
                              Here are my mcsTemperature.ini and my mcsForecast.ini.

                              I think something in them is messed up. I hoped I zipped them right cause I am half asleep.
                              Attached Files

                              Comment

                              Working...
                              X