FHEM Forum

FHEM => Automatisierung => DOIF => Thema gestartet von: dieter56 am 21 Mai 2016, 16:01:51

Titel: DOIF Fehlermeldung: Modification of a read-only value attempted at FHEM/H
Beitrag von: dieter56 am 21 Mai 2016, 16:01:51
Hallo,

ich hoffe irgend jemand hat einen Tipp für mich.

Ich habe ein DOIF.

Internals:
   DEF        (["Thermostat:temp"])
({setTempState()})
   NAME       di_temp
   NR         237
   NTFY_ORDER 50-di_temp
   STATE      cmd_1
   TYPE       DOIF
   Readings:
     2016-05-21 15:36:48   Device          Bad.Thermostat.Weather
     2016-05-21 15:36:12   cmd             1
     2016-05-21 15:36:12   cmd_event       Buero.Thermostat
     2016-05-21 15:36:12   cmd_nr          1
     2016-05-21 15:36:12   error           {setTempState()}: Modification of a read-only value attempted at FHEM/HttpUtils.pm line 47.

     2016-05-21 15:36:48   matched_event_c1_1 temperature: 22.3
     2016-05-21 15:36:12   state           cmd_1
   Condition:
     0          EventDoIf('Thermostat',$hash,'temp',0)
   Devices:
   Do:
     0:
       0          {setTempState()}
   Helper:
     event      temperature: 22.3
     globalinit 1
     last_timer 0
     sleeptimer -1
     timerdev   Bad.Thermostat.Weather
     timerevent temperature: 22.3
     triggerDev Bad.Thermostat.Weather
     timerevents:
       humidity: 52
       T: 22.3 H: 52
       temperature: 22.3
     timereventsState:
       humidity: 52
       state: T: 22.3 H: 52
       temperature: 22.3
     triggerEvents:
       humidity: 52
       T: 22.3 H: 52
       temperature: 22.3
     triggerEventsState:
       humidity: 52
       state: T: 22.3 H: 52
       temperature: 22.3
   Internals:
   Itimer:
   Readings:
   Regexp:
     0:
       0          Thermostat:temp
     All:
       0          Thermostat:temp
   State:
   Trigger:
Attributes:
   cmdpause   60
   do         always


Manchmal taucht im Protokoll diese Fehlermeldung auf: di_temp:
{setTempState()}: Modification of a read-only value attempted at FHEM/HttpUtils.pm line 47.

In der sub setTempState werden Readings aus Thermostaten gelesen und verarbeitet und Ergebnisse als Readings in dummys geschrieben. Diese Readings sind doch nie read-only - oder? Was passiert in HttpUtils und was mus man beachten um diesen Fehler zu vermeiden?

Viele Grüße aus dem sonnigen Magdeburg
Dieter
Titel: Antw:DOIF Fehlermeldung: Modification of a read-only value attempted at FHEM/H
Beitrag von: Per am 21 Mai 2016, 16:07:12
Ich denke, dass die Funktion setTempState eine entsprechende Fehlermeldung zurück gibt und die Ursache dort zu suchen ist.