Announcement

Collapse
No announcement yet.

Jon00 BBC Weather V3

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Jon00 BBC Weather V3

    Version 3 of this script is no longer available - Please checkout version 4: http://board.homeseer.com/showthread.php?t=151283
    Attached Files
    Last edited by jon00; November 18, 2011, 10:10 AM.
    Jon


    #2
    Update virtual weather device not always working

    Hi Jon00!

    I have now v3 up and running, but i have difficulties with getting some virtual weather devices updated after running the Jon00BBCWeather.vben script (automated 60 min between each run).
    I did noticed it is often the same devices having problems getting updated observations when checking HS2 Statuspage. The problemdevices are:
    1.Temperature
    2.Pressure
    3.Visibility
    4.5 day outlook

    My other activated devices Humidity, Observed time, Wind direction and Windspeed no problems at all getting updated every time the script is running. What do you think about this? Any suggestions on how to get more reliable updating of all my devices? Could there be something fishy going on with the script?

    Regards
    majstang
    Last edited by majstang; January 15, 2010, 09:03 PM.

    Comment


      #3
      Sorry, I missed this. The first thing to do is to go to the BBC weather site and check that it is showing the data for your area. As I have no idea where you are (where is uuu?) I can only say that outside the UK, the data is reduced.
      Jon

      Comment


        #4
        Originally posted by jon00 View Post
        Sorry, I missed this. The first thing to do is to go to the BBC weather site and check that it is showing the data for your area. As I have no idea where you are (where is uuu?) I can only say that outside the UK, the data is reduced.
        Yes, data on the BBC site is correct for my area (Stockholm). All devices i have activated in the .ini have correct correspondig data on the BBC site. But right now i have two virtual devices that was not updated when script did the latest run at 23:24:23 o clock. Temperature last updated 14:08:46 and Wind Direction last updated 11:03:57.

        Do you think the fact i didnt change the cookies on the BBC site since i first installed the weatherscript version 2 might have something to do with it? The cookies are still set according to the old BBC site appearance before them rebuilding thier site. I didnt bother cuz it seemed to work regardless with v.3.

        Comment


          #5
          Did remove all cookies and did the settings at the BBC site all over again, thinking it could have something to do with some of my virtual devices not getting updated when the BBC weatherscript is running, but no. That was not it. I still having issues with particular Temperture not getting updated data from the BBC site. Sadly this is the most important reading im after and it is not working each and every time. Im stumped here..what should i do?
          Did some reading on the BBC and saw international observations were done once every three hours and i changed the scripts recurrant cycle to 180 minutes. The partly failed data updating does occur both when script runs according to the set schedule and when i manually execute it.

          Comment


            #6
            The new version does not use cookies (thankfully!). Please let me know the location code you are using and I will try it here.
            Jon

            Comment


              #7
              2944

              Comment


                #8
                I've just tried it here with your location code and the virtual devices correctly display the data as per the BBC weather site. I'm really not sure what your issue could be?
                Jon

                Comment


                  #9
                  Originally posted by jon00 View Post
                  I've just tried it here with your location code and the virtual devices correctly display the data as per the BBC weather site. I'm really not sure what your issue could be?
                  Hmm..ok! Beginning to think there is no actual issue with data not being updated correct. Could it be when your script scrapes some data from the BBC site, lets say temperature, if the temp reading from 2944 hasnt changed from one script execution to the next (3 hour automated recurrant executioncycle) Homeseers "Last Change" column in "Status" page does not change to the actual time the script were last executed but it displays the time when the actual temp data change occured? Only in case of some actual data changes Homeseer (your script) updates the time (Last Change) on the temp virtual device. Meaning if we have lets say -2 degrees Celsius 7 days in a row the Last Change time would not change for the equal amount of days. This is what makes it confusing, fooling me thinking...what the heck i have a data observation that is at least 3 hours old or even 7 days, despite me having executed the script several times after the actual Last Change time.

                  If this is the case my temp data should therefor be valid. If so, wouldnt it be better updating the time on the virtual devices with the time the script was executed instead of time for last data change, only for the sake of eliminating the potential confusion it might cause?

                  Uh...i hope this is understandable...it got somewhat messy there
                  Last edited by majstang; January 19, 2010, 06:32 PM.

                  Comment


                    #10
                    I have just spotted a potential bug in that the device last change is set each time the script is run for every active virtual device. This is obviously wrong and should be set only when the data changes to another value.

                    I'll try and update this in a day or two.
                    Jon

                    Comment


                      #11
                      But Jon, is it really intresting to know when the actual datachange occured? I mean it makes no difference for me to know that lets say the temp changed to -2 degrees celsius 10 o clock this morning and have stayed there for x hours. Ok, now when i know that -2 is accurate even for the current moment when checking my temp reading in the evening, it is less confusing. I still dont know when the script did the last check though and think this would be better to know. Wouldnt it be more intresting to know when the script checked the data instead? Then we know both the accurate data and when the reading was made.
                      Last edited by majstang; January 19, 2010, 07:47 PM.

                      Comment


                        #12
                        Jon,

                        Thanks for another great script. There is one small issue when announcing the day an month.
                        Weather location code 336.
                        09/02/2010 18:46:54 Event Running script in background: Jon00BBCWeatherSpeak.vb("Main","I+C+E")
                        09/02/2010 18:46:55 TTS Speak ():This is the weather for Beverley, last updated at 17:00, Tuesdaysday 9th Februaryruary
                        09/02/2010 18:47:02 TTS Speak ():The temperature is now 3 degrees, with the humidity at 65 percent.
                        09/02/2010 18:47:06 TTS Speak ():Wind speed is currently 15 miles per hour, from the north.
                        09/02/2010 18:47:11 TTS Speak ():The pressure is 1011 milli bars, rising.
                        09/02/2010 18:47:14 TTS Speak ():Visibility is reported to be excellent.
                        09/02/2010 18:47:17 TTS Speak ():That is the end of the forecast
                        Thanks

                        Comment


                          #13
                          Hi Brian,

                          Yes, I noticed that too. They obviously changed the day short name to a long name.

                          In the Jon00BBCWeatherspeak.vb script find:

                          Function DayNames(ByVal DN As String)
                          Try
                          DN=replace (DN,"Mon","Monday",1,-1,1)

                          Change it to:

                          Function DayNames(ByVal DN As String)
                          Try
                          Return DN
                          DN=replace (DN,"Mon","Monday",1,-1,1)
                          Jon

                          Comment


                            #14
                            Working fine now

                            Thanks.

                            Comment


                              #15
                              Jon,

                              Do you know if the BBC responses to the current conditions are standardised? I was thinking of borrowing some sounds from Atmosphere Lite and playing them if the weather changes, that would obviously be dependent on if the strings remained relatively the same.

                              I'm not sure if you will know and I suppose it can be changed by the BBC at any time, what I was thinking was a script that examined the device string and played a sound dependent on that weather change...

                              'Sun' (which they might use sun or sunny)
                              'Rain' (raining/rain/rainy)
                              'Thunder' (thunder clouds/thunder storms/thundery)

                              Currently its showing Partly Cloudy (what changes).

                              etc, any ideas? The script I can do but don't know if i'm going to be wasting my time if they change the text constantly.

                              Comment

                              Working...
                              X