Neues Modul: 30_MilightBridge / 31_MilightDevice

Begonnen von mattwire, 19 Dezember 2014, 01:39:17

Vorheriges Thema - Nächstes Thema

waschbaerbauch

#60
Hallo ich bin der 'Neue' in de Runde :)

Nachdem ich in den letzten Wochen / Monaten dank des PDF, diesem Forum und anderen Seiten nach und nach alles irgendwie ans Laufen gebracht habe muss ich nun doch mal nachfragen.
Ich hoffe natürlich das ich keine unsinnige Frage stelle die schon x mal beantwortet worden ist, wenn ja dann seid bitte nachsichtig und schickt mich nicht in die Wüste  ;D

Ich habe hier nach und nach vier MiLight Bridges konfiguriert und in FHEM eingebunden. Das funktioniert nun auch soweit mit dem MiLight Modul.
Einen MiLight RGBW 4-Zonen Controller habe ich auch erst mit der MiLight App an eine Bridge angelernt und konnte diesen auch in FHEM über Slot 5 einbinden.
Wenn ich nun einen weitern 4-Zonen RGBW Controller an der gleichen Bridge anlerne in Zone 2 - welcher Slot ist das dann? Irgendwie bin ich grad zu vernagelt das zu begreifen oder ich finde einfach die Lösung da(z)u nicht..

Eine weitere Bridge habe ich mit MiLight RGB 4-Zonen Controller über die App gepairt. Mit der App auf dem Androiden kann ich sie auch komplett ansteuern, aber in FHEM komme ich wieder an meine Grenzen.
Bei der Definition des MiLight Devices ist der Typ ja RGB und nicht RGBW, somit muss der Slot 0 sein. Das habe ich auch angegeben, allerdings bringt mir das keinerlei Funktion.

Was mich auch wieder zu der Frage bringt:
Wie adressiere ich Zone 1-2-3-4 in FHEM? Sehe ich den Wald vor lauter Bäumen nicht oder ist das Modul einfach noch gar nicht soweit und lauf ich deswegen gegen die Wand?  :o

Für sachdienliche Hinweise bin ich jederzeit dankbar  ;)

Gruß
Mario


EDIT: Hab den den Baum im Wald gefunden *seufz* hab mein Problem also gelöst bekommen :)

Markus M.

Hi Matt, another bug report here:
For me, Colorpicker for CT seems to just totally ignore the values you set for sliders and defaults to 2800-6300
So maybe we should just go with these values?!

I was also wondering why the WW strip never turned off - it seems there are actually 11 values for color temperature, including 0.

Code (I prefer fast code over pretty code :) Auswählen
  # Couldn't get switch statement to work so using if
   
  if ($ct < 4550) {
    if ($ct < 3150) { return 10; }
    if ($ct < 3500) { return 9; }
    if ($ct < 3850) { return 8; }
    if ($ct < 4200) { return 7; }
    return 6; # (< 4550)
  } else {
    if ($ct < 4900) { return 5; }
    if ($ct < 5250) { return 4; }
    if ($ct < 5600) { return 3; }
    if ($ct < 5950) { return 2; }
    if ($ct < 6300) { return 1; }
    return 0; # (>= 6300)
  }


;) Markus
Aktuell weder Smarthome noch FHEM vorhanden

mattwire

There should only be 10 ct values according to the api (1-10). You should not be able to turn off using ct!
I think there may be a bug in the slider - 3000-6500 are the correct limits but they are changing in fhemweb :-(

Markus M.

Zitat von: mattwire am 20 Februar 2015, 09:04:14
There should only be 10 ct values according to the api (1-10). You should not be able to turn off using ct!
I think there may be a bug in the slider - 3000-6500 are the correct limits but they are changing in fhemweb :-(

At the minimum and maximum CT values, one of the strips should be off.
With my controller I could only achieve this by using 11 values.
Maybe the correct values are 0-9, but to me it seems 11 is the way to go.
Do you have a WWCW device to test this?
Aktuell weder Smarthome noch FHEM vorhanden

mattwire

@MarkusM:
I have a 6W E22 White lamp for testing.

There are no direct values for setting colourtemperature, only up/down.  The API says:
3E 00 55 - Warmer
3F 00 55 - Cooler (There are ten steps between warmest and coolest)

Are you using a LED strip controller?  Then you may be able to see the number of steps more clearly.  Can you confirm if your are certain that it is 11 steps and not 12?

Markus M.

Zitat von: mattwire am 22 Februar 2015, 20:38:30There are no direct values for setting colourtemperature, only up/down.  The API says:
3E 00 55 - Warmer
3F 00 55 - Cooler (There are ten steps between warmest and coolest)

If you define a step as the transition between two values, that's actually technically correct :)
I can confirm that there are 11 values for color temperature on my strip controller.

There are also 11 values total for brightness.
Can you add my code for color temperature and take care of the brightness?
Aktuell weder Smarthome noch FHEM vorhanden

mattwire

@MarkusM: Please test the attached changed for ct and dim 11 steps for White

Markus M.

Zitat von: mattwire am 22 Februar 2015, 22:31:50
@MarkusM: Please test the attached changed for ct and dim 11 steps for White

Can't really test it comfortably because of the CT slider values.
You need to change that to 2800-6300, otherwise the UI is just a mess.

Setting CT manually it's like before (warm still on at 6500) - but you used values 1-11 while I used 0-10?!
dim still has 10 steps for me in the slider.
Aktuell weder Smarthome noch FHEM vorhanden

mattwire

Zitat von: Markus M. am 22 Februar 2015, 22:49:23
Can't really test it comfortably because of the CT slider values.
You need to change that to 2800-6300, otherwise the UI is just a mess.
3000-6500 is correct.  There is a bug with the slider in fhemweb (http://forum.fhem.de/index.php/topic,34230.0.html)

Zitat
Setting CT manually it's like before (warm still on at 6500) - but you used values 1-11 while I used 0-10?!
The values are irrelevant since the API does not support direct setting of CT, only +/-.  So 1-11 are only used internally for tracking state.
Zitat
dim still has 10 steps for me in the slider.
Did you restart fhem?

Markus M.

Tried again, seems to have been a problem with reloading.
CT kind of works. For some reason the slider now shows me 2880-6400?

Please make the following changes for error handling around the extremes and remove unnecessary comparisons:
...
  if ($ct < 3320) { return 11; }
  elsif ($ct < 3640) { return 10; }
  elsif ($ct < 3960) { return 9; }
  elsif ($ct < 4280) { return 8; }
  elsif ($ct < 4600) { return 7; }
  elsif ($ct < 4920) { return 6; }
  elsif ($ct < 5240) { return 5; }
  elsif ($ct < 5560) { return 4; }
  elsif ($ct < 5880) { return 3; }
  elsif ($ct < 6200) { return 2; }
  return 1;


Dim seems fine, apart from there not being a value of 100 on the slider :)

Thanks & good night!
Markus
Aktuell weder Smarthome noch FHEM vorhanden

Markus M.

Ok, dimming white strips is not fine :(
There are some serious issues with brightness at the moment.
Sometimes the strip is at > 50% brightness but thinks it's on the lowest level.
The only thing that helps is to set it to 100% and then dim down again.
It's probably due to lost packets and/or a hardware and software brightness mismatch.

What could help:
Can you change the logic so that On/Off for white bulbs is completely handled by dimup/dimdown commands and for values of 0% and 100% a few more down/up packets are sent, just for good measure?
Aktuell weder Smarthome noch FHEM vorhanden

mattwire

Hi, dimming works perfectly here. Can you try moving the bridge closer to the white strip?

The API provides commands for dimup, dimdown, on, off, fullOn.  I use the fullOn command for 100% that is why it is resetting it for you.  If you changed to use only dimming commands then it would not be possible to turn on instantly at the last brightness.

Matthew

mattwire


speex

Hi ich nutze Milight 6w Bulbs und die bieten per app einen night mode durch längeres on drücken, kann ich diesen modus auch mit diesem modul aktivieren?

mattwire