Announcement

Collapse
No announcement yet.

Australian users have no good options for a weather plugin

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

    #16
    Originally posted by Black Cat View Post
    FWIW, I've been using the BOM xml with Vera. Interested in the script examples but you could also use the Vera Plug In to pull the data (assuming you have a Vera).
    It's very accurate especially if you use a xml from a local airport.
    Well I’m glad to see I’m not the only one. You’ve really been using a Vera?

    Comment


      #17
      Originally posted by sparkman View Post
      Here's a script I use to pull some XML data from a government of Canada weather website:
      Much appreciated Sparkman!

      Comment


        #18
        Originally posted by jon00 View Post

        If you want an off-the-shelf solution, you can use my Datascraper package to parse and create
        Wow! That script looks useful. Thanks for your time John. I’ll put it together and let you know how it goes.

        Comment


          #19
          Originally posted by chimera View Post
          Well I’m glad to see I’m not the only one. You’ve really been using a Vera?
          Not only Vera, you can add HASS to that list.
          In fact HASS has nearly every integration you could ask for. If there was only a HASS PI for HS and I'd be able to pull in the radar data as well.
          I like to have a bet either way or in this case tri-way.

          Comment


            #20
            Originally posted by Black Cat View Post

            Not only Vera, you can add HASS to that list.
            In fact HASS has nearly every integration you could ask for. If there was only a HASS PI for HS and I'd be able to pull in the radar data as well.
            I like to have a bet either way or in this case tri-way.
            Ok I'm a HomeSeer only guy. If I was going to stray I'd check out OpenHAB but that's only because I'm a java programer. But then the thought of going to a project with unpaid programmers does not have a strong apeal to me. I'm glad some of the gurus were able to help out with my weather so for me I'm now happy but for the average Joe setting up a new HomeSeer box it feels a little lacking.

            Comment


              #21
              Originally posted by jon00 View Post

              If you want an off-the-shelf solution, you can use my Datascraper package to parse and create the devices.



              I've just provided the basic settings for 2 days but you can expand this/change the text/icons as you like.




              Hey Awesome script Jon00. Keep up the great work. Thanks for helping...

              Comment


                #22
                Hi Jon00, Thanks again for the script. Can I bring your attention to something please. The script seems to be accurate at parsing the XML field except where an element is optional and sometimes does not appear. So for example the precipitation_range only appears when there is a chance of rain. Is there anyway I can assist with this? Would you be interested in sharing the source?Click image for larger version

Name:	image.png
Views:	142
Size:	436.7 KB
ID:	1409955

                <area aac="QLD_PT136" description="Nambour" type="location" parent-aac="QLD_PW015">
                <forecast-period index="0" start-time-local="2020-08-10T05:00:00+10:00" end-time-local="2020-08-11T00:00:00+10:00" start-time-utc="2020-08-09T19:00:00Z" end-time-utc="2020-08-10T14:00:00Z">
                <element type="forecast_icon_code">3</element>
                <element type="air_temperature_maximum" units="Celsius">19</element>
                <text type="precis">Partly cloudy.</text>
                <text type="probability_of_precipitation">0%</text>
                </forecast-period>
                <forecast-period index="1" start-time-local="2020-08-11T00:00:00+10:00" end-time-local="2020-08-12T00:00:00+10:00" start-time-utc="2020-08-10T14:00:00Z" end-time-utc="2020-08-11T14:00:00Z">
                <element type="forecast_icon_code">3</element>
                <element type="air_temperature_minimum" units="Celsius">10</element>
                <element type="air_temperature_maximum" units="Celsius">22</element>
                <text type="precis">Mostly sunny.</text>
                <text type="probability_of_precipitation">0%</text>
                </forecast-period>
                <forecast-period index="2" start-time-local="2020-08-12T00:00:00+10:00" end-time-local="2020-08-13T00:00:00+10:00" start-time-utc="2020-08-11T14:00:00Z" end-time-utc="2020-08-12T14:00:00Z">
                <element type="forecast_icon_code">3</element>
                <element type="precipitation_range">0 to 1 mm</element>
                <element type="air_temperature_minimum" units="Celsius">12</element>
                <element type="air_temperature_maximum" units="Celsius">23</element>
                <text type="precis">Partly cloudy.</text>
                <text type="probability_of_precipitation">30%</text>
                </forecast-period>
                <forecast-period index="3" start-time-local="2020-08-13T00:00:00+10:00" end-time-local="2020-08-14T00:00:00+10:00" start-time-utc="2020-08-12T14:00:00Z" end-time-utc="2020-08-13T14:00:00Z">
                <element type="forecast_icon_code">1</element>
                <element type="air_temperature_minimum" units="Celsius">13</element>
                <element type="air_temperature_maximum" units="Celsius">27</element>
                <text type="precis">Sunny.</text>
                <text type="probability_of_precipitation">0%</text>
                </forecast-period>
                <forecast-period index="4" start-time-local="2020-08-14T00:00:00+10:00" end-time-local="2020-08-15T00:00:00+10:00" start-time-utc="2020-08-13T14:00:00Z" end-time-utc="2020-08-14T14:00:00Z">
                <element type="forecast_icon_code">1</element>
                <element type="air_temperature_minimum" units="Celsius">14</element>
                <element type="air_temperature_maximum" units="Celsius">27</element>
                <text type="precis">Sunny.</text>
                <text type="probability_of_precipitation">10%</text>
                </forecast-period>
                <forecast-period index="5" start-time-local="2020-08-15T00:00:00+10:00" end-time-local="2020-08-16T00:00:00+10:00" start-time-utc="2020-08-14T14:00:00Z" end-time-utc="2020-08-15T14:00:00Z">
                <element type="forecast_icon_code">11</element>
                <element type="precipitation_range">5 to 15 mm</element>
                <element type="air_temperature_minimum" units="Celsius">15</element>
                <element type="air_temperature_maximum" units="Celsius">25</element>
                <text type="precis">Shower or two.</text>
                <text type="probability_of_precipitation">60%</text>
                </forecast-period>
                <forecast-period index="6" start-time-local="2020-08-16T00:00:00+10:00" end-time-local="2020-08-17T00:00:00+10:00" start-time-utc="2020-08-15T14:00:00Z" end-time-utc="2020-08-16T14:00:00Z">
                <element type="forecast_icon_code">3</element>
                <element type="precipitation_range">0 to 2 mm</element>
                <element type="air_temperature_minimum" units="Celsius">12</element>
                <element type="air_temperature_maximum" units="Celsius">23</element>
                <text type="precis">Partly cloudy.</text>
                <text type="probability_of_precipitation">30%</text>
                </forecast-period>
                </area>

                Comment


                  #23
                  Yes, I see the issue. To stop this happening, I've modified the script to be able to extract part of any downloaded web page/file through regular expressions This is done via Pattern0

                  If you download V1.0.23, you will need to modify your config. Example below:

                  Code:
                  Pattern0=(?s)Nambour.*?index="1"(.*?)</forecast-period>
                  Pattern1=(?s)end-time-local="(.*?)"
                  Pattern2=(?s)<element type="air_temperature_minimum" units="Celsius">(.*?)</element>
                  Pattern3=(?s)<element type="air_temperature_maximum" units="Celsius">(.*?)</element>
                  Pattern4=(?s)<element type="precipitation_range">(.*?)</element>
                  Pattern5=(?s)<text type="probability_of_precipitation">(.*?)%</text>
                  Pattern6=(?s)<text type="precis">(.*?)</text>
                  Pattern0 extracts only the elements for index 1 which are further extracted by Pattern1 upwards.
                  Jon

                  Comment


                    #24
                    Node-RED has been solid for me pulling JSON from the OpenWeatherMap API. It's been pulling and writing data to devices every 15 minutes with Cron+ node controlling the schedule for ~3 months without any issues. Pretty darned accurate source for my location too. Little bit of JS to convert the timestamps and parse the data, and the rest of it is just sending posts. I know you're all set now, just throwing it out there for reference.

                    Comment


                      #25
                      The MyWeather plug-in gets the data from Yr.no and they have millions of locations all over the world.

                      Comment


                        #26
                        Originally posted by Gadgetman! View Post
                        The MyWeather plug-in gets the data from Yr.no and they have millions of locations all over the world.
                        The data for my locality seems to be very inconsistent with our highest valued weather source the BOM. I'm very keen to investigate options however. Thanks for your input.
                        Attached Files

                        Comment


                          #27
                          Thanks Jono,
                          So far so good. Thanks for the quick fix! As an FYI but doesn't seem to cause any problems the following gets logged after the script finishes:
                          Aug-15 5:09:49 PM Jon00_DScraper Error - Cannot access path:

                          Originally posted by jon00 View Post
                          Yes, I see the issue. To stop this happening, I've modified the script to be able to extract part of any downloaded web page/file through regular expressions This is done via Pattern0

                          If you download V1.0.23, you will need to modify your config. Example below:

                          Code:
                          Pattern0=(?s)Nambour.*?index="1"(.*?)</forecast-period>
                          Pattern1=(?s)end-time-local="(.*?)"
                          Pattern2=(?s)<element type="air_temperature_minimum" units="Celsius">(.*?)</element>
                          Pattern3=(?s)<element type="air_temperature_maximum" units="Celsius">(.*?)</element>
                          Pattern4=(?s)<element type="precipitation_range">(.*?)</element>
                          Pattern5=(?s)<text type="probability_of_precipitation">(.*?)%</text>
                          Pattern6=(?s)<text type="precis">(.*?)</text>
                          Pattern0 extracts only the elements for index 1 which are further extracted by Pattern1 upwards.

                          Comment


                            #28
                            Originally posted by chimera View Post
                            Thanks Jono,
                            So far so good. Thanks for the quick fix! As an FYI but doesn't seem to cause any problems the following gets logged after the script finishes:
                            Aug-15 5:09:49 PM Jon00_DScraper Error - Cannot access path:

                            Sorry, for [Grab2] onward, you need to change

                            Path=[hspath]\Data\Jon00\datascraper\grab1.txt

                            To


                            Path=[hspath]\Data\Jon00\datascraper\grab1A.txt

                            Then Pattern0 does not need to be used from Grab2 onward.
                            Jon

                            Comment


                              #29
                              Thanks Jono. I still have the same error. Config attached.
                              Attached Files

                              Comment


                                #30
                                You need to put Grab1A.txt back to Grab1.txt. Talking c**p today!

                                After doing so with your config file, I don't see an error and all devices correctly update?
                                Jon

                                Comment

                                Working...
                                X