Domotica gratuit › Forums › How can I …? › Synology NAS › Blockly "Did it Rain today"
Mots-clés : blocky rain water
- Ce sujet contient 9 réponses, 2 participants et a été mis à jour pour la dernière fois par
djandib, le il y a 4 années et 5 mois.
-
AuteurMessages
-
juin 14, 2016 à 3:13 #3480
djandib
ParticipantHi 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” ???
juin 14, 2016 à 4:47 #3481Miss Laura
ModérateurHi,
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" } } } } } }
-
Cette réponse a été modifiée le il y a 4 années et 8 mois par
Miss Laura.
Have fun,
Laurajuin 15, 2016 à 11:30 #3483djandib
ParticipantHi 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 Datejuin 15, 2016 à 11:46 #3485Miss Laura
ModérateurI 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,
Laurajuin 15, 2016 à 1:46 #3486djandib
ParticipantOk, so I wait excited for the next update….
🙂 🙂 🙂juin 15, 2016 à 3:56 #3487Miss Laura
ModérateurI 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,
Laurajuin 22, 2016 à 10:05 #3564Miss Laura
ModérateurSmall 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,
Laurajuillet 25, 2016 à 1:11 #3628djandib
ParticipantHi Laura,
anything new about your Yahoo weather package update?
Andijuillet 31, 2016 à 1:08 #3649Miss Laura
ModérateurHi 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,
Lauraseptembre 8, 2016 à 11:37 #3706djandib
ParticipantMy 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
-
Cette réponse a été modifiée le il y a 4 années et 8 mois par
-
AuteurMessages
- Vous devez être connecté pour répondre à ce sujet.