diff --git a/fhem/CHANGED b/fhem/CHANGED index 102c69a11..954bd5f6c 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - feature: 98_weekprofile: add support for MQTT2_DEVICE (txl Beta-User) - feature: 89_FULLY: Added support for sensor information - bugfix: 98_weekprofile: HMCCU-HM send profile without prefix (Forum #1104569) - bugfix: 70_DENON_AVR: serial connection issues diff --git a/fhem/FHEM/98_weekprofile.pm b/fhem/FHEM/98_weekprofile.pm index bc5855dd3..5011e3972 100644 --- a/fhem/FHEM/98_weekprofile.pm +++ b/fhem/FHEM/98_weekprofile.pm @@ -26,7 +26,7 @@ my @shortDays = ("Mon","Tue","Wed","Thu","Fri","Sat","Sun"); my %LAST_SEND; -my @DEVLIST_SEND = ("MAX","CUL_HM","HMCCUDEV","weekprofile","dummyWT","WeekdayTimer"); +my @DEVLIST_SEND = ("MAX","CUL_HM","HMCCUDEV","weekprofile","dummyWT","WeekdayTimer","MQTT2_DEVICE"); my $CONFIG_VERSION = "1.1"; @@ -203,6 +203,16 @@ sub weekprofile_getDeviceType($$;$) Log3 $me, 4, "$me(getDeviceType): found WDT but not configured for weekprofile"; } } + elsif ($devType eq 'MQTT2_DEVICE'){ + my $attr = AttrVal($device,'weekprofile',''); + Log3 $me, 5, "$me(getDeviceType): attr MQTT2_DEVICE $attr"; + if ($attr ne "") { + $type = "MQTT2_DEVICE"; + } + else { + Log3 $me, 4, "$me(getDeviceType): found MQTT2_DEVICE but not configured for weekprofile"; + } + } if (defined($type)) { Log3 $me, 4, "$me(getDeviceType): $devHash->{NAME} is type $type"; @@ -392,6 +402,11 @@ sub weekprofile_sendDevProfile(@) Log3 $me, 4, "$me(sendDevProfile): send to WDT $cmd"; return fhem("$cmd",1); } + elsif ($type eq "MQTT2_DEVICE") { + my $cmd = "set $device weekprofile $me $prf->{TOPIC}:$prf->{NAME}"; + Log3 $me, 4, "$me(sendDevProfile): send to MQTT2_DEVICE $cmd"; + return fhem("$cmd",1); + } my $devPrf = weekprofile_readDevProfile($device,$type,$me); @@ -1640,13 +1655,21 @@ sub weekprofile_getEditLNK_MasterDev($$) Currently the following devices will by supported:
  • MAX
  • other weekprofile modules
  • -
  • Homatic channel _Clima or _Climate
  • +
  • Homematic channel _Clima or _Climate
  • +
  • Homematic via HMCCU and HM-IP)
  • +
    + Additionally, also the following module types can be used as logical intermediates
    +
  • WeekdayTimer
  • +
  • MQTT2_DEVICE
  • +
    In the normal case the module is assoziated with a master device. So a profile 'master' will be created automatically. This profile corrensponds to the current active profile on the master device. You can also use this module without a master device. In this case a default profile will be created. -
    +

    + Note: WeekdayTimer and MQTT2_DEVICE TYPE devices can not be used as 'master'. +

    An other use case is the usage of categories 'Topics'. To enable the feature the attribute 'useTopics' have to be set. Topics are e.q. winter, summer, holidays, party, and so on. @@ -1823,18 +1846,26 @@ sub weekprofile_getEditLNK_MasterDev($$)

    weekprofile