diff --git a/fhem/FHEM/lib/AttrTemplate/zwave.template b/fhem/FHEM/lib/AttrTemplate/zwave.template index aaae220bb..eefef67af 100644 --- a/fhem/FHEM/lib/AttrTemplate/zwave.template +++ b/fhem/FHEM/lib/AttrTemplate/zwave.template @@ -11,7 +11,7 @@ ########################################### name:General_Info_ZWave filter:TYPE=ZWave -desc: This attrTemplate-file is still in a very early stage and more like a POC, see Forum Thread for further info. +desc: This attrTemplate-file is still in a very early stage and more like a POC, see Forum Thread for further info.
Best starting point with ZWave in FHEM is the FHEM-Wiki (german). Most important step is to make sure, inclusion process has finished successfully and association with the gateway (USB-Dongle in most cases) has been set. To check, use (if available):
get associationAll
get configAll
get versionClassAll
get mcaAll
get wakeupInterval (battery powered devices only)
Processing could take some time (wake up battery powered devices if needed...), at the end you will have "cmdsPending" at a "0" value (refresh browser page if needed, it's an "Internal"). order:000000 ############### @@ -37,14 +37,12 @@ order:000002 name:zwave_showcase_show_main_and_channel_devices_2 filter:TYPE=ZWave -desc:example template just to identify all main and channel devices for a 2-channel device like Fibaro FGs-223 +desc:example template just to identify all main and channel devices for a 2-channel device like Fibaro FGS223 order:000003 par:MAINCHANNEL;Main channel of the device - do not proceed if it can't be identified!;{ FHEM::attrT_ZWave_Utils::identify_channel_devices("DEVICE",0) } par:CHANNEL01;First channel of the device - do not proceed if it can't be identified!;{ FHEM::attrT_ZWave_Utils::identify_channel_devices("DEVICE",1) } par:CHANNEL02;Second channel of the device - do not proceed if it can't be identified!;{ FHEM::attrT_ZWave_Utils::identify_channel_devices("DEVICE",2) } -show MAINCHANNEL,CHANNEL01,CHANNEL02 -#{ fhem "trigger $FW_wname JS:location.href='$FW_ME?show=MAINCHANNEL,CHANNEL01,CHANNEL02'" if($cl && $cl->{TYPE} eq "FHEMWEB") } -#http://192.168.2.72:8083/fhem?room=%23devspec%3dZWave%5fSWITCH%5fMULTILEVEL%5f8%2cJalousie%5fWZ%2cZWave%5fSWITCH%5fMULTILEVEL%5f8%2e02&fw_id=15253 +{ fhem "trigger $FW_wname JS:location.href='$FW_ME?room=%23devspec%3dMAINCHANNEL,CHANNEL01,CHANNEL02'" if($cl && $cl->{TYPE} eq "FHEMWEB") } name:----Fibaro-devices-section-------- filter:TYPE=ZWave @@ -58,10 +56,9 @@ farewell:Things to be done manually: configure switch type (configSwitchType). par:CALLSPEECHRECOGN;Set this to 0 to not set any speech recogn. related attributes;{ 1 } par:ICON;ICON as set, defaults to fts_shutter_updown;{ AttrVal("DEVICE","icon","fts_shutter_updown") } attr DEVICE icon ICON -deletereading -q DEVICE (?!associatedWith|model.*).* attr DEVICE devStateIcon { FHEM::attrT_ZWave_Utils::devStateIcon_shutter($name,"FGRM222") } attr DEVICE eventMap { usr=>{'dim.100'=>'dim 99' } } -attr DEVICE webCmd dim:stop +attr DEVICE webCmd dim attr DEVICE cmdIcon stop:fts_shutter_manual attr DEVICE widgetOverride dim:colorpicker,BRI,0,1,99 set DEVICE configRollerShutterOperatingModes 1RollerBlindModeWithPositioning @@ -83,9 +80,8 @@ farewell:Things to be done manually: configure switch type (configSwitchType) an par:CALLSPEECHRECOGN;Set this to 0 to not set any speech recogn. related attributes;{ 1 } par:ICON;ICON as set, defaults to fts_shutter_updown;{ AttrVal("DEVICE","icon","fts_shutter_updown") } attr DEVICE icon ICON -deletereading -q DEVICE (?!associatedWith|model.*).* attr DEVICE eventMap { usr=>{'dim.100'=>'dim 99' } } -attr DEVICE webCmd dim:stop +attr DEVICE webCmd dim attr DEVICE cmdIcon stop:fts_shutter_manual attr DEVICE widgetOverride dim:colorpicker,BRI,0,1,99 attr DEVICE devStateIcon { FHEM::attrT_ZWave_Utils::devStateIcon_shutter($name,"FGRM222","venetian") } @@ -105,23 +101,24 @@ name:FGRM222_Choice_demo filter:TYPE=ZWave order:01Fibaro000008 desc:Applies to Fibaro FGRM222 devices. You can choose between normal shutter mode or venetian blind mode. For other modes use manual configuration. Note: additional code will be downloaded from svn. -farewell:Things to be done manually: configure switch type (configSwitchType) and (for venetain mode only) turning time for lamellas (configInVenetianBlindModeTheParameter12). +farewell:Things to be done manually: configure switch type (configSwitchType) and (for venetian mode only) turning time for lamellas (configInVenetianBlindModeTheParameter12). par:RADIO_ROLLER_MODE;Configure as normal shutter (no option to turn lamellas);{ undef } par:RADIO_VENETIANBLIND_MODE;Configure as venetian blind (allow turning of lamellas);{ undef } par:CALLSPEECHRECOGN;Set this to 0 to not set any speech recogn. related attributes;{ 1 } par:ICON;ICON as set, defaults to fts_shutter_updown;{ AttrVal("DEVICE","icon","fts_shutter_updown") } attr DEVICE icon ICON set DEVICE attrTemplate zwave_get_myutils_from_svn -deletereading -q DEVICE (?!associatedWith|model.*).* +#deletereading -q DEVICE (?!associatedWith|model.*).* attr DEVICE eventMap { usr=>{'dim.100'=>'dim 99' } } -attr DEVICE webCmd dim:stop +attr DEVICE webCmd dim attr DEVICE cmdIcon stop:fts_shutter_manual attr DEVICE widgetOverride dim:colorpicker,BRI,0,1,99 option:{ RADIO_ROLLER_MODE } set DEVICE configRollerShutterOperatingModes 1RollerBlindModeWithPositioning set DEVICE configReportsType BlindPositionReportsSentToThe0 +attr DEVICE devStateIcon { FHEM::attrT_ZWave_Utils::devStateIcon_shutter($name,"FGRM222") } option:{ RADIO_VENETIANBLIND_MODE } -attr DEVICE devStateIcon { FHEM::attrT::ZWave::devStateIcon_venetian_shutter($name,"FGRM222") } +attr DEVICE devStateIcon { FHEM::attrT_ZWave_Utils::devStateIcon_shutter($name,"FGRM222","venetian") } set DEVICE configRollerShutterOperatingModes 2VenetianBlindModeWith2 set DEVICE configReportsType BlindPositionReportsSentToThe1 set DEVICE configSetLamellasBackToPrevious13 0LamellasReturnToPreviouslySet0 @@ -132,10 +129,101 @@ set DEVICE attrTemplate speechcontrol_type_blind option:{ 1 } get DEVICE configAll get DEVICE associationAll -setreading DEVICE attrTemplateVersion FGRM222_Choice_demo_20200912 +setreading DEVICE attrTemplateVersion FGRM222_Choice_demo_20201002 +name:FGR223_Roller_Mode +filter:TYPE=ZWave +order:01Fibaro000006 +desc:Applies to Fibaro FGR223 devices. This is for normal shutter mode. For other modes use different attrTemplates if available or manual configuration. +farewell:Things to be done manually: configure switch type (configSwitchType). +par:CALLSPEECHRECOGN;Set this to 0 to not set any speech recogn. related attributes;{ 1 } +par:MAINCHANNEL;Main channel of the device - do not proceed if it can't be identified!;{ FHEM::attrT_ZWave_Utils::identify_channel_devices("DEVICE",0) } +par:CHANNEL01;First channel of the device - do not proceed if it can't be identified!;{ FHEM::attrT_ZWave_Utils::identify_channel_devices("DEVICE",1) } +par:CHANNEL02;Second channel of the device - do not proceed if it can't be identified!;{ FHEM::attrT_ZWave_Utils::identify_channel_devices("DEVICE",2) } +par:ICON;ICON as set, defaults to fts_shutter_updown;{ AttrVal("DEVICE","icon","fts_shutter_updown") } +attr MAINCHANNEL,CHANNEL01,CHANNEL02 icon ICON +attr CHANNEL01 devStateIcon { FHEM::attrT_ZWave_Utils::devStateIcon_shutter($name,"FGR223") } +attr CHANNEL01 eventMap { usr=>{'dim.100'=>'dim 99' } } +attr CHANNEL01 webCmd dim +attr CHANNEL01 widgetOverride dim:colorpicker,BRI,0,1,99 +attr CHANNEL01 userReadings dim:(dim|reportedState).* {$1 =~ /reportedState/ ? ReadingsNum($name,"reportedState",0):ReadingsNum($name,"state",0)} +set MAINCHANNEL configEnergyReportsOnChange 10 +set MAINCHANNEL configS1SwitchScenesSent 15 +set MAINCHANNEL configS2SwitchScenesSent 15 +set MAINCHANNEL configOperatingMode RollerBlind +set MAINCHANNEL configForceCalibration ForceDeviceCalibration +option:{ CALLSPEECHRECOGN } +set CHANNEL01 attrTemplate speechcontrol_type_blind +#closing section +option:{ 1 } +get MAINCHANNEL configAll +get MAINCHANNEL associationAll +{ fhem "trigger $FW_wname JS:location.href='$FW_ME?room=%23devspec%3dMAINCHANNEL,CHANNEL01,CHANNEL02'" if($cl && $cl->{TYPE} eq "FHEMWEB") } +setreading DEVICE attrTemplateVersion FGR223_Roller_Mode_20200930 + +name:FGR223_Venetian_Mode +filter:TYPE=ZWave +order:01Fibaro000006a +desc:Applies to Fibaro FGR223 devices. This is for venetian blind mode. For other modes use differnt attrTemplates or manual configuration.
The template is based on this forum thread. +farewell:Things to be done manually: configure switch type (configSwitchType). +par:CALLSPEECHRECOGN;Set this to 0 to not set any speech recogn. related attributes;{ 1 } +par:MAINCHANNEL;Main channel of the device - do not proceed if it can't be identified!;{ FHEM::attrT_ZWave_Utils::identify_channel_devices("DEVICE",0) } +par:CHANNEL01;First channel of the device - do not proceed if it can't be identified!;{ FHEM::attrT_ZWave_Utils::identify_channel_devices("DEVICE",1) } +par:CHANNEL02;Second channel of the device - do not proceed if it can't be identified!;{ FHEM::attrT_ZWave_Utils::identify_channel_devices("DEVICE",2) } +par:ICON;ICON as set, defaults to fts_shutter_updown;{ AttrVal("DEVICE","icon","fts_shutter_updown") } +attr MAINCHANNEL,CHANNEL01,CHANNEL02 icon ICON +attr CHANNEL01 devStateIcon { FHEM::attrT_ZWave_Utils::devStateIcon_shutter($name,"FGR223","venetian") } +attr CHANNEL01 eventMap { usr=>{'dim.100'=>'dim 99' } } +attr CHANNEL01 webCmd dim +attr CHANNEL01 widgetOverride dim:colorpicker,BRI,0,1,99 +attr CHANNEL01 userReadings dim:(dim|reportedState).* {$1 =~ /reportedState/ ? ReadingsNum($name,"reportedState",0):ReadingsNum($name,"state",0)} +set MAINCHANNEL configEnergyReportsOnChange 10 +set MAINCHANNEL configS1SwitchScenesSent 15 +set MAINCHANNEL configS2SwitchScenesSent 15 +set MAINCHANNEL configOperatingMode VenetianBlind +set MAINCHANNEL configForceCalibration ForceDeviceCalibration +option:{ CALLSPEECHRECOGN } +set CHANNEL01 attrTemplate speechcontrol_type_blind +#closing section +option:{ 1 } +get MAINCHANNEL configAll +get MAINCHANNEL associationAll +{ fhem "trigger $FW_wname JS:location.href='$FW_ME?room=%23devspec%3dMAINCHANNEL,CHANNEL01,CHANNEL02'" if($cl && $cl->{TYPE} eq "FHEMWEB") } +setreading DEVICE attrTemplateVersion FGR223_Venetian_Mode_20200930 name:----AEOTEC-devices-section-------- filter:TYPE=ZWave order:03AEOTEC00000 +desc:Templates for AEOTEC/AEON Labs devices.Manufacturer info can be found here. firmware updates are available for some devices, but for updating, you have to use a separate Windows machine. + +#AEON Labs ZW095 Home Energy Meter Gen5 +name:ZW095_Home_Energy_Meter +filter:TYPE=ZWave +order:03AEOTEC0000ZW095 +desc:Applies to AEON Labs ZW095 Home Energy Meter Gen5 .
NOTE: early, untested version!
The template is based on this forum thread, manufacturer info can be found here. Having an up-to-date firmware is highly recommended +par:MAINCHANNEL;Main channel of the device - do not proceed if it can't be identified!;{ FHEM::attrT_ZWave_Utils::identify_channel_devices("DEVICE",0) } +par:CHANNEL01;First channel of the device - do not proceed if it can't be identified!;{ FHEM::attrT_ZWave_Utils::identify_channel_devices("DEVICE",1) } +par:CHANNEL02;Second channel of the device - do not proceed if it can't be identified!;{ FHEM::attrT_ZWave_Utils::identify_channel_devices("DEVICE",2) } +par:CHANNEL02;Second channel of the device - do not proceed if it can't be identified!;{ FHEM::attrT_ZWave_Utils::identify_channel_devices("DEVICE",3) } +set MAINCHANNEL associationAdd 1 1 +set MAINCHANNEL configGroup1Interval 60 +set MAINCHANNEL configGroup1Reports 14337 +set MAINCHANNEL configGroup2Interval 60 +set MAINCHANNEL configGroup2Reports 1792 +set MAINCHANNEL configGroup3Interval 600 +set MAINCHANNEL configGroup3Reports 4128780 +set MAINCHANNEL configSelectiveReporting Enable +attr MAINCHANNEL,CHANNEL01,CHANNEL02,CHANNEL03 stateFormat energy_kWh +attr MAINCHANNEL,CHANNEL01,CHANNEL02,CHANNEL03 userReadings energy_kWh:energy:.* monotonic {ReadingsNum("$name","energy",0)} +#closing section +option:{ 1 } +get MAINCHANNEL configAll +get MAINCHANNEL associationAll +{ fhem "trigger $FW_wname JS:location.href='$FW_ME?room=%23devspec%3dMAINCHANNEL,CHANNEL01,CHANNEL02,CHANNEL03'" if($cl && $cl->{TYPE} eq "FHEMWEB") } +setreading DEVICE attrTemplateVersion ZW095_Home_Energy_Meter_20200930 + +name:ZW100_Multisensor +filter:TYPE=ZWave +order:03AEOTEC0000ZW100 +desc:Having an up-to-date firmware is highly recommended