diff --git a/fhem/CHANGED b/fhem/CHANGED index 93e17c3bc..68ca12c58 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: 30_HUEBridge, 31_HUEDevice: support for Hue tap dial switch - change: 96_Snapcast: PBP code restructured (part I) - bugfix: 49_SSCam: fix noQuotesForSID using in streaming devices type mjpeg - feature: 74_GardenaSmartDevice: add lona readings, [fix] - setter procedure diff --git a/fhem/FHEM/30_HUEBridge.pm b/fhem/FHEM/30_HUEBridge.pm index 782c81200..a94a6e48b 100644 --- a/fhem/FHEM/30_HUEBridge.pm +++ b/fhem/FHEM/30_HUEBridge.pm @@ -2673,6 +2673,18 @@ HUEBridge_dispatch($$$;$) $obj->{state}{eventtype} = $eventtype; $obj->{state}{buttonevent} = $buttonevent; + } elsif( $data->{type} eq 'relative_rotary' ) { + $obj->{eventtype} = $data->{type}; + + if( my $last_event = $data->{relative_rotary}{last_event} ) { + $obj->{state}{action} = $last_event->{action}; + + if( my $rotation = $last_event->{rotation} ) { + $obj->{state}{steps} = $rotation->{steps}; + $obj->{state}{direction} = $rotation->{direction}; + } + } + } elsif( $data->{type} eq 'temperature' ) { $obj->{state}{temperature} = int($data->{temperature}{temperature}*100) if( defined($data->{temperature}) && $data->{temperature}{temperature_valid} ); diff --git a/fhem/FHEM/31_HUEDevice.pm b/fhem/FHEM/31_HUEDevice.pm index 531dff950..b89a2d8d3 100644 --- a/fhem/FHEM/31_HUEDevice.pm +++ b/fhem/FHEM/31_HUEDevice.pm @@ -950,7 +950,7 @@ HUEDevice_Set($@) } elsif( $cmd eq 'json' ) { return "usage: json [setsensor|configsensor] " if( !@args ); - my $type = 'setsensor'; + my $type = 'updatesensor'; if( $args[0] eq 'setsensor' || $args[0] eq 'configsensor' ) { $type = shift @args; } @@ -1899,6 +1899,10 @@ HUEDevice_Parse($$) $readings{eventtype} = $state->{eventtype} if( defined($state->{eventtype}) ); $readings{eventduration} = $state->{eventduration} if( defined($state->{eventduration}) ); + $readings{action} = $state->{action} if( defined($state->{action}) ); + $readings{steps} = $state->{steps} if( defined($state->{steps}) ); + $readings{direction} = $state->{direction} if( defined($state->{direction}) ); + $readings{dark} = $state->{dark}?'1':'0' if( defined($state->{dark}) ); $readings{humidity} = $state->{humidity} * 0.01 if( defined($state->{humidity}) ); $readings{daylight} = $state->{daylight}?'1':'0' if( defined($state->{daylight}) );