Originally posted by Black Cat
View Post
Announcement
Collapse
No announcement yet.
Australian users have no good options for a weather plugin
Collapse
X
-
Originally posted by chimera View PostWell I’m glad to see I’m not the only one. You’ve really been using a Vera?
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
-
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.
Comment
-
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.
Comment
-
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?
<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
-
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>
Comment
-
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
-
Originally posted by Gadgetman! View PostThe MyWeather plug-in gets the data from Yr.no and they have millions of locations all over the world.
Comment
-
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 PostYes, 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>
Comment
-
Originally posted by chimera View PostThanks 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:
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.
Comment
Comment