FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: Neonblack am 12 Mai 2018, 20:00:16

Titel: Heizungssteuerung mit HomeStatus und Structure
Beitrag von: Neonblack am 12 Mai 2018, 20:00:16
Hi ihr Lieben. Fhem läuft bei mir seit ca. einem Jahr, vorwiegend MAX! Heizungssteuerung und meine Rollos. Den Cube habe ich umgeflasht, die Thermostate laufen über das jeweils programmierte Wochenprogramm. Jetzt bastele ich an FTUI und habe in diesem Zug das Homestatus-Widget eingebunden. Das zugehörige Notify sah so aus:
HomeStatus {  if ( ReadingsVal("HomeStatus", "state", "") == "home" )   { fhem "set wz_thermostat desiredTemperature auto", fhem "set az_thermostat desiredTemperature auto",fhem "set gz_thermostat desiredTemperature auto",fhem "set bz_thermostat desiredTemperature auto",fhem "set sz_thermostat desiredTemperature auto",fhem "set ku_thermostat desiredTemperature auto" ;} if ( ReadingsVal("HomeStatus", "state", "") == "asleep" ) {fhem "set wz_thermostat desiredTemperature boost", fhem "set az_thermostat desiredTemperature boost", fhem "set gz_thermostat desiredTemperature boost", fhem "set bz_thermostat desiredTemperature boost", fhem "set sz_thermostat desiredTemperature boost", fhem "set ku_thermostat desiredTemperature boost" ;} if ( ReadingsVal("HomeStatus", "state", "") == "absent" )   { fhem "set az_thermostat desiredTemperature eco", fhem "set wz_wandthermostat desiredTemperature eco", fhem "set gz_thermostat desiredTemperature eco", fhem "set bz_thermostat desiredTemperature eco", fhem "set sz_thermostat desiredTemperature eco", fhem "set ku_thermostat desiredTemperature eco", fhem "set az_rollo closed" ;}if ( ReadingsVal("HomeStatus", "state", "") == "gone" )   { fhem "set wz_thermostat desiredTemperature comfort", fhem "set az_thermostat desiredTemperature comfort", fhem "set gz_thermostat desiredTemperature comfort", fhem "set bz_thermostat desiredTemperature comfort", fhem "set sz_thermostat desiredTemperature comfort", fhem "set ku_thermostat desiredTemperature comfort", fhem "set az_rollo closed" ;}

Da das mit zunehmenden Devices immer unübersichtlicher wird, habe ich eine Strucure "Heizungen" erstellt:

Internals:
   ATTR       Heizungen
   CFGFN     
   CHANGEDCNT 198
   DEF        Heizungen wz_wandthermostat az_thermostat gz_thermostat bz_thermostat ku_thermostat sz_thermostat
   NAME       Heizungsventile
   NR         10266
   NTFY_ORDER 50-Heizungsventile
   STATE      undefined
   TYPE       structure
   READINGS:
     2018-05-12 19:34:45   LastDevice      wz_wandthermostat
     2018-05-12 19:34:45   LastDevice_Abs  wz_wandthermostat
     2018-05-12 19:34:45   state           undefined
Attributes:



Das Notify habe ich dementsprechend umgestrickt:



HomeStatus {  if ( ReadingsVal("HomeStatus", "state", "") eq "home" )   { fhem "set Heizungsventile desiredTemperature auto" ;} if ( ReadingsVal("HomeStatus", "state", "") eq "asleep" ) {fhem "set Heizungsventile desiredTemperature eco" ;} if ( ReadingsVal("HomeStatus", "state", "") eq "absent" )   { fhem "set Heizungsventile desiredTemperature eco" ;}if ( ReadingsVal("HomeStatus", "state", "") eq "gone" )   { fhem "set Heizungsventile desiredTemperature comfort" ;} if ( ReadingsVal("HomeStatus", "state", "") eq "gotosleep" )   { fhem "set Heizungsventile desiredTemperature eco" ;} if ( ReadingsVal ("HomeStatus", "state", "") eq "gone" and ("az_fensterkontakt") eq "closed") { fhem "set az_rollo closed";}}



Eigentlich tut es fast, was es soll, außer dass der letzte Befehl, das Herunterfahren des Terrassenrollos, nicht ausgeführt wird. Aber das schalten der Heizungen, z.B. auf "Auto" beim Status "home" dauert ewig, weil dabei Credits verbrannt werden ohne Ende. EventLog sagt:

2018-05-12 19:01:56 structure Heizungsventile desiredTemperature auto
2018-05-12 19:01:56 CUL CUL_0 credit10ms: 855
2018-05-12 19:01:56 MAX wz_wandthermostat desiredTemperature auto
2018-05-12 19:01:56 MAX az_thermostat desiredTemperature auto
2018-05-12 19:01:56 MAX gz_thermostat desiredTemperature auto
2018-05-12 19:01:56 MAX bz_thermostat desiredTemperature auto
2018-05-12 19:01:56 MAX ku_thermostat desiredTemperature auto
2018-05-12 19:01:56 MAX sz_thermostat desiredTemperature auto
2018-05-12 19:01:57 structure Heizungsventile undefined
2018-05-12 19:01:57 MAX wz_wandthermostat temperature: 23.5
2018-05-12 19:01:57 MAX wz_wandthermostat desiredTemperature: 22.0
2018-05-12 19:01:57 MAX wz_wandthermostat 22.0 °C
2018-05-12 19:01:57 MAX wz_wandthermostat RSSI: -70
2018-05-12 19:02:03 CUL CUL_0 credit10ms: 752
2018-05-12 19:02:04 MAX wz_thermostat mode: manual
2018-05-12 19:02:04 MAX wz_thermostat battery: ok
2018-05-12 19:02:04 MAX wz_thermostat desiredTemperature: 22.0
2018-05-12 19:02:04 MAX wz_thermostat valveposition: 0
2018-05-12 19:02:04 MAX wz_thermostat 22.0 °C
2018-05-12 19:02:04 MAX wz_thermostat RSSI: -78
2018-05-12 19:02:09 CUL CUL_0 credit10ms: 649
2018-05-12 19:02:10 structure Heizungsventile undefined
2018-05-12 19:02:10 MAX wz_wandthermostat mode: auto
2018-05-12 19:02:10 MAX wz_wandthermostat battery: ok
2018-05-12 19:02:10 MAX wz_wandthermostat displayActualTemperature: 1
2018-05-12 19:02:10 MAX wz_wandthermostat desiredTemperature: 22.0
2018-05-12 19:02:10 MAX wz_wandthermostat 22.0 °C
2018-05-12 19:02:10 MAX wz_wandthermostat RSSI: -70
2018-05-12 19:02:11 CUL CUL_0 credit10ms: 541
2018-05-12 19:02:12 structure Heizungsventile undefined
2018-05-12 19:02:12 MAX wz_wandthermostat mode: auto
2018-05-12 19:02:12 MAX wz_wandthermostat battery: ok
2018-05-12 19:02:12 MAX wz_wandthermostat displayActualTemperature: 1
2018-05-12 19:02:12 MAX wz_wandthermostat desiredTemperature: 22.0
2018-05-12 19:02:12 MAX wz_wandthermostat 22.0 °C
2018-05-12 19:02:12 MAX wz_wandthermostat RSSI: -70
2018-05-12 19:02:17 CUL CUL_0 credit10ms: 438
2018-05-12 19:02:18 structure Heizungsventile undefined
2018-05-12 19:02:18 MAX wz_wandthermostat mode: auto
2018-05-12 19:02:18 MAX wz_wandthermostat battery: ok
2018-05-12 19:02:18 MAX wz_wandthermostat displayActualTemperature: 1
2018-05-12 19:02:18 MAX wz_wandthermostat desiredTemperature: 22.0
2018-05-12 19:02:18 MAX wz_wandthermostat 22.0 °C
2018-05-12 19:02:18 MAX wz_wandthermostat RSSI: -70
2018-05-12 19:02:24 CUL CUL_0 credit10ms: 335
2018-05-12 19:02:25 structure Heizungsventile undefined
2018-05-12 19:02:25 MAX az_thermostat mode: auto
2018-05-12 19:02:25 MAX az_thermostat battery: ok
2018-05-12 19:02:25 MAX az_thermostat desiredTemperature: 22.0
2018-05-12 19:02:25 MAX az_thermostat valveposition: 15
2018-05-12 19:02:25 MAX az_thermostat 22.0 °C
2018-05-12 19:02:25 MAX az_thermostat RSSI: -41
2018-05-12 19:02:25 CUL CUL_0 credit10ms: 227
2018-05-12 19:02:32 CUL CUL_0 credit10ms: 124
2018-05-12 19:02:33 structure Heizungsventile undefined
2018-05-12 19:02:33 MAX az_thermostat mode: auto
2018-05-12 19:02:33 MAX az_thermostat battery: ok
2018-05-12 19:02:33 MAX az_thermostat desiredTemperature: 22.0
2018-05-12 19:02:33 MAX az_thermostat valveposition: 15
2018-05-12 19:02:33 MAX az_thermostat 22.0 °C
2018-05-12 19:02:33 MAX az_thermostat RSSI: -41
2018-05-12 19:02:38 CUL CUL_0 credit10ms: 21
2018-05-12 19:03:00 structure Heizungsventile undefined
2018-05-12 19:03:00 MAX az_thermostat mode: auto
2018-05-12 19:03:00 MAX az_thermostat battery: ok
2018-05-12 19:03:00 MAX az_thermostat desiredTemperature: 22.0
2018-05-12 19:03:00 MAX az_thermostat valveposition: 15
2018-05-12 19:03:00 MAX az_thermostat 22.0 °C
2018-05-12 19:03:00 MAX az_thermostat RSSI: -41
2018-05-12 19:03:00 structure Heizungsventile undefined
2018-05-12 19:03:00 MAX gz_thermostat mode: auto
2018-05-12 19:03:00 MAX gz_thermostat battery: ok
2018-05-12 19:03:00 MAX gz_thermostat desiredTemperature: 20.0
2018-05-12 19:03:00 MAX gz_thermostat valveposition: 0
2018-05-12 19:03:00 MAX gz_thermostat 20.0 °C
2018-05-12 19:03:00 MAX gz_thermostat RSSI: -77.5
2018-05-12 19:04:08 CUL CUL_0 credit10ms: 111
2018-05-12 19:04:10 structure Heizungsventile undefined
2018-05-12 19:04:10 MAX wz_wandthermostat temperature: 23.5
2018-05-12 19:04:10 MAX wz_wandthermostat desiredTemperature: 22.0
2018-05-12 19:04:10 MAX wz_wandthermostat 22.0 °C
2018-05-12 19:04:10 MAX wz_wandthermostat RSSI: -70
2018-05-12 19:04:15 CUL CUL_0 credit10ms: 8
2018-05-12 19:05:56 MAX wz_thermostat mode: manual
2018-05-12 19:05:56 MAX wz_thermostat battery: ok
2018-05-12 19:05:56 MAX wz_thermostat desiredTemperature: 22.0
2018-05-12 19:05:56 MAX wz_thermostat valveposition: 0
2018-05-12 19:05:56 MAX wz_thermostat 22.0 °C
2018-05-12 19:05:56 MAX wz_thermostat RSSI: -78
2018-05-12 19:05:57 structure Heizungsventile undefined
2018-05-12 19:05:57 MAX bz_thermostat mode: auto
2018-05-12 19:05:57 MAX bz_thermostat battery: ok
2018-05-12 19:05:57 MAX bz_thermostat desiredTemperature: 22.0
2018-05-12 19:05:57 MAX bz_thermostat valveposition: 8
2018-05-12 19:05:57 MAX bz_thermostat 22.0 °C
2018-05-12 19:05:57 MAX bz_thermostat RSSI: -65.5
2018-05-12 19:05:58 CUL CUL_0 credit10ms: 111
2018-05-12 19:05:59 structure Heizungsventile undefined
2018-05-12 19:05:59 MAX wz_wandthermostat temperature: 23.5
2018-05-12 19:05:59 MAX wz_wandthermostat desiredTemperature: 22.0
2018-05-12 19:05:59 MAX wz_wandthermostat 22.0 °C
2018-05-12 19:05:59 MAX wz_wandthermostat RSSI: -69.5
2018-05-12 19:06:04 CUL CUL_0 credit10ms: 8
2018-05-12 19:07:36 Global global ATTR wz_wandthermostat Heizungen Heizungsventile
2018-05-12 19:07:47 CUL CUL_0 credit10ms: 111
2018-05-12 19:07:49 MAX wz_thermostat mode: manual
2018-05-12 19:07:49 MAX wz_thermostat battery: ok
2018-05-12 19:07:49 MAX wz_thermostat desiredTemperature: 22.0
2018-05-12 19:07:49 MAX wz_thermostat valveposition: 0
2018-05-12 19:07:49 MAX wz_thermostat 22.0 °C
2018-05-12 19:07:49 MAX wz_thermostat RSSI: -74.5
2018-05-12 19:07:54 CUL CUL_0 credit10ms: 8
2018-05-12 19:08:49 structure Heizungsventile undefined
2018-05-12 19:08:50 MAX ku_thermostat mode: auto
2018-05-12 19:08:50 MAX ku_thermostat battery: ok
2018-05-12 19:08:50 MAX ku_thermostat desiredTemperature: 20.0
2018-05-12 19:08:50 MAX ku_thermostat valveposition: 0
2018-05-12 19:08:50 MAX ku_thermostat 20.0 °C
2018-05-12 19:08:50 MAX ku_thermostat RSSI: -72
2018-05-12 19:08:50 structure Heizungsventile undefined
2018-05-12 19:08:50 MAX ku_thermostat mode: auto
2018-05-12 19:08:50 MAX ku_thermostat battery: ok
2018-05-12 19:08:50 MAX ku_thermostat desiredTemperature: 20.0
2018-05-12 19:08:50 MAX ku_thermostat valveposition: 0
2018-05-12 19:08:50 MAX ku_thermostat 20.0 °C
2018-05-12 19:08:50 MAX ku_thermostat RSSI: -71.5
2018-05-12 19:08:52 Global global ATTR sz_thermostat Heizungen Heizungsventile
2018-05-12 19:09:02 Global global SAVE
2018-05-12 19:09:20 Global global ATTR ku_thermostat Heizungen Heizungsventile
2018-05-12 19:09:23 Global global SAVE
2018-05-12 19:09:35 Global global ATTR gz_thermostat Heizungen Heizungsventile
2018-05-12 19:09:37 CUL CUL_0 credit10ms: 111
2018-05-12 19:09:38 Global global SAVE
2018-05-12 19:09:38 structure Heizungsventile undefined
2018-05-12 19:09:38 MAX wz_wandthermostat temperature: 23.5
2018-05-12 19:09:38 MAX wz_wandthermostat desiredTemperature: 22.0
2018-05-12 19:09:38 MAX wz_wandthermostat 22.0 °C
2018-05-12 19:09:38 MAX wz_wandthermostat RSSI: -69
2018-05-12 19:09:43 CUL CUL_0 credit10ms: 8
2018-05-12 19:09:51 Global global ATTR bz_thermostat Heizungen Heizungsventile
2018-05-12 19:09:53 Global global SAVE
2018-05-12 19:11:26 CUL CUL_0 credit10ms: 111
2018-05-12 19:11:27 MAX wz_thermostat mode: manual
2018-05-12 19:11:27 MAX wz_thermostat battery: ok
2018-05-12 19:11:27 MAX wz_thermostat desiredTemperature: 22.0
2018-05-12 19:11:27 MAX wz_thermostat valveposition: 0
2018-05-12 19:11:27 MAX wz_thermostat 22.0 °C
2018-05-12 19:11:27 MAX wz_thermostat RSSI: -79.5
2018-05-12 19:11:33 CUL CUL_0 credit10ms: 8
2018-05-12 19:11:39 structure Heizungsventile undefined
2018-05-12 19:11:39 MAX sz_thermostat mode: auto
2018-05-12 19:11:39 MAX sz_thermostat battery: ok
2018-05-12 19:11:39 MAX sz_thermostat desiredTemperature: 12.0
2018-05-12 19:11:39 MAX sz_thermostat valveposition: 0
2018-05-12 19:11:39 MAX sz_thermostat 12.0 °C
2018-05-12 19:11:39 MAX sz_thermostat RSSI: -76.5
2018-05-12 19:11:39 structure Heizungsventile undefined
2018-05-12 19:11:39 MAX sz_thermostat mode: auto
2018-05-12 19:11:39 MAX sz_thermostat battery: ok
2018-05-12 19:11:39 MAX sz_thermostat desiredTemperature: 12.0
2018-05-12 19:11:39 MAX sz_thermostat valveposition: 0
2018-05-12 19:11:39 MAX sz_thermostat 12.0 °C
2018-05-12 19:11:39 MAX sz_thermostat RSSI: -77
2018-05-12 19:14:25 MAX wz_thermostat mode: manual
2018-05-12 19:14:25 MAX wz_thermostat battery: ok
2018-05-12 19:14:25 MAX wz_thermostat desiredTemperature: 22.0
2018-05-12 19:14:25 MAX wz_thermostat valveposition: 0
2018-05-12 19:14:25 MAX wz_thermostat 22.0 °C
2018-05-12 19:14:25 MAX wz_thermostat RSSI: -79
2018-05-12 19:14:25 HOMEMODE Home prevContactClosed: sz_fensterkontakt
2018-05-12 19:14:25 HOMEMODE Home lastContactClosed: az_fensterkontakt
2018-05-12 19:14:25 MAX az_fensterkontakt battery: ok
2018-05-12 19:14:25 MAX az_fensterkontakt onoff: 0
2018-05-12 19:14:25 MAX az_fensterkontakt closed
2018-05-12 19:14:25 MAX az_fensterkontakt RSSI: -37
2018-05-12 19:17:23 structure Heizungsventile undefined
2018-05-12 19:17:23 MAX wz_wandthermostat temperature: 23.5
2018-05-12 19:17:23 MAX wz_wandthermostat desiredTemperature: 22.0
2018-05-12 19:17:23 MAX wz_wandthermostat 22.0 °C
2018-05-12 19:17:23 MAX wz_wandthermostat RSSI: -69.5
2018-05-12 19:17:23 MAX wz_thermostat mode: manual
2018-05-12 19:17:23 MAX wz_thermostat battery: ok
2018-05-12 19:17:23 MAX wz_thermostat desiredTemperature: 22.0
2018-05-12 19:17:23 MAX wz_thermostat valveposition: 0
2018-05-12 19:17:23 MAX wz_thermostat 22.0 °C
2018-05-12 19:17:23 MAX wz_thermostat RSSI: -80
2018-05-12 19:20:18 structure Heizungsventile undefined
2018-05-12 19:20:18 MAX wz_wandthermostat temperature: 23.5
2018-05-12 19:20:18 MAX wz_wandthermostat desiredTemperature: 22.0
2018-05-12 19:20:18 MAX wz_wandthermostat 22.0 °C
2018-05-12 19:20:18 MAX wz_wandthermostat RSSI: -70
2018-05-12 19:20:18 MAX wz_thermostat mode: manual
2018-05-12 19:20:18 MAX wz_thermostat battery: ok
2018-05-12 19:20:18 MAX wz_thermostat desiredTemperature: 22.0
2018-05-12 19:20:18 MAX wz_thermostat valveposition: 0
2018-05-12 19:20:18 MAX wz_thermostat 22.0 °C
2018-05-12 19:20:18 MAX wz_thermostat RSSI: -78.5
2018-05-12 19:23:09 structure Heizungsventile undefined
2018-05-12 19:23:09 MAX wz_wandthermostat temperature: 23.5
2018-05-12 19:23:09 MAX wz_wandthermostat desiredTemperature: 22.0
2018-05-12 19:23:09 MAX wz_wandthermostat 22.0 °C
2018-05-12 19:23:09 MAX wz_wandthermostat RSSI: -68.5
2018-05-12 19:23:09 MAX wz_thermostat mode: manual
2018-05-12 19:23:09 MAX wz_thermostat battery: ok
2018-05-12 19:23:09 MAX wz_thermostat desiredTemperature: 22.0
2018-05-12 19:23:09 MAX wz_thermostat valveposition: 0
2018-05-12 19:23:09 MAX wz_thermostat 22.0 °C
2018-05-12 19:23:09 MAX wz_thermostat RSSI: -79
2018-05-12 19:25:56 MAX wz_wandthermostat temperature: 23.5
2018-05-12 19:25:56 MAX wz_wandthermostat desiredTemperature: 22.0
2018-05-12 19:25:56 MAX wz_wandthermostat 22.0 °C
2018-05-12 19:25:56 MAX wz_wandthermostat RSSI: -69.5
2018-05-12 19:25:56 MAX wz_thermostat mode: manual
2018-05-12 19:25:56 MAX wz_thermostat battery: ok
2018-05-12 19:25:56 MAX wz_thermostat desiredTemperature: 22.0
2018-05-12 19:25:56 MAX wz_thermostat valveposition: 0
2018-05-12 19:25:56 MAX wz_thermostat 22.0 °C
2018-05-12 19:25:56 MAX wz_thermostat RSSI: -79.5
2018-05-12 19:28:56 structure Heizungsventile undefined
2018-05-12 19:28:56 MAX wz_wandthermostat temperature: 23.5
2018-05-12 19:28:56 MAX wz_wandthermostat desiredTemperature: 22.0
2018-05-12 19:28:56 MAX wz_wandthermostat 22.0 °C
2018-05-12 19:28:56 MAX wz_wandthermostat RSSI: -70
2018-05-12 19:28:56 MAX wz_thermostat mode: manual
2018-05-12 19:28:56 MAX wz_thermostat battery: ok
2018-05-12 19:28:56 MAX wz_thermostat desiredTemperature: 22.0
2018-05-12 19:28:56 MAX wz_thermostat valveposition: 0
2018-05-12 19:28:56 MAX wz_thermostat 22.0 °C
2018-05-12 19:28:56 MAX wz_thermostat RSSI: -79.5



Also irgendwie zu viel Traffic, imo. Gehört das so oder habe ich was falsch gemacht/gedacht oder übersehen? Kann man das besser lösen?

Vielen lieben Dank im Voraus an den oder die, die sich meiner erbarmen. ;)

Gruß
Micha