Yahoo Wetter bekommt keine Daten mehr!

Begonnen von Toto1973, 14 Januar 2016, 10:26:49

Vorheriges Thema - Nächstes Thema

CoolTux

So jetzt auch mit Deutschen Einheiten


my $url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20=%27" .$location. "%27and%20u%20%3D%20%27c%27&format=xml&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys";


$location ist die ID Deiner Stadt und wird durch Deine einstellung in der Def gesetzt
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

awel

Datei 59_Weather.pm, Zeile 288:
my $url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20=%27". $location ."%27%20and%20u=%27". $units. "%27&format=xml&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys";

Datei 59_Twilight.pm, Zeile 362:
url        => "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20=%27". $location ."%27%20and%20u=%27c%27&format=xml&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys",

Durch den Zusatz "... and u='c'" in der SQL-Abfrage gibt's die Temperaturen auch in Celsius.

LG Achim     

awel


CoolTux

Dein Code gefällt mir aber besser. Lach. Ich hatte zu viele Ersetzungszeichen fand ich.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Baumi

Danke euch! Hab das Problem gerade auch entdeckt, und prompt gab's hier schon die Lösung!

Ma_Bo

NUC mit FHEM, HM Heizungsthermostate, HM Wandthermostate, Intertechno Funksteckdosen, 10" Tablet als Wanddisplay, KeyMatic, Fensterkontakte, Fensterkontakte umgebaut als Wassermelder und Briefkastenmelder, Aussenthermostat, Anwesenheitssteuerung über Fritz Box, Google Home usw. usw.

awel

Zitat
jetzt läuft es wieder
... aber wahrscheinlich nicht sehr lange.

Die obige Lösung greift noch immer auf http://.../public/... zu - und das soll nach Yahoo nicht mehr sein.
Und das künftig geforderte Token für OAuth gibt's natürlich auch nicht.

Ich suche eine Alternative für Twilight_Weather - reichlich Firlefanz, um eine echte Helligkeitsmessung zur Lichtsteuerung zu umgehen  ;)
BTW: Gibt's für Homematic noch immer nichts in der Richtung außer dem Außen-Bewegungsmelder mit Lichtmessung?

LG Achim

Benni

Zitat von: awel am 26 März 2016, 19:19:40
BTW: Gibt's für Homematic noch immer nichts in der Richtung außer dem Außen-Bewegungsmelder mit Lichtmessung?

Doch! Die ganz große Kanone für den kleinen Spatzen! ;D

Kehemann

#53
Zitat von: awel am 26 März 2016, 19:19:40
BTW: Gibt's für Homematic noch immer nichts in der Richtung außer dem Außen-Bewegungsmelder mit Lichtmessung?

LG Achim

Guckst du hier aber dauert noch etwas bis es erhältlich ist.
http://www.elv.de/homematic-funk-lichtsensor-fuer-aussenbetrieb-komplettbausatz.html

Grüße
Kehemann

franky08

#54
@Kehemann
Ähh, und was sollen wir dem Zitat jetzt entnehmen? :o
P.S. Und das passiert, wenn Posts geändert/gelöscht werden und OT
VG
Frank
Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

tonyf

#55
hallo zusammen,

es reicht nicht, nur die eine zeile 288 im 59_Weather.pm anzupassen.
die antwort xml ist jetzt komplett anders strukturiert, sodass diese nur teilweise geparst werden kann - nur temperatur.


<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="1" yahoo:created="2016-03-27T17:02:45Z" yahoo:lang="en-US"><results><channel><yweather:units xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" distance="km" pressure="mb" speed="km/h" temperature="C"/><title>Yahoo! Weather - Stutensee, BW, DE</title><link>http://us.rd.yahoo.com/dailynews/rss/weather/Country__Country/*https://weather.yahoo.com/country/state/city-698057/</link><description>Yahoo! Weather for Stutensee, BW, DE</description><language>en-us</language><lastBuildDate>Sun, 27 Mar 2016 07:01 PM CEST</lastBuildDate><ttl>60</ttl><yweather:location xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" city="Stutensee" country="Germany" region=" BW"/><yweather:wind xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" chill="52" direction="235" speed="22.53"/><yweather:atmosphere xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" humidity="57" pressure="33694.58" rising="0" visibility="25.91"/><yweather:astronomy xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" sunrise="7:9 am" sunset="7:54 pm"/><image><title>Yahoo! Weather</title><width>142</width><height>18</height><link>http://weather.yahoo.com</link><url>http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif</url></image><item><title>Conditions for Stutensee, BW, DE at 06:00 PM CEST</title><geo:lat xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">49.064819</geo:lat><geo:long xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">8.47137</geo:long><link>http://us.rd.yahoo.com/dailynews/rss/weather/Country__Country/*https://weather.yahoo.com/country/state/city-698057/</link><pubDate>Sun, 27 Mar 2016 06:00 PM CEST</pubDate><yweather:condition xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" code="26" date="Sun, 27 Mar 2016 06:00 PM CEST" temp="12" text="Cloudy"/><yweather:forecast xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" code="28" date="28 Mar 2016" day="Mon" high="13" low="5" text="Mostly Cloudy"/><yweather:forecast xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" code="12" date="29 Mar 2016" day="Tue" high="12" low="6" text="Rain"/><yweather:forecast xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" code="28" date="30 Mar 2016" day="Wed" high="15" low="6" text="Mostly Cloudy"/><yweather:forecast xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" code="28" date="31 Mar 2016" day="Thu" high="17" low="8" text="Mostly Cloudy"/><yweather:forecast xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" code="28" date="01 Apr 2016" day="Fri" high="11" low="6" text="Mostly Cloudy"/><yweather:forecast xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" code="30" date="02 Apr 2016" day="Sat" high="15" low="6" text="Partly Cloudy"/><yweather:forecast xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" code="30" date="03 Apr 2016" day="Sun" high="16" low="7" text="Partly Cloudy"/><yweather:forecast xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" code="30" date="04 Apr 2016" day="Mon" high="16" low="7" text="Partly Cloudy"/><yweather:forecast xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" code="30" date="05 Apr 2016" day="Tue" high="16" low="8" text="Partly Cloudy"/><yweather:forecast xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" code="12" date="06 Apr 2016" day="Wed" high="14" low="8" text="Rain"/><description>&lt;![CDATA[&lt;img src="http://l.yimg.com/a/i/us/we/52/26.gif"/&gt;
&lt;BR /&gt;
&lt;b&gt;Current Conditions:&lt;/b&gt;
&lt;BR /&gt;Cloudy
&lt;BR /&gt;
&lt;BR /&gt;
&lt;b&gt;Forecast:&lt;/b&gt;
&lt;BR /&gt; Mon - Mostly Cloudy. High: 13Low: 5
&lt;BR /&gt; Tue - Rain. High: 12Low: 6
&lt;BR /&gt; Wed - Mostly Cloudy. High: 15Low: 6
&lt;BR /&gt; Thu - Mostly Cloudy. High: 17Low: 8
&lt;BR /&gt; Fri - Mostly Cloudy. High: 11Low: 6
&lt;BR /&gt;
&lt;BR /&gt;
&lt;a href="http://us.rd.yahoo.com/dailynews/rss/weather/Country__Country/*https://weather.yahoo.com/country/state/city-698057/"&gt;Full Forecast at Yahoo! Weather&lt;/a&gt;
&lt;BR /&gt;
&lt;BR /&gt;
(provided by &lt;a href="http://www.weather.com" &gt;The Weather Channel&lt;/a&gt;)
&lt;BR /&gt;
]]&gt;</description><guid isPermaLink="false"/></item></channel></results></query><!-- total: 9 -->
<!-- main-1f114df6-f23e-11e5-8580-d89d676f9644 -->


die ausgabe sieht dementsprechend unvollständig aus - s. bild.
wäre super, das komplette coding von den experten zu überarbeiten.

danke&gruss
tony
INTEL DN2820FYKH NUC: 4 gb, 250 ssd hd als nas, fhem 5.6
cul 433 - IT aktoren - relaiskarte an raspberry pi

franky08

Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

CoolTux

Der Boris arbeitet trotz Feiertage intensiv an einer neuen Version.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

franky08

Darum hab ich ihm doch den Link gepostet  ;)

VG
Frank
Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

CoolTux

Ich weiß. Wollte es nur noch mal expliziet erwähnen. Ich finde seinen Einsatz nämlich sehr gut. Kein Entwickler ist gezwungen in solch kurzen Reaktionen zu arbeiten.



Grüße
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net