Hello!
At first of all i have to say, that openHAB is great. Im very impressed because of the well designed openhabian Image. I switched from FHEM to openHAB because FHEM had too much perl in it and expected too much customization.
To my Problem:
My Requirement: Set HUE Scenes via openHAB. In this case the color of light has to Change dependend from time. This Scene does stand for 11 other Scenes, where i working with more than one color at once. i Can imagine that in this case i could group my bulbs to set them
Problem: The Scenes turning on very slow over 5 Seconds (sometimes they either doesnt turn on)
My Hardware: RPI 3 This Problem does not occur on other Rules(like homematic).
My Expectation from this Thread:
Check whether my way of coding and concept are the best practice and verify, that there arent any slow performers.
To my Solution:
hue.items
Switch Wohnzimmer_Licht "Wohnzimmerlicht" <light> [ "Switchable" ]
hue.rules
rule "Wohnzimmerlicht einschalten"
when
Item Wohnzimmer_Licht changed to ON
then
var DecimalType whitecolor = new DecimalType(47) // 0-360; 0=red, 120=green, 240=blue, 360=red(again)
var DecimalType whitecolor_hell = new DecimalType(0)
var PercentType sat = new PercentType(40) // 0-100
var PercentType bright = new PercentType(100) // 0-100
var PercentType sat_hell = new PercentType(0) // 0-100
var PercentType bright_hell = new PercentType(100) // 0-100
var HSBType white = new HSBType(whitecolor,sat,bright)
var HSBType white_bright = new HSBType(whitecolor_hell,sat_hell,bright_hell)
if (now.getHourOfDay() >= 19 || now.getHourOfDay() <= 6) {
sendCommand(Wohnzimmer_Hue_1_Color , white)
sendCommand(Wohnzimmer_Hue_2_Color , white)
sendCommand(Wohnzimmer_Hue_3_Color , white)
sendCommand(Wohnzimmer_Hue_4_Color , white)
sendCommand(Wohnzimmer_Hue_5_Color , white)
}
else {
sendCommand(Wohnzimmer_Hue_1_Color , white_bright)
sendCommand(Wohnzimmer_Hue_2_Color , white_bright)
sendCommand(Wohnzimmer_Hue_3_Color , white_bright)
sendCommand(Wohnzimmer_Hue_4_Color , white_bright)
sendCommand(Wohnzimmer_Hue_5_Color , white_bright)
}
postUpdate(Wohnzimmerbeleuchtung, ON)
postUpdate(Wohnzimmer_Rotlicht, OFF)
postUpdate(Wohnzimmer_Blaulicht, OFF)
end
one more rule, that uses 2 colors, but is based on the above one:
rule "Effekt 3 einstellen"
when
Item Wohnzimmer_Effekt_3 changed to ON
then
var DecimalType hue1 = new DecimalType(58.98) // 0-360; 0=red, 120=green, 240=blue, 360=red(again)
var PercentType sat1 = new PercentType(80.99) // 0-100
var PercentType bright1 = new PercentType(100) // 0-100
var DecimalType hue2 = new DecimalType(4.98) // 0-360; 0=red, 120=green, 240=blue, 360=red(again)
var PercentType sat2 = new PercentType(80.99) // 0-100
var PercentType bright2 = new PercentType(100) // 0-100
var HSBType color1 = new HSBType(hue1,sat1,bright1)
var HSBType color2 = new HSBType(hue2,sat2,bright2)
sendCommand(Wohnzimmer_Hue_1_Color , color1)
sendCommand(Wohnzimmer_Hue_2_Color , color2)
sendCommand(Wohnzimmer_Hue_3_Color , color2)
sendCommand(Wohnzimmer_Hue_4_Color , color2)
sendCommand(Wohnzimmer_Hue_5_Color , color1)
I Also stumbled over increasing the Java Memory Sizes. Any Hints where i can do this and how this looks? The last Comment was in 2015 and i think, the start.sh has changed in this time.
Any Ideas?
Best regards!