diff --git a/fhem/FHEM/10_EnOcean.pm b/fhem/FHEM/10_EnOcean.pm index fa0cf8b06..04a13fac8 100755 --- a/fhem/FHEM/10_EnOcean.pm +++ b/fhem/FHEM/10_EnOcean.pm @@ -12007,16 +12007,29 @@ sub EnOcean_Parse($$) { RemoveInternalTimer($hash->{helper}{timer}{buttonS}) if (exists $hash->{helper}{timer}{buttonS}); @{$hash->{helper}{timer}{buttonS}} = ($hash, 'buttonS', 'off', 1, 5); InternalTimer(gettimeofday() + 0.5, 'EnOcean_readingsSingleUpdate', $hash->{helper}{timer}{buttonS}, 0); + push @event, "3:event:single"; + push @event, "3:button:pressed"; + RemoveInternalTimer($hash->{helper}{timer}{button}) if (exists $hash->{helper}{timer}{button}); + @{$hash->{helper}{timer}{button}} = ($hash, 'button', 'released', 1, 5); + InternalTimer(gettimeofday() + 0.5, 'EnOcean_readingsSingleUpdate', $hash->{helper}{timer}{button}, 0); } elsif ($db[0] == 2) { push @event, "3:buttonD:on"; RemoveInternalTimer($hash->{helper}{timer}{buttonD}) if (exists $hash->{helper}{timer}{buttonD}); @{$hash->{helper}{timer}{buttonD}} = ($hash, 'buttonD', 'off', 1, 5); InternalTimer(gettimeofday() + 0.5, 'EnOcean_readingsSingleUpdate', $hash->{helper}{timer}{buttonD}, 0); + push @event, "3:event:double"; + push @event, "3:button:pressed"; + RemoveInternalTimer($hash->{helper}{timer}{button}) if (exists $hash->{helper}{timer}{button}); + @{$hash->{helper}{timer}{button}} = ($hash, 'button', 'released', 1, 5); + InternalTimer(gettimeofday() + 0.5, 'EnOcean_readingsSingleUpdate', $hash->{helper}{timer}{button}, 0); } elsif ($db[0] == 3) { push @event, "3:buttonL:on"; + push @event, "3:event:long"; + push @event, "3:button:pressed"; push @event, "3:state:on"; } elsif ($db[0] == 4) { push @event, "3:buttonL:off"; + push @event, "3:button:released"; push @event, "3:state:off"; } @@ -22419,9 +22432,11 @@ sub EnOcean_Delete($$) {