Plug In for Government Weather Feeds

At the bottom of the Recipe tab, after the editing window

=== Ident: BOM Weather version 20102.0415 by Black Cat;
=== BEGIN SITESENSOR RECIPE ===
ewogICAgIm5hbWUiOiAiQk9NIFdlYXRoZXIiLAogICAgImF1dGhvciI6ICJCbGFjayBDYXQiLAog
ICAgImRlc2NyaXB0aW9uIjogIiIsCiAgICAiY29uZmlnIjogewogICAgICAgICJSZXF1ZXN0VVJM
IjogImh0dHA6Ly9yZWcuYm9tLmdvdi5hdS9md28vSURWNjA5MDEvSURWNjA5MDEuOTQ4NzAuanNv
biIsCiAgICAgICAgIkludGVydmFsIjogIjYwMCIsCiAgICAgICAgIlRpbWVvdXQiOiAiMzAiLAog
ICAgICAgICJRdWVyeUFybWVkIjogIjAiLAogICAgICAgICJSZXNwb25zZVR5cGUiOiAianNvbiIs
CiAgICAgICAgIlRyaWdnZXIiOiAiZXJyIiwKICAgICAgICAiTnVtRXhwIjogIjE2IiwKICAgICAg
ICAiRmFpbE1hc3Rlck9uRXhwcmVzc2lvbkVycm9yIjogIjEiLAogICAgICAgICJGYWlsQ2hpbGRP
bkV4cHJlc3Npb25FcnJvciI6ICIxIiwKICAgICAgICAiQmxhbmtDaGlsZE9uRXhwcmVzc2lvbkVy
cm9yIjogIjAiLAogICAgICAgICJNYXhSZXNwb25zZVNpemUiOiAiMTUwMDAwIiwKICAgICAgICAi
RXhwcjEiOiAicmVzcG9uc2Uub2JzZXJ2YXRpb25zLmhlYWRlclsxXS5yZWZyZXNoX21lc3NhZ2Ui
LAogICAgICAgICJDaGlsZDEiOiAidXJuOnNjaGVtYXMtbWljYXNhdmVyZGUtY29tOmRldmljZTpH
ZW5lcmljU2Vuc29yOjEiLAogICAgICAgICJFeHByMiI6ICJyZXNwb25zZS5vYnNlcnZhdGlvbnMu
ZGF0YVsxXS5haXJfdGVtcCIsCiAgICAgICAgIkNoaWxkMiI6ICJ1cm46c2NoZW1hcy1taWNhc2F2
ZXJkZS1jb206ZGV2aWNlOlRlbXBl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icmVzcG9u
c2Uub2JzZXJ2YXRpb25zLmRhdGFbMV0ucHJlc3NfbXNsIiwKICAgICAgICAiQ2hpbGQxNSI6ICJ1
cm46c2NoZW1hcy1taWNhc2F2ZXJkZS1jb206ZGV2aWNlOkdlbmVyaWNTZW5zb3I6MSIKICAgIH0s
CiAgICAic291cmNlIjogIjIwMDk1IiwKICAgICJ2ZXJzaW9uIjogIjIwMTAyLjA0MTUiCn0=
=== END SITESENSOR RECIPE ===

Hope it makes sense to someone, itā€™s all braille to me.

I should point out that using the above would be totally useless unless you live in the SE Suburbs of Melbourne, Australia.
Not sure why you asked for the recipe Patrick as the feed needs to be altered to make it useful for other areas and I donā€™t see how you can alter the block?
FWIW. Iā€™m not a coder and nothing ever makes sense.

All good questions! To this, the URL is generally the easiest part for people when setting up a SiteSensor. Most people can very quickly find and input the correct URL, but then find the task of looking at the return data and figuring out how to write the expressions a much bigger problem to solve. So the recipes are really more about relieving that aspect of the work. Itā€™s expected, I think, that people will need to customize the URL, as it often involves localizing parameters as you suggest, as well as authorization keys and the like in many cases. Thatā€™s why I ask in the recipe instructions that you put ā€œplaceholdersā€ in for those things ā€” so others can easily see where and what they need to modify to complete the recipe for their own use.

Once you load a recipe block, it becomes the configuration of your SiteSensor, and that, then, is what someone loading your recipe would modify. The recipe itself doesnā€™t change once you publish it (unless you publish a newer version).

Many regions have their own local weather services, and other services. Youā€™ve done your neighbors a solid. Thanks for publishing that.

Logistical question:
How does one prevent the sharing of oneā€™s personal API key whilst publishing those base-64 recipe blocks?

So, Iā€™ll reply with a legitimate question, at the risk of coming off a bit salty, but itā€™s really not that; Iā€™d like to know what, if anything, I can improve in the subject area to make it more clear, because if itā€™s not working, I need to fix itā€¦ the question: Did you read the instructions on the recipe page?

Ah, neat. You were correct to assume I had never read (nor even seen) the ā€œRecipeā€ page before, and now everything is clear. I see:

ā€œEdit the configuration below to remove any authorization keys or other sensitive data. Do not remove any key/value pairs, but you can leave the value blank (no data between quotes) if you must.ā€

As usual, youā€™ve very ably anticipated a potential logistical snag. Thanks!

OK. If itā€™s not clear enough, I definitely want to fix it, but the effort was made at least. A few days ago, based on other things people were doing, I modified the page anyway to look like this (below), which hopefully leans toward being even more clear. Sometimes (often) things make perfect sense to me, but nobody else, so I need the feedback.

Actually, I think both versions make sense**, and youā€™ve no reason to doubt your documentationā€™s clarity or succinctness (itā€™s stellar, all of it). My fault for not peering behind the green curtain despite obviously being aware of the Recipes mechanism and yet never delving therein.

Iā€™ve also taken the liberty of updating my ā€œSiteSensor vs Reactorā€ infographic back over here to reflect the difference in ā€œRecipe Sharingā€ between those two plug-ins.

**P.S. In the revised text, you even anticipated my final concern, that being, "Will any edits I make on the ā€˜Recipesā€™ page cause my workflow to be changed, too? Answer: NO!

Well that solution was short livedā€¦:slight_smile:

14:23:39: SiteSensor: Requesting JSON data
14:23:39: SiteSensor: ā€œGETā€ ā€œhttp://reg.bom.gov.au/fwo/IDV60901/IDV60901.94870.jsonā€, headers={ }
14:23:39: SiteSensor: WARNING: Response was truncated to limit of 150000 bytes; 172758 total bytes received in ā€œ/tmp/Q_SiteSensor_625.txtā€
14:23:39: SiteSensor: WARNING: the response from this site is quite large! (150000 bytes)
14:23:41: SiteSensor: Unable to decode JSON response, ā€œunterminated string at line 6341, column 5ā€ (dev 625)

I had to increase to 300000 bytes to get a response, I guess itā€™s wait and see what happens over the next 24hrs.

Thanks Guys. Moorabbin Airport BOM weather details coming through in SiteSensor for me nicely!

I was just starting to look at how I could could get BOM details in SiteSensor and youā€™d already done it.

Nice one!

I guess the next question is how can we get Radar data into this.
HASS provides it, not sure how it could be rendered here, it would be a nice touchā€¦! :slight_smile:

Yes, or more rainfall data to drive Opensprinklerā€¦