openweathermap vs. event_on_change_reading [gelöst]

Begonnen von peterk_de, 28 Juni 2014, 12:00:52

Vorheriges Thema - Nächstes Thema

peterk_de

Hallo zusammen,

event-on-change-reading scheint bei mir im Zusammenspiel mit openweathermap nicht zu funktionieren - es werden bei jedem Update immer Events für alle Readings erzeugt. Kann das jemand nachvollziehen?

Listing:


Internals:
   NAME       wetter.magdeburg
   NR         738
   NTFY_ORDER 50-wetter.magdeburg
   STATE      0 mm (letzte 3h)
   TYPE       openweathermap
   CHANGETIME:
   Helper:
     Dblog:
       C_clouds:
         Dblog:
           TIME       1403948267.1322
           VALUE      20
       C_humidity:
         Dblog:
           TIME       1403948267.1322
           VALUE      56
       C_lastrxcode:
         Dblog:
           TIME       1403948267.1322
           VALUE      200
       C_lastwx:
         Dblog:
           TIME       1403948267.1322
           VALUE      Sat Jun 28 11:12:34 2014
       C_pressureabs:
         Dblog:
           TIME       1403948267.1322
           VALUE      945.9
       C_pressurerel:
         Dblog:
           TIME       1403830130.03799
           VALUE      1030.03
       C_rain3h:
         Dblog:
           TIME       1403948267.1322
           VALUE      0
       C_stationid:
         Dblog:
           TIME       1403948267.1322
           VALUE      2864072
       C_stationlat:
         Dblog:
           TIME       1403948267.1322
           VALUE      52.1500
       C_stationlon:
         Dblog:
           TIME       1403948267.1322
           VALUE      11.6300
       C_stationname:
         Dblog:
           TIME       1403948267.1322
           VALUE      Neue Neustadt
       C_sunrise:
         Dblog:
           TIME       1403948267.1322
           VALUE      Sat Jun 28 04:55:20 2014
       C_sunset:
         Dblog:
           TIME       1403948267.1322
           VALUE      Sat Jun 28 21:38:18 2014
       C_tempmax:
         Dblog:
           TIME       1403948267.1322
           VALUE      22.4
       C_tempmin:
         Dblog:
           TIME       1403948267.1322
           VALUE      22.4
       C_temperature:
         Dblog:
           TIME       1403948267.1322
           VALUE      22.4
       C_winddir:
         Dblog:
           TIME       1403948267.1322
           VALUE      23
       C_windspeed:
         Dblog:
           TIME       1403948267.1322
           VALUE      0.1
       Rain3h:
         Dblog:
           TIME       1403944064.64928
           VALUE      0
       State:
         Dblog:
           TIME       1403768904.83131
           VALUE      active
   Readings:
     2014-06-28 11:37:47   _dataSource     www.openweathermap.org
     2014-06-28 11:37:47   _decodedWith    JSON
     2014-06-28 11:37:47   _httpResponse_c 200 OK
     2014-06-28 11:37:47   c_clouds        20
     2014-06-28 11:37:47   c_humidity      56
     2014-06-28 11:37:47   c_lastRxCode    200
     2014-06-28 11:37:47   c_lastWx        Sat Jun 28 11:12:34 2014
     2014-06-28 11:37:47   c_pressureAbs   945.9
     2014-06-28 11:37:47   c_rain3h        0
     2014-06-28 11:37:47   c_stationId     2864072
     2014-06-28 11:37:47   c_stationLat    52.1500
     2014-06-28 11:37:47   c_stationLon    11.6300
     2014-06-28 11:37:47   c_stationName   Neue Neustadt
     2014-06-28 11:37:47   c_sunrise       Sat Jun 28 04:55:20 2014
     2014-06-28 11:37:47   c_sunset        Sat Jun 28 21:38:18 2014
     2014-06-28 11:37:47   c_tempMax       22.4
     2014-06-28 11:37:47   c_tempMin       22.4
     2014-06-28 11:37:47   c_temperature   22.4
     2014-06-28 11:37:47   c_windDir       23
     2014-06-28 11:37:47   c_windSpeed     0.1
     2014-06-28 11:37:47   rain3h          0
     2014-06-28 11:37:47   state           active
   Helper:
     AVAILABLE  1
     INTERVAL   600
Attributes:
   alias      Niederschlag
   event-on-change-reading c_temperature,c_humidity,c_rain3h,rain3h
   group      Klima
   owoDebug   1
   owoGetUrl  http://api.openweathermap.org/data/2.5/weather
   owoInterval 600
   owoSendUrl http://openweathermap.org/data/post
   owoStation 2864072
   owoUseXml  0
   room       Wohnung
   stateFormat rain3h mm (letzte 3h)
   userReadings rain3h { ReadingsVal("wetter.magdeburg","c_rain3h",0); }


Version (Auszug):

# $Id: fhem.pl 6080 2014-06-07 16:12:09Z rudolfkoenig $
# $Id: 98_openweathermap.pm 5500 2014-04-09 18:57:05Z betateilchen $


Anmerkung hierzu: Die Version entspricht r6122, die ich vorhin manuell aus dem SVN (contrib-verzeichnis) gezogen und dann reloaded habe. Die Versionsbezeichnung in der Datei selbst scheint über ein paar SVN-Revisionen gleich geblieben zu sein.

Log (Auszug):


|| *TIMESTAMP* || *DEVICE* || *TYPE* || *EVENT* || *READING* || *VALUE* || *UNIT* ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_stationId: 2864072 || c_stationId || 2864072 ||  ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_lastWx: Sat Jun 28 11:12:34 2014 || c_lastWx || Sat Jun 28 11:12:34 2014 ||  ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_sunrise: Sat Jun 28 04:55:20 2014 || c_sunrise || Sat Jun 28 04:55:20 2014 ||  ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_sunset: Sat Jun 28 21:38:18 2014 || c_sunset || Sat Jun 28 21:38:18 2014 ||  ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_tempMax: 22.4 || c_tempMax || 22.4 ||  ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_lastRxCode: 200 || c_lastRxCode || 200 ||  ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_stationName: Neue Neustadt || c_stationName || Neue Neustadt ||  ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_humidity: 56 || c_humidity || 56 ||  ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_pressureAbs: 945.9 || c_pressureAbs || 945.9 ||  ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_windSpeed: 0.1 || c_windSpeed || 0.1 ||  ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_tempMin: 22.4 || c_tempMin || 22.4 ||  ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 22.4 || c_temperature || 22.4 ||  ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_stationLon: 11.6300 || c_stationLon || 11.6300 ||  ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_stationLat: 52.1500 || c_stationLat || 52.1500 ||  ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_rain3h: 0 || c_rain3h || 0 ||  ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_clouds: 20 || c_clouds || 20 ||  ||
|| 2014-06-28 11:57:47 || wetter.magdeburg || OPENWEATHERMAP || c_windDir: 23 || c_windDir || 23 ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_pressureAbs: 945.7 || c_pressureAbs || 945.7 ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_humidity: 54 || c_humidity || 54 ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_stationName: Neue Neustadt || c_stationName || Neue Neustadt ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_stationId: 2864072 || c_stationId || 2864072 ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_sunset: Sat Jun 28 21:38:18 2014 || c_sunset || Sat Jun 28 21:38:18 2014 ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_sunrise: Sat Jun 28 04:55:20 2014 || c_sunrise || Sat Jun 28 04:55:20 2014 ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_lastWx: Sat Jun 28 11:43:42 2014 || c_lastWx || Sat Jun 28 11:43:42 2014 ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_windSpeed: 0.8 || c_windSpeed || 0.8 ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_windDir: 298 || c_windDir || 298 ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_lastRxCode: 200 || c_lastRxCode || 200 ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_tempMax: 22.3 || c_tempMax || 22.3 ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_tempMin: 22.3 || c_tempMin || 22.3 ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 22.3 || c_temperature || 22.3 ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_stationLon: 11.6300 || c_stationLon || 11.6300 ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_stationLat: 52.1500 || c_stationLat || 52.1500 ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_rain3h: 0 || c_rain3h || 0 ||  ||
|| 2014-06-28 11:47:47 || wetter.magdeburg || OPENWEATHERMAP || c_clouds: 20 || c_clouds || 20 ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_humidity: 56 || c_humidity || 56 ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_stationName: Neue Neustadt || c_stationName || Neue Neustadt ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_lastRxCode: 200 || c_lastRxCode || 200 ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_stationId: 2864072 || c_stationId || 2864072 ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_sunset: Sat Jun 28 21:38:18 2014 || c_sunset || Sat Jun 28 21:38:18 2014 ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_sunrise: Sat Jun 28 04:55:20 2014 || c_sunrise || Sat Jun 28 04:55:20 2014 ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_lastWx: Sat Jun 28 11:12:34 2014 || c_lastWx || Sat Jun 28 11:12:34 2014 ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_pressureAbs: 945.9 || c_pressureAbs || 945.9 ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_windSpeed: 0.1 || c_windSpeed || 0.1 ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_windDir: 23 || c_windDir || 23 ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 22.4 || c_temperature || 22.4 ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_tempMax: 22.4 || c_tempMax || 22.4 ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_tempMin: 22.4 || c_tempMin || 22.4 ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_stationLon: 11.6300 || c_stationLon || 11.6300 ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_stationLat: 52.1500 || c_stationLat || 52.1500 ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_rain3h: 0 || c_rain3h || 0 ||  ||
|| 2014-06-28 11:37:47 || wetter.magdeburg || OPENWEATHERMAP || c_clouds: 20 || c_clouds || 20 ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_lastWx: Sat Jun 28 11:12:34 2014 || c_lastWx || Sat Jun 28 11:12:34 2014 ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_pressureAbs: 945.9 || c_pressureAbs || 945.9 ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_humidity: 56 || c_humidity || 56 ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_stationName: Neue Neustadt || c_stationName || Neue Neustadt ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_lastRxCode: 200 || c_lastRxCode || 200 ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_stationId: 2864072 || c_stationId || 2864072 ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_sunset: Sat Jun 28 21:38:18 2014 || c_sunset || Sat Jun 28 21:38:18 2014 ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_sunrise: Sat Jun 28 04:55:20 2014 || c_sunrise || Sat Jun 28 04:55:20 2014 ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_windSpeed: 0.1 || c_windSpeed || 0.1 ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_clouds: 20 || c_clouds || 20 ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_windDir: 23 || c_windDir || 23 ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_tempMax: 22.4 || c_tempMax || 22.4 ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_tempMin: 22.4 || c_tempMin || 22.4 ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 22.4 || c_temperature || 22.4 ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_stationLon: 11.6300 || c_stationLon || 11.6300 ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_stationLat: 52.1500 || c_stationLat || 52.1500 ||  ||
|| 2014-06-28 11:27:46 || wetter.magdeburg || OPENWEATHERMAP || c_rain3h: 0 || c_rain3h || 0 ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_humidity: 56 || c_humidity || 56 ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_stationName: Neue Neustadt || c_stationName || Neue Neustadt ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_lastRxCode: 200 || c_lastRxCode || 200 ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_stationId: 2864072 || c_stationId || 2864072 ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_sunset: Sat Jun 28 21:38:18 2014 || c_sunset || Sat Jun 28 21:38:18 2014 ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_sunrise: Sat Jun 28 04:55:20 2014 || c_sunrise || Sat Jun 28 04:55:20 2014 ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_lastWx: Sat Jun 28 11:12:34 2014 || c_lastWx || Sat Jun 28 11:12:34 2014 ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_pressureAbs: 945.9 || c_pressureAbs || 945.9 ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_windSpeed: 0.1 || c_windSpeed || 0.1 ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_windDir: 23 || c_windDir || 23 ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_tempMax: 22.4 || c_tempMax || 22.4 ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_tempMin: 22.4 || c_tempMin || 22.4 ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 22.4 || c_temperature || 22.4 ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_stationLon: 11.6300 || c_stationLon || 11.6300 ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_stationLat: 52.1500 || c_stationLat || 52.1500 ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_rain3h: 0 || c_rain3h || 0 ||  ||
|| 2014-06-28 11:17:46 || wetter.magdeburg || OPENWEATHERMAP || c_clouds: 20 || c_clouds || 20 ||  ||
|| 2014-06-28 11:07:46 || wetter.magdeburg || OPENWEATHERMAP || c_humidity: 61 || c_humidity || 61 ||  ||
|| 2014-06-28 11:07:46 || wetter.magdeburg || OPENWEATHERMAP || c_stationName: Neue Neustadt || c_stationName || Neue Neustadt ||  ||
|| 2014-06-28 11:07:46 || wetter.magdeburg || OPENWEATHERMAP || c_lastRxCode: 200 || c_lastRxCode || 200 ||  ||
|| 2014-06-28 11:07:46 || wetter.magdeburg || OPENWEATHERMAP || c_stationId: 2864072 || c_stationId || 2864072 ||  ||
|| 2014-06-28 11:07:46 || wetter.magdeburg || OPENWEATHERMAP || c_sunset: Sat Jun 28 21:38:18 2014 || c_sunset || Sat Jun 28 21:38:18 2014 ||  ||
|| 2014-06-28 11:07:46 || wetter.magdeburg || OPENWEATHERMAP || c_sunrise: Sat Jun 28 04:55:20 2014 || c_sunrise || Sat Jun 28 04:55:20 2014 ||  ||
|| 2014-06-28 11:07:46 || wetter.magdeburg || OPENWEATHERMAP || c_lastWx: Sat Jun 28 10:14:23 2014 || c_lastWx || Sat Jun 28 10:14:23 2014 ||  ||
|| 2014-06-28 11:07:46 || wetter.magdeburg || OPENWEATHERMAP || c_pressureAbs: 945.8 || c_pressureAbs || 945.8 ||  ||
|| 2014-06-28 11:07:46 || wetter.magdeburg || OPENWEATHERMAP || c_windSpeed: 0.4 || c_windSpeed || 0.4 ||  ||
|| 2014-06-28 11:07:46 || wetter.magdeburg || OPENWEATHERMAP || c_windDir: 277 || c_windDir || 277 ||  ||
|| 2014-06-28 11:07:46 || wetter.magdeburg || OPENWEATHERMAP || c_tempMax: 20.9 || c_tempMax || 20.9 ||  ||
|| 2014-06-28 11:07:46 || wetter.magdeburg || OPENWEATHERMAP || c_tempMin: 20.9 || c_tempMin || 20.9 ||  ||
|| 2014-06-28 11:07:46 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 20.9 || c_temperature || 20.9 ||  ||
|| 2014-06-28 11:07:46 || wetter.magdeburg || OPENWEATHERMAP || c_stationLon: 11.6300 || c_stationLon || 11.6300 ||  ||
|| 2014-06-28 11:07:46 || wetter.magdeburg || OPENWEATHERMAP || c_stationLat: 52.1500 || c_stationLat || 52.1500 ||  ||
FHEM auf Ubuntu-VM / 2xNUC Proxmox Cluster
UI: HomeKit, TabletUI, Grafana
IOdevs: 2xHueBridge, RaspiMatic-CCU, CUL868, 2xHarmonyHub, 6xRaspi-Roomnode mit CO2, VOC und lepresenced
Devices: 107xHomematic(IP), 96xPhilips Hue, 17xTECHEM, 12xBTLE, 8xSONOS, 2xHomeConnect, 1xShelly 3em, 1xNanoleaf ...

betateilchen

-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

peterk_de

Also kaputt by Design?  ;)


attr wetter.magdeburg event-on-change-reading c_temperature,c_humidity,c_rain3h,rain3h



SELECT * FROM history WHERE device = 'wetter.magdeburg' AND READING = 'c_temperature' ORDER BY timestamp DESC LIMIT 100

|| *TIMESTAMP* || *DEVICE* || *TYPE* || *EVENT* || *READING* || *VALUE* || *UNIT* ||
...
|| 2014-07-08 18:58:24 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 18:48:23 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 18:38:23 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 18:28:22 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 18:18:22 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 18:08:21 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 17:58:21 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 17:48:19 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 17:38:18 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 17:28:18 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 17:18:13 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 17:08:13 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 16:58:12 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 16:48:11 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 16:38:10 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 16:28:10 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 16:18:09 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 16:08:08 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
|| 2014-07-08 15:58:07 || wetter.magdeburg || OPENWEATHERMAP || c_temperature: 19.7 || c_temperature || 19.7 ||  ||
...
FHEM auf Ubuntu-VM / 2xNUC Proxmox Cluster
UI: HomeKit, TabletUI, Grafana
IOdevs: 2xHueBridge, RaspiMatic-CCU, CUL868, 2xHarmonyHub, 6xRaspi-Roomnode mit CO2, VOC und lepresenced
Devices: 107xHomematic(IP), 96xPhilips Hue, 17xTECHEM, 12xBTLE, 8xSONOS, 2xHomeConnect, 1xShelly 3em, 1xNanoleaf ...

betateilchen

Zitat von: peterk_de am 11 Juli 2014, 15:37:44
Also kaputt by Design?

Nix kaputt, event-on-change funktioniert 100% korrekt. Das von Dir beschriebene Verhalten ist exakt so gewollt und explizit im Modul so ausprogrammiert.


  • alle vorhandenen readings löschen
  • aktuelle Wetterdaten von openweathermap lesen und auswerten
  • neue readings mit aktuellen Daten generieren

Ob Du also event-on-change angibst oder nicht, ist völlig belanglos, denn es wird nie ein "change" auftreten.

Das Vorgehen ist genau so notwendig, weil das der einzige Weg ist, immer (nur) die aktuellen Daten in den readings stehen zu haben. Denn es gibt Wetterstationen bei owo, die nicht bei jedem Abruf den gleichen Datensatz liefern. Es könnte also durchaus passieren, dass Du plötzlich ein sechs Stunden altes (oder noch älteres) unverändertes reading hast, nur weil es (gerade mal) nicht von der Wetterstation bereitgestellt wird.

Und DU wärst dann mit ziemlicher Sicherheit einer der Ersten, der hier rummault: "Wieso wird das reading xyz nicht mehr aktualisiert?"

-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

peterk_de

Zitat von: betateilchen am 11 Juli 2014, 18:25:41
Nix kaputt, event-on-change funktioniert 100% korrekt. Das von Dir beschriebene Verhalten ist exakt so gewollt und explizit im Modul so ausprogrammiert.

Das Vorgehen ist genau so notwendig, weil das der einzige Weg ist, immer (nur) die aktuellen Daten in den readings stehen zu haben. Denn es gibt Wetterstationen bei owo, die nicht bei jedem Abruf den gleichen Datensatz liefern. Es könnte also durchaus passieren, dass Du plötzlich ein sechs Stunden altes (oder noch älteres) unverändertes reading hast, nur weil es (gerade mal) nicht von der Wetterstation bereitgestellt wird.

Und DU wärst dann mit ziemlicher Sicherheit einer der Ersten, der hier rummault: "Wieso wird das reading xyz nicht mehr aktualisiert?"

OK das ist eine Erklärung. Allerdings würde ich nicht rummaulen, im Gegenteil, ich fände es gut, denn ich erwarte, wenn ich in die Doku schaue und dann event-on-change-reading entsprechend setze, dass ich eben nur Änderungen gemeldet bekomme, denn dafür ist es ja da. Ob da ein Reading noch aktuell ist, kann ich in jedem Fall am Timestamp erkennen, wenn ich das möchte.

Eine gute Alternative und wie man es besser macht weiß ich leider nicht (nur die Readings zu löschen, die beim letzten update nicht mitgekommen sind, produziert ja möglicherweise für jene auch wieder Events, da sie geändert - gelöscht - wurden), ich kann da nur mit meiner primitiven Nutzersicht dienen

FHEM auf Ubuntu-VM / 2xNUC Proxmox Cluster
UI: HomeKit, TabletUI, Grafana
IOdevs: 2xHueBridge, RaspiMatic-CCU, CUL868, 2xHarmonyHub, 6xRaspi-Roomnode mit CO2, VOC und lepresenced
Devices: 107xHomematic(IP), 96xPhilips Hue, 17xTECHEM, 12xBTLE, 8xSONOS, 2xHomeConnect, 1xShelly 3em, 1xNanoleaf ...

betateilchen

Es gibt eine ganz pragmatische Lösung: In der ab morgen in contrib verfügbaren Version des Moduls werden die readingsFnAttr nicht mehr angeboten.

Habe fertsch.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!