GOVEE2MQTT - Client mit wechselnder ClientID verursacht Autocreate Kopfschmerz

Begonnen von Dek, 27 Januar 2025, 16:30:47

Vorheriges Thema - Nächstes Thema

TomLee

ZitatWas mir jetzt noch fehlt ist eine Art smoother Fader beim Zustandswechsel, wie es die Goovee-App und Homekit werksseitig bereits tun.
Hier wird aktuell "hart" die Helligkeit verändert, das sieht nicht sexy aus.


Einfach mal ins Blaue, evtl. mit transition?


{"state":"ON","brightness":$EVTPART1, "transition": 5}

Dracolein

Um mir selbst zu antworten,
Zitat{"state":"ON","brightness":$EVTPART1, "transition": 5}
hatte ich erfolglos probiert und dann die KI befragt, rausgekullert sind 2 notify_devices als workaround:

defmod notify_GoveeNeonEG_SmoothDim notify GoveeNeonEG:set:brightness.* { \
my $target = int($EVTPART1);; \
my $steps = 12;; \
my $duration = 3;; \
my $delay = $duration / $steps;; \
my $current = int(ReadingsVal("GoveeNeonEG", "brightness", 50));; \
my $stepsize = ($target - $current) / $steps;; \
for (my $i = 1;; $i <= $steps;; $i++) \
{ \
my $new = int($current + $i * $stepsize + 0.5);;\
$new = 0 if $new < 0;; $new = 100 if $new > 100;; \
InternalTimer(gettimeofday() + $i * $delay, sub { fhem("set GoveeNeonEG brightness $new") }, "smoothdim_".time()."_".$i);; } \
}

defmod notify_GoveeNeonEG_SmoothONOFF notify GoveeNeonEG:set:(on|off).* { \
my $target = ($EVTPART0 eq "on" ? 100 : 0);; \
my $steps = 10;; \
my $duration = 2;; \
my $delay = $duration / $steps;; \
my $current = int(ReadingsVal("GoveeNeonEG", "brightness", 50));; \
my $stepsize = ($target - $current) / $steps;; \
for (my $i = 1;; $i <= $steps;; $i++) \
{ \
my $new = int($current + $i * $stepsize + 0.5);; \
$new = 0 if $new < 0;; $new = 100 if $new > 100;; \
InternalTimer(gettimeofday() + $i * $delay, sub { fhem("set GoveeNeonEG brightness $new") }, "smooth_onoff_".time()."_".$i);; } \
}
Damit klappt das nun ganz hervorragend.

Eine Frage zu Govee2MQTT hätte ich noch an Euch: Seid Ihr im Stande, einen DIY-Effekt (gebaut in der Govee App) via Govee2mqtt zu aktivieren?
Falls ja, wie  :o  8)
Raspberry Pi 4 mit FHEM; FTUI Dashboard auf Asus 15,6" VT168H Touchscreen; ZigBee mit ConBee2 USB-Stick; div. Shelly 2.5; integr. Gaszähler mit ESP8266 & ESPEasy;