Twilight Weather timeouts

Begonnen von HolyMoly, 27 Dezember 2014, 11:08:41

Vorheriges Thema - Nächstes Thema

Dietmar63

Wieder gebootet oder sonst viel los auf deiner Maschine?
Welche Hardware hast du?
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

Dietmar63

um 17:36:14 wird das Wetter normalerweise in TW nicht gelesen.
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

HolyMoly

Ja shutdown restart, quad core arm machine und kein load druff...
FHEM auf Raspi2 & Radxa Rock

Dietmar63

http://forum.fhem.de/index.php/topic,31049.msg237008.html#msg237008

Führe mal ein update durch.
Die aktuellste Version von httputils hat das Problem bei mir vollständig behoben.

Warum starttest du so oft?
Das ist doch völlig unnötig.
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

Dietmar63

Du kannst folgendes machen :
Starte dein System mit global verbose 4.

Dann bekommst du aus TW und httputils Infos, die meine Vermutung dann ggf. Bestätigen können. Der timeout ist mit 5 Sekunden fest verdrahtet.
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

HolyMoly

Hab ich gemacht. Seltsamerweise kommt die Anfrage für Weather durch welche noch deutlich vor twilight stattfindet:

2014.12.31 09:41:55 4: HttpUtils url=http://weather.yahooapis.com/forecastrss?w=12836562&u=c
2014.12.31 09:41:55 4: http://weather.yahooapis.com/forecastrss?w=12836562&u=c: HTTP response code 200
2014.12.31 09:41:55 4: HttpUtils http://weather.yahooapis.com/forecastrss?w=12836562&u=c: Got data, length: 2707
2014.12.31 09:41:55 4: Weather Wetter.Muenchen: T: -1  H: 91  W: 3

2014.12.31 09:42:43 2: Wohnzimmer.twilight get weather result connect to http://weather.yahooapis.com:80 timed out

Hat Yahoo vielleicht eine Limitierung so dass ihre kostenlose API nur eine bestimmte Anzahl an Anfragen / Zeiteinheit kann?
FHEM auf Raspi2 & Radxa Rock

Dietmar63

Hast du die neueste Version von httputils?
Die timeout Meldung kommt mit fast einer Minute Verspätung.

Und das obwohl die Daten viel früher zur Verfügung stehen.
Vergleiche mal mit Werten aus dem normalen Betrieb. Einfach in def neu definieren.
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

Dietmar63

Bei mir sieht es heute morgen so aus. Auch ein timeout:

2014.12.31 10:41:30 4: [Twilight] sr_weather state=6  light=6  nextEvent=ss_weather 31.12.2014  14:46:13  deg=+8.0°
2014.12.31 10:41:30 4: [Twilight] sr_indoor  state=5  light=5  nextEvent=sr_weather 31.12.2014  09:58:53  deg=+0.0°
2014.12.31 10:41:30 4: [Twilight] sr         state=4  light=4  nextEvent=sr_indoor  31.12.2014  08:39:06  deg=+0.0°
2014.12.31 10:41:30 4: [Twilight] sr_civil   state=3  light=3  nextEvent=sr         31.12.2014  08:39:06  deg=-6.0°
2014.12.31 10:41:30 4: [Twilight] sr_naut    state=2  light=2  nextEvent=sr_civil   31.12.2014  07:50:30  deg=-12.0°
2014.12.31 10:41:30 4: [Twilight] sr_astro   state=1  light=1  nextEvent=sr_naut    31.12.2014  07:06:17  deg=-18.0°
2014.12.31 10:41:30 4: Twilight got weather info from yahoo for 12833457
2014.12.31 10:41:30 3: HttpUtils http://weather.yahooapis.com/forecastrss?w=12833457&u=c: Got data, length: 2710
2014.12.31 10:41:30 3: http://weather.yahooapis.com/forecastrss?w=12833457&u=c: HTTP response code 200
2014.12.31 10:41:29 3: HttpUtils url=http://weather.yahooapis.com/forecastrss?w=12833457&u=c
2014.12.31 08:58:59 4: [Twilight] sr_weather state=6  light=6  nextEvent=ss_weather 31.12.2014  16:06:00  deg=+0.0°
2014.12.31 08:58:59 2: Twilight got no weather error code: read from http://weather.yahooapis.com:80 timed out
2014.12.31 08:58:53 3: HttpUtils url=http://weather.yahooapis.com/forecastrss?w=12833457&u=c
2014.12.31 08:39:06 4: [Twilight] sr_indoor  state=5  light=5  nextEvent=sr_weather 31.12.2014  09:58:53  deg=+0.0°
2014.12.31 08:39:06 4: [Twilight] sr         state=4  light=4  nextEvent=sr_indoor  31.12.2014  08:39:06  deg=+0.0°
2014.12.31 08:31:59 4: Twilight got weather info from yahoo for 12833457
2014.12.31 08:31:59 3: HttpUtils http://weather.yahooapis.com/forecastrss?w=12833457&u=c: Got data, length: 2716
2014.12.31 08:31:59 3: http://weather.yahooapis.com/forecastrss?w=12833457&u=c: HTTP response code 200
2014.12.31 08:31:58 3: HttpUtils url=http://weather.yahooapis.com/forecastrss?w=12833457&u=c
2014.12.31 08:06:02 3:
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

heikoh81

Auch ich möchte das Problem melden.
Zur geloggten Zeit hat kein reboot oder ähnliches stattgefunden. Reboot ist bei mir immer um 05:05 Uhr!


2014.12.31 08:10:53 2: myTwilight get weather result read from http://weather.yahooapis.com:80 timed out


Viele Grüße,
Heiko

herrmannj

Hi,

mMn ganz normal. Die Meldung sagt das yahoo nicht innerhalb der Zeitspanne geantwortet hat - was ja auch vorkommt. "Früher" wurde Dein fhem in so einer Situation komplett für die Zeit blockiert, jetzt merkt man das nur am log.

Das mit dem reboot ist ein timing problem (mit neuer https utils weg)  - und ansonsten sollen ja genau die Situation so behandelt werden - für mich sieht das ok aus.

Kann man vlt überlegen den timeout hochzusetzen falls yahoo extrem trödelt - das kostet nix. Aber wenn die nicht antworten (das gibt es durchaus, schau mal wie oft developer.yahoo nicht erreichbar ist) - dann passt das doch.

vg
jörg

Dietmar63

Ich liefere in Kürze eine verbesserte Version aus, bei der wird der verbose Wert an httputils weitergegeben. Dann können alle betroffen Rechner besseres Logging erzeugen,und vielleicht kommen wir der Ursache auf die Spur.

Vielleicht erweitere ich das Modul, so dass man den zu verwendenden timeout mitgeben kann.
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

heikoh81

Was ich auch immer wieder betone:
Vielleicht eine Option zum Abschalten der Yahoo-API. Ich bleibe gerne Cloud-free, und twilight braucht eigentlich keinen Online-Dienst für die Standard-Dämmerung (von der Wetterabhängigen einmal abgesehen). Aber im Zweifel geht Twilight dann gar nicht mehr, nur weil Yahoo was ändert... Deshalb vielleicht eine Option, Yahoo auszuschalten.

Dietmar63

@HolyMoly:

Zitat
Hab ich gemacht. Seltsamerweise kommt die Anfrage für Weather durch welche noch deutlich vor twilight stattfindet:

2014.12.31 09:41:55 4: HttpUtils url=http://weather.yahooapis.com/forecastrss?w=12836562&u=c
2014.12.31 09:41:55 4: http://weather.yahooapis.com/forecastrss?w=12836562&u=c: HTTP response code 200
2014.12.31 09:41:55 4: HttpUtils http://weather.yahooapis.com/forecastrss?w=12836562&u=c: Got data, length: 2707
2014.12.31 09:41:55 4: Weather Wetter.Muenchen: T: -1  H: 91  W: 3

2014.12.31 09:42:43 2: Wohnzimmer.twilight get weather result connect to http://weather.yahooapis.com:80 timed out

Hat Yahoo vielleicht eine Limitierung so dass ihre kostenlose API nur eine bestimmte Anzahl an Anfragen / Zeiteinheit kann?

gerade diese Zeile im Log
2014.12.31 09:41:55 4: HttpUtils http://weather.yahooapis.com/forecastrss?w=12836562&u=c: Got data, length: 2707
bedeutet, dass eine Antwort gekommen ist, sie aber vielleicht nicht weitergereicht wurde.
Dann lag oder liegt das Problem in HttpUtils. Wie gesagt bei der neuesten Version tritt dieser Fehler bei mir nicht mehr auf.
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

HolyMoly

Meine HttpUtils sind:
# $Id: HttpUtils.pm 7155 2014-12-07 11:41:33Z rudolfkoenig $
also wohl derzeit aktuell?
FHEM auf Raspi2 & Radxa Rock

Dietmar63

eingecheckt:

59_Twilight: revised version. it is now possible to check timeouts of HttpUtils_NonblockingGet() by using verbose 4 or 5. The value of verbose is tranfered to HttpUtils_NonblockingGet().

Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm