From f39f8d936a602916a9a422b80e7655e3912c6527 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sat, 4 Oct 2014 07:23:18 +0000 Subject: [PATCH] ZWave: SCENE_ACTIVATION Class from hanske (Forum #27547) git-svn-id: https://svn.fhem.de/fhem/trunk@6668 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_ZWave.pm | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/10_ZWave.pm b/fhem/FHEM/10_ZWave.pm index 333060cde..a9916e609 100755 --- a/fhem/FHEM/10_ZWave.pm +++ b/fhem/FHEM/10_ZWave.pm @@ -12,6 +12,7 @@ sub ZWave_Set($@); sub ZWave_Get($@); sub ZWave_Cmd($$@); sub ZWave_ParseMeter($); +sub ZWave_ParseScene($); sub ZWave_SetClasses($$$$); sub ZWave_getParse($$$); @@ -64,7 +65,9 @@ my %zwave_class = ( SWITCH_TOGGLE_MULTILEVEL => { id => '29', }, CHIMNEY_FAN => { id => '2a', }, SCENE_ACTIVATION => { id => '2b', - set => { sceneActivate => "01%02x%02x",}, }, + set => { sceneActivate => "01%02x%02x",}, + parse => { "042b01(..)(..)" => '"scene_$1:$2"', + "042b01(..)ff" => 'ZWave_ParseScene($1)',}, }, SCENE_ACTUATOR_CONF => { id => '2c', set => { sceneConfig => "01%02x%02x80%02x",}, get => { sceneConfig => "02%02x", }, @@ -578,6 +581,16 @@ ZWave_SetClasses($$$$) return ""; } +sub +ZWave_ParseScene($) +{ + my ($p)=@_; + my @arg = ("unknown", "on", "off", + "dim up start", "dim down start", "dim up end", "dim down end"); + return sprintf("sceneEvent%s:%s", int(hex($p)/10), $arg[hex($p)%10]); +} + + sub ZWave_mcCapability($$) { @@ -993,10 +1006,18 @@ s2Hex($)
  • dim value
    dim to the requested value (0..100)
  • + +

    Class SCENE_ACTIVATION +
  • sceneConfig
    + activate settings for a specific scene. + Parameters are: sceneId, dimmingDuration (00..ff) +
  • + +

    Class SCENE_ACTUATOR_CONF
  • sceneConfig
    set configuration for a specific scene. - Parameters are: sceneId, dimmingDuration, finalValue (0x0..0xff) + Parameters are: sceneId, dimmingDuration, finalValue (00..ff)


  • Class SCENE_CONTROLLER_CONF @@ -1320,6 +1341,9 @@ s2Hex($)
  • state:off
  • state:dim value
  • +

    Class SCENE_ACTIVATION +
  • scene_Id:level finalValue
  • +

    Class SCENE_ACTUATOR_CONF
  • scene_Id:level dimmingDuration finalValue