Gratis domotica › Forums › How can I …? › Synology NAS › Blockly "Did it Rain today"
Tags: blocky rain water
Dit onderwerp bevat 9 reacties, heeft 2 stemmen, en is het laatst gewijzigd door djandib 3 jaren, 2 maanden geleden.
-
AuteurBerichten
-
juni 14, 2016 om 3:13 pm #3480
Hi there,
my new projekt is a Zwave Watering system for my garden.
Actually I still wait for the hardware: Electric Valve (no power-> close), Universal power supply and Fibaro FIB_FGWPF-102 for controling. (I`ll make a seperate note, if it works 🙂Now I want to make a blocky to do no watering in the evening, if it already rained this day.
Therefore first I thought to take the humidity and to say:
IF humidity from yahoo weather is > 99, save the date to a persistent variable.
But that`s not the truth…So I want to make it with the weather codes.
Question:
How can I get the code from the yahoo weather api to use it in Blockly?
I mean the code e.g. “12” and not the long text…Simply “COMPARATOR Munich weather.type = “12” ???
juni 14, 2016 om 4:47 pm #3481Hi,
I’ve just added this parameter to Yahoo Weather.
Just cleaning up the code a bit now.I’ve never launched an update of a package myself before, so I will test it first with the beta testers.
Are you already a beta tester?Here all the parameters we could get from yahoo:
{ "query": { "count": 1, "created": "2016-06-14T14:32:09Z", "lang": "nl", "results": { "channel": { "units": { "distance": "km", "pressure": "mb", "speed": "km/h", "temperature": "C" }, "title": "Yahoo! Weather - Antwerp, Antwerp, BE", "link": "http://us.rd.yahoo.com/dailynews/rss/weather/Country__Country/*https://weather.yahoo.com/country/state/city-972240/", "description": "Yahoo! Weather for Antwerp, Antwerp, BE", "language": "en-us", "lastBuildDate": "Tue, 14 Jun 2016 04:32 PM CEST", "ttl": "60", "location": { "city": "Antwerp", "country": "Belgium", "region": " Antwerp" }, "wind": { "chill": "63", "direction": "240", "speed": "40.23" }, "atmosphere": { "humidity": "67", "pressure": "33796.17", "rising": "0", "visibility": "25.91" }, "astronomy": { "sunrise": "5:26 am", "sunset": "9:59 pm" }, "image": { "title": "Yahoo! Weather", "width": "142", "height": "18", "link": "http://weather.yahoo.com", "url": "http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif" }, "item": { "title": "Conditions for Antwerp, BE at 03:00 PM CEST", "lat": "51.096989", "long": "4.6078", "link": "http://us.rd.yahoo.com/dailynews/rss/weather/Country__Country/*https://weather.yahoo.com/country/state/city-972240/", "pubDate": "Tue, 14 Jun 2016 03:00 PM CEST", "condition": { "code": "23", "date": "Tue, 14 Jun 2016 03:00 PM CEST", "temp": "17", "text": "Breezy" }, "forecast": [{ "code": "12", "date": "14 Jun 2016", "day": "Tue", "high": "17", "low": "12", "text": "Rain" }, { "code": "11", "date": "15 Jun 2016", "day": "Wed", "high": "16", "low": "11", "text": "Showers" }, { "code": "39", "date": "16 Jun 2016", "day": "Thu", "high": "18", "low": "11", "text": "Scattered Showers" }, { "code": "12", "date": "17 Jun 2016", "day": "Fri", "high": "17", "low": "12", "text": "Rain" }, { "code": "28", "date": "18 Jun 2016", "day": "Sat", "high": "16", "low": "11", "text": "Mostly Cloudy" }, { "code": "28", "date": "19 Jun 2016", "day": "Sun", "high": "18", "low": "10", "text": "Mostly Cloudy" }, { "code": "30", "date": "20 Jun 2016", "day": "Mon", "high": "20", "low": "11", "text": "Partly Cloudy" }, { "code": "30", "date": "21 Jun 2016", "day": "Tue", "high": "21", "low": "13", "text": "Partly Cloudy" }, { "code": "30", "date": "22 Jun 2016", "day": "Wed", "high": "21", "low": "15", "text": "Partly Cloudy" }, { "code": "30", "date": "23 Jun 2016", "day": "Thu", "high": "22", "low": "15", "text": "Partly Cloudy" }], "description": "<![CDATA[<img src=\"http://l.yimg.com/a/i/us/we/52/23.gif\"/>\n<BR />\n<b>Current Conditions:</b>\n<BR />Breezy\n<BR />\n<BR />\n<b>Forecast:</b>\n<BR /> Tue - Rain. High: 17Low: 12\n<BR /> Wed - Showers. High: 16Low: 11\n<BR /> Thu - Scattered Showers. High: 18Low: 11\n<BR /> Fri - Rain. High: 17Low: 12\n<BR /> Sat - Mostly Cloudy. High: 16Low: 11\n<BR />\n<BR />\n<a href=\"http://us.rd.yahoo.com/dailynews/rss/weather/Country__Country/*https://weather.yahoo.com/country/state/city-972240/\">Full Forecast at Yahoo! Weather</a>\n<BR />\n<BR />\n(provided by <a href=\"http://www.weather.com\" >The Weather Channel</a>)\n<BR />\n]]>", "guid": { "isPermaLink": "false" } } } } } }
-
Deze reactie is gewijzigd 3 jaren, 5 maanden geleden door
Miss Laura.
Have fun,
Laurajuni 15, 2016 om 11:30 am #3483Hi Laura,
no, I`m not already a betatester.
As you see in your example I need the “condition”: “code”: “23” to interpret it.I woud programm a variable like:
IF code=11 OR code=12 OR code=39
THEN Variable “RainToday”=Current Datejuni 15, 2016 om 11:46 am #3485I think my code is now done. 🙂
I will update the package for the beta testers and if they don’t find any issue, I will release it in the next few days.Note: I immediately added forecasts for the coming 9 days! 🙂
It’s a HUGE upgrade of the yahoo weather package.Have fun,
Laurajuni 15, 2016 om 1:46 pm #3486Ok, so I wait excited for the next update….
🙂 🙂 🙂juni 15, 2016 om 3:56 pm #3487I just pushed the update to Cedarview devices (mine) on the beta add-on store.
If I get the update in a few hours, I know it works and then I can start sharing it quickly with others. 🙂Have fun,
Laurajuni 22, 2016 om 10:05 am #3564Small update:
every time I install the update in beta, yahoo weather gets uninstalled.So Mika does something I do not know how to do :-p
I’m checking with him and will keep you posted.Fyi: just added following product to the store 🙂
Have fun,
Laurajuli 25, 2016 om 1:11 pm #3628Hi Laura,
anything new about your Yahoo weather package update?
Andijuli 31, 2016 om 1:08 pm #3649Hi Andi,
It’s ready, but apparently I need to build a separate package for every cpu and device type.
So about 36 different packages.I am now working on automating this, so that it takes less time.
You can contact us inside the live chat and then I will give you already the files for the latest package and instructions. 🙂
Have fun,
Lauraseptember 8, 2016 om 11:37 am #3706My Problem:
I want that my garden-sprinkler controls “itself” if it has to sprinkle or notMy solution:
Finally if the device “Sonne” = true, there will be water in the evening 😉
Thanx to Koen and Laura for help
Andi
-
Deze reactie is gewijzigd 3 jaren, 5 maanden geleden door
-
AuteurBerichten
Je moet ingelogd zijn om een reactie op dit onderwerp te kunnen geven.