Modul weekprofile + FHEMWEB widget

Begonnen von Risiko, 23 Dezember 2015, 20:16:54

Vorheriges Thema - Nächstes Thema

Risiko

Habe es so übernommen und eingecheckt.



omnior

Ich habe noch ein Verständnisproblem mit tempMap.
die über das Attribut eingestellten Mappings werden irgendwie nicht zuverlässig übernommen und teilweise lassen sich auch Texte (wie zum Beispiel "tmHeating") manchmal im Weekprofile nicht abspeichern, es erfolgt dann die Meldung: Error parsing profile data. No valid json format
Gibt es hier nur bestimmte keywords die erlaubt sind?
Ich habe nach vielen Versuchen aktuell mit tempMap zwei Mappings eingestellt:
attr weekprofile_Konoba tempMap off:5.0,on:5.5 trotzdem erscheint in der Auswahl im default Profil bei 5.0 und 5.5 ein tmOff und tmHeating (anstatt off und on)
Beides sind Textwerte die ich irgendwann vorher mal ausprobiert habe, die anscheinend aber noch irgendwo gespeichert bleiben. Wie kann man diese Tabelle einmal komplett löschen oder gibt es einen anderen Grund warum diese Zuordnung nicht überschrieben wird wenn das Attribut tempMap neu gesetzt wird?

Hier noch ein List meines weekprofiles:
Internals:
   CFGFN     
   CONFIGFILE ./log/weekprofile-weekprofile_Konoba.cfg
   DEF        Timer_HZ_Konobat
   FUUID      63b923d1-f33f-5aeb-707d-4fef4ee60d4560c8
   NAME       weekprofile_Konoba
   NR         2492
   NTFY_ORDER 50-weekprofile_Konoba
   STATE      created
   TYPE       weekprofile
   eventCount 60
   MASTERDEV:
     NAME       Timer_HZ_Konobat
   PROFILES:
     HASH(0x4412a90)
   READINGS:
     2023-01-07 09:55:09   profile_count   2
     2023-01-07 08:48:33   state           created
   SNDDEVLIST:
     HASH(0x45510a0)
   TEMPMAP:
      tmHeating 5.5
     5.0        0.0
     5.5        0.0
     EnergySaveHeating 0.0
     Heating    5.5
     off        5.0
     on         5.5
     ot         5.5
     tmEnergySaveHeating 5.0
     tmHeating  5.5
     tmOff      5.0
     tmoff      5.0
     tmon       5.5
   TOPICS:
     default
Attributes:
   room       Heizung,Konoba
   sendKeywordsToDevices 1
   tempMap    off:5.0,on:5.5
   widgetTempRange 5:28:0.5
   widgetWeekdays Montag, Dienstag, Mittwoch, Donnerstag, Freitag, Samstag, Sonntag

Risiko

Zitat von: omnior am 07 Januar 2023, 13:13:40
attr weekprofile_Konoba tempMap off:5.0,on:5.5 trotzdem erscheint in der Auswahl im default Profil bei 5.0 und 5.5 ein tmOff und tmHeating (anstatt off und on)

Da hast du einen Fehler gefunden. Gerade behoben.
Da hilft aktuell nur ein Neustart von FHEM.

hanswerner1

Hallo,

seit einiger Zeit habe ich folgende Fehlermeldung im LOG:


2023.01.09 11:40:53 3: WARNING master device Wandthermostat_Buero_Climate has no week profile - create default
2023.01.09 11:40:56 3: WARNING master device Wandthermostat_GaesteWC_Climate has no week profile - create default
2023.01.09 11:40:59 3: WARNING master device Wandthermostat_Flur_Climate has no week profile - create default
2023.01.09 11:41:53 3: WARNING master device Wandthermostat_Ankleidezimmer_Climate has no week profile - create default
2023.01.09 11:42:17 3: WARNING master device Wandthermostat_Dachgeschoss_Climate has no week profile - create default
2023.01.09 11:42:23 3: WARNING master device Wandthermostat_Bad_Climate has no week profile - create default
2023.01.09 11:42:30 3: WARNING master device Wandthermostat_Wohnzimmer_Climate has no week profile - create default
2023.01.09 11:42:39 3: WARNING master device Wandthermostat_Kueche_Climate has no week profile - create default
2023.01.09 11:43:09 3: WARNING master device Wandthermostat_GaesteWC_Climate has no week profile - create default
2023.01.09 11:43:12 3: WARNING master device Wandthermostat_Schlafzimmer_Climate has no week profile - create default
2023.01.09 11:43:40 3: WARNING master device Wandthermostat_Flur_Climate has no week profile - create default
2023.01.09 11:43:42 3: WARNING master device Wandthermostat_Buero_Climate has no week profile - create default
2023.01.09 11:44:05 3: WARNING master device Wandthermostat_Ankleidezimmer_Climate has no week profile - create default
2023.01.09 11:44:46 3: WARNING master device Wandthermostat_Kueche_Climate has no week profile - create default
2023.01.09 11:45:02 3: WARNING master device Wandthermostat_Bad_Climate has no week profile - create default
2023.01.09 11:45:09 3: WARNING master device Wandthermostat_Wohnzimmer_Climate has no week profile - create default
2023.01.09 11:45:16 3: WARNING master device Wandthermostat_Dachgeschoss_Climate has no week profile - create default


Ich habe mehrere HM-TC-IT-WM-W-EU Wandthermostate, bei allen wird der Master nicht ausgelesen, ich habe auch ein HM-CC-RT-DN ohne Wandthermostat, hier wird der Master ausgelesen.

Habt Ihr eine Idee wo der Fehler sein kann ?



Internals:
   CONFIGFILE ./log/weekprofile-Heizprofil_Ankleidezimmer.cfg
   DEF        Wandthermostat_Ankleidezimmer_Climate
   FUUID      5c4d5af5-f33f-8133-fdc5-cc0fb603261e3e86
   NAME       Heizprofil_Ankleidezimmer
   NR         238
   NTFY_ORDER 50-Heizprofil_Ankleidezimmer
   STATE      assigned
   TYPE       weekprofile
   eventCount 32
   MASTERDEV:
     NAME       Wandthermostat_Ankleidezimmer_Climate
     TYPE       CUL_HM
   PROFILES:
     HASH(0x5599072748)
     HASH(0x5597796728)
     HASH(0x5597795bc0)
   READINGS:
     2023-01-09 11:59:46   profile_count   3
     2023-01-09 10:40:28   state           assigned
   SNDDEVLIST:
     HASH(0x55989fdfb8)
     HASH(0x5598d298b8)
     HASH(0x5598a1e0d0)
     HASH(0x5598818198)
     HASH(0x5598c28608)
     HASH(0x5598db0430)
     HASH(0x559939e098)
     HASH(0x5597281668)
     HASH(0x559885d5c8)
     HASH(0x5598d01f90)
     HASH(0x5598ec7d08)
     HASH(0x5599037980)
     HASH(0x55989044c8)
     HASH(0x5598cbc648)
     HASH(0x5598d58208)
     HASH(0x5598d8d4b0)
     HASH(0x559a650d10)
     HASH(0x559a0cf428)
     HASH(0x5598eb61e0)
     HASH(0x559889fdd8)
     HASH(0x5598858330)
     HASH(0x559a618560)
     HASH(0x55989c6210)
     HASH(0x5599189448)
     HASH(0x5598bed550)
     HASH(0x55988dac60)
     HASH(0x5598a068f8)
     HASH(0x5598b84788)
     HASH(0x5598be2900)
     HASH(0x5598cb6a38)
     HASH(0x5598cdd2f0)
     HASH(0x5598dad410)
   TEMPMAP:
   TOPICS:
     default
Attributes:
   alias      Heizprofil_Ankleidezimmer
   room       80_Heizung


omnior

Zitat von: Risiko am 08 Januar 2023, 19:54:01
Da hast du einen Fehler gefunden. Gerade behoben.
Da hilft aktuell nur ein Neustart von FHEM.

Jetzt ist mir noch etwas aufgefallen:
Ich stelle mein weekprofile auf topics und benutze aber im Moment nur default:default.
Wenn ich nun ein Profil speichere und dann versuche zu übertragen mit:
set weekprofile_Gartenblick send_to_device default:default WDT_Gartenblick, erhalte ich folgende Fehlermeldung:
no valid switchingtime found in <>, check parameters or make sure weekprofile device exists and returns valid data.
Danach ist die Definition meiner Zeiten im weekprofile verschwunden, es ist kein Klick mehr auf die Zahnräder möglich und es erscheint dort beim Klicken die Meldung: fhemweb_weekprofile.js line 559:
Uncaught TypeError: Cannot read properties of undefined (reading 'time')


Was mache ich noch falsch?

Hier das List des weekprofiles:
Internals:
   CONFIGFILE ./log/weekprofile-weekprofile_Gartenblick.cfg
   DEF        WDT_Gartenblick
   FUUID      63bbb03d-f33f-5aeb-73a9-56d812480dd7c5e3
   NAME       weekprofile_Gartenblick
   NR         294
   NTFY_ORDER 50-weekprofile_Gartenblick
   STATE      created
   TYPE       weekprofile
   eventCount 10
   MASTERDEV:
     NAME       WDT_Gartenblick
   PROFILES:
     HASH(0x356f948)
   READINGS:
     2023-01-09 13:00:46   active_topic    default
     2023-01-09 14:13:29   profile_count   1
     2023-01-09 14:11:28   state           created
     2023-01-09 14:13:29   topics          default
   SNDDEVLIST:
     HASH(0x3816ec8)
     HASH(0x3819c70)
     HASH(0x381f138)
   TEMPMAP:
     boost      7.0
     heat       6.0
     off        4.0
     save       5.0
   TOPICS:
     default
Attributes:
   forceCompleteProfile 0
   sendKeywordsToDevices 1
   tempMap    off:4.0,save:5.0,heat:6.0,boost:7.0
   useTopics  1
   userattr   weekprofile
   widgetTempRange 4:28:1
   widgetWeekdays Montag, Dienstag, Mittwoch, Donnerstag, Freitag, Samstag, Sonntag


und hier der weekdayTimer:
Internals:
   COMMAND   
   CONDITION 
   DEF        ZWave_THERMOSTAT_40 weekprofile:weekprofile_Gartenblick
   DEVICE     ZWave_THERMOSTAT_40
   FUUID      63bb282c-f33f-5aeb-bd2d-f114692630826baf
   GlobalDaylistSpec
   LANGUAGE   en
   NAME       WDT_Gartenblick
   NR         293
   Profil 0: Sunday 00:10:00 18.0,
   Profil 1: Monday 00:10:00 18.0,
   Profil 2: Tuesday 00:10:00 18.0,
   Profil 3: Wednesday 00:10:00 18.0,
   Profil 4: Thursday 00:10:00 18.0,
   Profil 5: Friday 00:10:00 18.0,
   Profil 6: Saturday 00:10:00 18.0,
   STATE      18.0
   STILLDONETIME 0
   TYPE       WeekdayTimer
   eventCount 6
   setModifier desired-temp
   READINGS:
     2023-01-09 14:02:46   currValue       18.0
     2023-01-09 12:29:46   disabled        0
     2023-01-09 14:02:46   nextUpdate      2023-01-10 00:10:00
     2023-01-09 14:02:46   nextValue       18.0
     2023-01-09 14:02:46   state           18.0
     2023-01-09 14:19:55   weekprofiles    weekprofile_Gartenblick:default:default
   SWITCHINGTIMES:
   TIMER:
     WDT_Gartenblick_midnight:
       HASH       WDT_Gartenblick
       MODIFIER   midnight
       NAME       WDT_Gartenblick_midnight
       SETTIMERATMIDNIGHT 1
   WDT_EVENTMAP:
     10.0       desired-temp 10.0
     11.0       desired-temp 11.0
     12.0       desired-temp 12.0
     13.0       desired-temp 13.0
     14.0       desired-temp 14.0
     15.0       desired-temp 15.0
     16.0       desired-temp 16.0
     17.0       desired-temp 17.0
     18.0       desired-temp 18.0
     19.0       desired-temp 19.0
     20.0       desired-temp 20.0
     21.0       desired-temp 21.0
     22.0       desired-temp 22.0
     23.0       desired-temp 23.0
     24.0       desired-temp 24.0
     8.0        desired-temp 8.0
     9.0        desired-temp 9.0
     boost      thermostate FullPower
     heat       thermostate Heating
     off        thermostate Off
     save       thermostate EnergySaveHeating
   helper:
     daysRegExp (su|mo|tu|we|th|fr|sa|\$we|\!\$we)
     daysRegExpMessage (su|mo|tu|we|th|fr|sa|$we|!$we)
     SWITCHINGTIME:
     WEDAYS:
       5          1
       6          1
   profil:
   profile_IDX:
     0:
       00:10:00   4
     1:
       00:10:00   2
     2:
       00:10:00   6
     3:
       00:10:00   7
     4:
       00:10:00   5
     5:
       00:10:00   1
     6:
       00:10:00   3
   weekprofiles:
     weekprofile_Gartenblick:
       PROFILE    default:default
       PROFILE_JSON {"Fri":{"temp":["18.0"],"time":["24:00"]},"Sun":{"temp":["18.0"],"time":["24:00"]},"Tue":{"time":["24:00"],"temp":["18.0"]},"Sat":{"temp":["18.0"],"time":["24:00"]},"Mon":{"temp":["18.0"],"time":["24:00"]},"Thu":{"temp":["18.0"],"time":["24:00"]},"Wed":{"time":["24:00"],"temp":["18.0"]}}
       SunAsWE    0
       PROFILE_DATA:
         Fri:
           temp:
             18.0
           time:
             24:00
         Mon:
           temp:
             18.0
           time:
             24:00
         Sat:
           temp:
             18.0
           time:
             24:00
         Sun:
           temp:
             18.0
           time:
             24:00
         Thu:
           temp:
             18.0
           time:
             24:00
         Tue:
           temp:
             18.0
           time:
             24:00
         Wed:
           temp:
             18.0
           time:
             24:00
Attributes:
   WDT_eventMap off:thermostate+Off
save:thermostate+EnergySaveHeating
heat:thermostate+Heating
boost:thermostate+FullPower
8.0:desired-temp+8.0
9.0:desired-temp+9.0
10.0:desired-temp+10.0
11.0:desired-temp+11.0
12.0:desired-temp+12.0
13.0:desired-temp+13.0
14.0:desired-temp+14.0
15.0:desired-temp+15.0
16.0:desired-temp+16.0
17.0:desired-temp+17.0
18.0:desired-temp+18.0
19.0:desired-temp+19.0
20.0:desired-temp+20.0
21.0:desired-temp+21.0
22.0:desired-temp+22.0
23.0:desired-temp+23.0
24.0:desired-temp+24.0


   commandTemplate set $NAME $EVENT;get $NAME thermostatMode;get $NAME setpoint 1
   disable    0
   userattr   weekprofile
   weekprofile weekproilfe_Gartenblick

mirror

Ich habe ein Thermostat mit folgender definition:
Internals:
   CID        wthermostat_3343395
   DEF        wthermostat_3343395
   FUUID      63ba976e-f33f-333b-77ce-6b01a9f74ecc3359
   IODev      myBroker
   LASTInputDev myBroker
   MSGCNT     72
   NAME       Thermostat_JulZi
   NR         379
   STATE      on
   TYPE       MQTT2_DEVICE
   eventCount 32
   myBroker_CONN myBroker_IP_61275
   myBroker_MSGCNT 72
   myBroker_TIME 2023-01-11 12:23:23
   JSONMAP:
     targetTemperature 0
   READINGS:
     2023-01-11 12:19:01   IODev           myBroker
     2023-01-11 12:19:23   LWT             Online
     2023-01-10 19:38:56   a1h             06:00
     2023-01-10 19:38:56   a1t             20.00
     2023-01-10 19:38:56   a2h             08:00
     2023-01-10 19:38:56   a2t             21.00
     2023-01-10 19:38:56   a3h             11:30
     2023-01-10 19:38:56   a3t             22.00
     2023-01-10 19:38:56   a4h             13:30
     2023-01-10 19:38:56   a4t             22.00
     2023-01-10 19:38:56   a5h             17:00
     2023-01-10 19:38:56   a5t             22.00
     2023-01-10 19:38:56   a6h             22:00
     2023-01-10 19:38:56   a6t             15.00
     2023-01-11 12:22:52   action          heating
     2023-01-09 19:36:16   attrTemplateVersion 20220108
     2023-01-11 12:20:00   clock_epochTime 1673436000
     2023-01-11 12:20:00   clock_epochTimeLocalFormatted 2023-01-11 12:20:00
     2023-01-11 12:20:00   clock_ntpServer pool.ntp.org
     2023-01-11 12:20:00   clock_offset    3600
     2023-01-11 12:20:00   clock_timeDST   0,3,0,2,120
     2023-01-11 12:20:00   clock_timeSTD   0,10,0,3,60
     2023-01-11 12:20:00   clock_timeZone  99
     2023-01-11 12:20:00   clock_uptime    71437
     2023-01-11 12:20:00   clock_validTime true
     2023-01-11 06:55:25   desired-temp    23.00
     2023-01-11 12:22:51   deviceOn        true
     2023-01-11 12:22:51   ecoMode         false
     2023-01-11 12:22:51   firmware        v1.22-fas
     2023-01-11 12:22:51   holdState       manual
     2023-01-11 12:22:51   idx             Thermostat_JulZi
     2023-01-11 12:22:51   ip              IP
     2023-01-11 12:22:52   locked          false
     2023-01-10 11:58:42   log             warning: NTP sync failed.
     2023-01-11 12:20:00   log_logLevel    trace
     2023-01-11 12:22:52   mcuId           IAYz2WK1th0cMLmL1.0.0
     2023-01-11 12:22:52   mode            heat
     2023-01-11 12:23:23   net_rssi        -75
     2023-01-11 12:22:52   preset          none
     2023-01-11 12:22:51   schedulesMode   off
     2023-01-11 12:22:52   state           on
     2023-01-11 12:22:51   switchBackToAuto false
     2023-01-11 12:22:51   targetTemperature 23.00
     2023-01-11 12:19:51   temp_mean       22.50
     2023-01-11 12:22:51   temperature     22.50
     2023-01-10 19:38:56   u1h             06:00
     2023-01-10 19:38:56   u1t             20.00
     2023-01-10 19:38:56   u2h             08:00
     2023-01-10 19:38:56   u2t             21.00
     2023-01-10 19:38:56   u3h             11:30
     2023-01-10 19:38:56   u3t             22.00
     2023-01-10 19:38:56   u4h             13:30
     2023-01-10 19:38:56   u4t             22.00
     2023-01-10 19:38:56   u5h             17:00
     2023-01-10 19:38:56   u5t             22.00
     2023-01-10 19:38:56   u6h             22:00
     2023-01-10 19:38:56   u6t             15.00
     2023-01-10 19:38:56   w1h             06:00
     2023-01-10 19:38:56   w1t             20.00
     2023-01-10 19:38:56   w2h             08:00
     2023-01-10 19:38:56   w2t             21.00
     2023-01-10 19:38:56   w3h             11:30
     2023-01-10 19:38:56   w3t             22.00
     2023-01-10 19:38:56   w4h             13:30
     2023-01-10 19:38:56   w4t             21.00
     2023-01-10 19:38:56   w5h             17:00
     2023-01-10 19:38:56   w5t             22.00
     2023-01-10 19:38:56   w6h             22:00
     2023-01-10 19:38:56   w6t             15.00
Attributes:
   devStateIcon <a href="http://ip" target="_blank">
LWT
</a>
state
   event-min-interval .*:300
   event-on-change-reading .*
   getList    desired-temp:noArg desired-temp Thermostat_JulZi/cmnd/things/thermostat/properties/targetTemperature
   icon       hm-tc-it-wm-w-eu
   jsonMap    targetTemperature:0
   model      WThermostatBHT002
   readingList Thermostat_JulZi/tele/LWT:.* LWT
  devices/(network|clock|thermostat|logging):.* {}
  Thermostat_JulZi/stat/things/network/properties:.* { json2nameValue($EVENT,'net_',$JSONMAP) }
  Thermostat_JulZi/stat/things/thermostat/properties:.* { $EVENT =~ s/true/"on"/g;; $EVENT =~ s/false/"off"/g;; json2nameValue($EVENT,'',$JSONMAP) }
  Thermostat_JulZi/stat/things/logging/properties:.* { json2nameValue($EVENT,'log_',$JSONMAP) }
  Thermostat_JulZi/stat/things/clock/properties:.* { json2nameValue($EVENT,'clock_',$JSONMAP) }
  Thermostat_JulZi/stat/things/thermostat/targetTemperature:.* desired-temp
  Thermostat_JulZi/stat/things/thermostat/properties/state:.* {{state => $EVENT eq 'heating' ? 'on' : 'off'}}

wthermostat_3343395:Thermostat_JulZi/tele/log:.* log
wthermostat_3343395:Thermostat_JulZi/stat/things/thermostat/schedules:.* { json2nameValue($EVENT) }
   room       MQTT2_DEVICE
   setList    on:noArg Thermostat_JulZi/cmnd/things/thermostat/properties/deviceOn true
  off:noArg Thermostat_JulZi/cmnd/things/thermostat/properties/deviceOn false
  desired-temp:slider,5.0,0.5,35.0,1 Thermostat_JulZi/cmnd/things/thermostat/properties/targetTemperature $EVTPART1
  mode:heat,auto,off Thermostat_JulZi/cmnd/things/thermostat/properties/mode $EVTPART1
  weekprofile { FHEM::attrT_z2m_thermostat_Utils::z2t_send_Beca_weekprofile($NAME, $EVTPART1, $EVTPART2, 'Thermostat_JulZi/cmnd/things/thermostat/schedules') }
  x_send_mcucommand:textField { my $payload = $EVENT;$payload =~ s/$EVTPART0 //g; qq(Thermostat_JulZi/cmnd/things/thermostat/mcucommand $payload)}
   setStateList on off weekprofile
   userReadings temp_mean:temperature:.* {ReadingsVal($name,"temperature",0)}
   userattr   weekprofile
   webCmd     mode:desired-temp
   weekprofile Thermostat_JulZi_Plan


Jetzt habe ich mal versucht ein Modul weekprofile anzulegen:
Internals:
   CONFIGFILE ./log/weekprofile-Thermostat_JulZi_WEEKPROFILE.cfg
   DEF        Thermostat_JulZi
   FUUID      63be9b14-f33f-333b-2d28-b8321ab4ac94c3c9
   NAME       Thermostat_JulZi_WEEKPROFILE
   NR         381
   NTFY_ORDER 50-Thermostat_JulZi_WEEKPROFILE
   STATE      created
   TYPE       weekprofile
   eventCount 68
   MASTERDEV:
     NAME       Thermostat_JulZi
   PROFILES:
     HASH(0x32fd360)
   READINGS:
     2023-01-11 12:27:53   profile_count   1
     2023-01-11 12:19:01   state           created
   SNDDEVLIST:
     HASH(0x2b26ba8)
   TEMPMAP:
   TOPICS:
     default
Attributes:


Im logfile erscheint immer die Meldung:
Thermostat_JulZi_WEEKPROFILE(assignDev): device Thermostat_JulZi not supported or defined

Meine Frage ist: Was ist die Ursache? Das Gerät ist defined und hat Attribute und userattr. Welches Kriterium muß vorhanden sein für den Support für das weekprofile Module?


Beta-User

Hast du FHEM nach Anlage des Attributs mal neu gestartet? (oder die DEF des weekprofile angefasst?)
Server: HP-T620@Debian 11, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

mirror

Verstehe jetzt nicht ganz die Frage. Sollte ich neu starten? Nach welchem Schritt?
Jetz habe ich mal das weekprofile device gelöscht und neu gestartet:
2023.01.11 17:46:35 0: Server shutdown
2023.01.11 17:46:37 1: Including fhem.cfg
2023.01.11 17:46:37 3: telnetPort: port 7072 opened
2023.01.11 17:46:37 3: WEB: port 8083 opened
2023.01.11 17:46:37 3: WEBphone: port 8084 opened
2023.01.11 17:46:37 3: WEBtablet: port 8085 opened
2023.01.11 17:46:37 2: eventTypes: loaded 1181 lines from ./log/eventTypes.txt
2023.01.11 17:46:42 3: Opening EBUS device IP:PORT
2023.01.11 17:46:42 3: EBUS device opened
2023.01.11 17:46:43 3: tablet_ui: new ext defined infix:ftui/: dir:./www/tablet:
2023.01.11 17:46:43 3: Registering HTTPSRV tablet_ui for URL /ftui   and assigned link ftui/ ...
2023.01.11 17:46:43 3: Opening myDuoFernStick device /dev/ttyUSB0
2023.01.11 17:46:43 3: Setting myDuoFernStick serial parameters to 115200,8,N,1
2023.01.11 17:46:43 3: myDuoFernStick device opened
2023.01.11 17:46:44 3: FUIP: Registering ui for URL /ui
2023.01.11 17:46:44 3: myBroker: port 1883 opened
2023.01.11 17:46:44 1: Including ./log/fhem.save
2023.01.11 17:46:44 3: ESPEasy ESPBridge: Bridge v2.18 port [TCP:IPV4:8383] opened.
2023.01.11 17:46:44 0: Featurelevel: 6.1
2023.01.11 17:46:44 0: Server started with 154 defined entities (fhem.pl:26868/2022-12-18 perl:5.028001 os:linux user:fhem pid:13614)


Dann habe ich weekprofile neu angelegt - log:
2023.01.11 17:48:55 2: Thermostat_JulZi_WEEKPROFILE(assignDev): device Thermostat_JulZi not supported or defined


Nach Anlegen erscheint die Tabelle ganz kurz, dann kommt ein profile_count = 1 Reading in weekprofile und die Wochentabelle verschwindet.

Jetzt weiß ich nicht weiter, vermute weekprofile muß sich vom Thermostat die Information holen wie die timeslots aussehen. Und das kommt nicht. Weil keine entsprechende get Funktion im Thermostat Modul vorhanden ist. Wir habe ja nur die Schreibfkt. in 99_attrT_z2m_thermostat_Utils.pm. Alles nur Vermutung!

Beta-User

Ah, ok, jetzt verstehe ich die Frage: Man kann ein Device vom TYPE MQTT2_DEVICE nicht als Masterdevice verwenden. Zitat aus der commandref:
ZitatHinweis: Geräte des Typs WeekdayTimer und MQTT2_DEVICE können nicht als 'Master-Gerät' verwendet werden.

Und ja, das liegt daran, dass man (jedenfalls nicht ohne weiteres) die Profile nicht abfragen kann.
Server: HP-T620@Debian 11, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

mirror

OK, geht nicht. Seltsam - die Profile (topic, timeslots und Namen) der beiden Geräte sind ja bekannt. Ich habe auch schon mit mosquitto tools abgefragt und gesetzt.

Beta-User

Zitat von: mirror am 12 Januar 2023, 08:17:44
OK, geht nicht. Seltsam - die Profile (topic, timeslots und Namen) der beiden Geräte sind ja bekannt. Ich habe auch schon mit mosquitto tools abgefragt und gesetzt.
Finde ich nur bedingt seltsam: Man müßte vermutlich im Code nachschauen, aber da dürfte irgendeine Art Abfrage an die jeweilige "master"-Modul-Instanz stattfinden, die eine genau definierte Rückmeldung erwartet. Jedenfalls solange es diese nicht gibt, ist es für diese beiden Module eben "one way", also weekprofile=>MQTT2_DEVICE (bzw. WeekdayTimer). Finde ich aber nicht schlimm, weil man eigentlich die Profile sowieso einfacher mit weekprofile editiert, und wenn man Topics nutzt (und nicht für jedes Einzeldevice eine eigene weekprofile-Instanz anlegt), geht das auch super-easy... (Man kann afaik aber auch von weekprofile zu weekprofile transferieren).
Server: HP-T620@Debian 11, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

mirror

Wir meinen wahrscheinlich das Gleiche - aber drücken uns nur anders aus.

Der entscheidende Hinweis aus diesem thread war Antwort #330 einfach das Modul weekprofile ohne device aufrufen und dann mit send_to_device ein Profil hinschicken. Dank Deiner Transferfunktion aus 99_attrT_z2m_thermostat_Utils.pm klappt das wunderbar. Nur ein timeslot shift um +1 ist noch drin. Vielleicht krieg ich das noch hin. Nach gleichem Schema werde ich den anderen Thermostaten ME81AH (8 timeslots) auch noch mit weekprofile versorgen.

Interesse das in Deiner template lib mit aufzunehmen?