[SOLVED] Milight dual white brightness

Hello

I am having trouble getting my dual white downlights to turn on with full brightness.
RGBW lights work without any issues.

From the debug log when the “ON” command is issued it sends a ‘38:00:55’ (Zone 1 On) which is correct, however the lights are very dim (about 30% brightness).
I can use the dimmer function to manually increase the brightness, however how do you send a “B8 00 55” (Zone 1 Full) after the light is turned on ?

Thanks in advance.

There are two ways to do so:
Create a virtual Switch Item for On/Off as a trigger in a rule. In your rule use the ON trigger to send 100 (dimming percentage) to your bulb.
Other way would be to create a switch with mappings (ON=100 / OFF=0)

Thank you for you feedback.
I have taken your advise and created a rule and all is working A-OK now.:grinning:

ITEM
Switch Light_GF_Kitchen_DownW “On/Off” (GF_KitchenDown, Lights, LightsGF) {milight=“bridge2;1”}
Dimmer Light_GF_Kitchen_DownB “Brightness” (GF_KitchenDown, Lights, LightsGF) {milight=“bridge2;1;brightness”}

RULE
rule "Kitchen Downlight"
when
Item Light_GF_Kitchen_DownW received command ON
then
sendCommand(Light_GF_Kitchen_DownB, 100)

Hi,

I’ve tried to implement this as well, but I’m getting an error -

Cannot determine item type of ‘officeVirtualLightON’ org.openhab.core.items.ItemNotFoundException: Item ‘officeVirtualLightON’ could not be found in the item registry7

Items (I’m not sure what is the function of the first labels in the definitions “Brightness” etc, I have tried with and without these) -

Switch officeMilight {milight=“mlbLounge;1”}
Switch officeMilightNight {milight=“mlbLounge;1;nightMode”}
Dimmer officeMilightBright “Brightness” {milight="mlbLounge;1;brightness}
Switch officeVirtualLightON “On/Off” {milight=“mlbLounge;1”}

sitemap -

Frame {
    Text label="Lights" icon="bulb" {
        Text label="Office" icon="bulb" {
            Switch item=officeMilight label="On/Off"
            Switch item=officeMilightNight label="Night Light"
            Switch item=officeVirtualLightON label="Brightness"
        }
    }
}

rules -

rule "Office Light On"
when
item officeVirtualLightON received command ON
then
sendCommand(officeMilightBright,100)
end

I’ve tried several variations of this configuration, the error persists.

Why posting this in different conversations ??

Your virtual Item does not get a binding config, so please remove.

Since this one was closed, I added to the other.

I have tried with and without the binding for the virtual switch, it didnt make sense to have it, but the previous poster said that was part of his solution so I tried it.

I will remove it -

Switch officeMilight {milight=“mlbLounge;1”}
Switch officeMilightNight {milight=“mlbLounge;1;nightMode”}
Dimmer officeMilightBright “Brightness” {milight="mlbLounge;1;brightness}
Switch officeVirtualLightON

I’m also getting this warning -

[WARN ] [.MilightGenericBindingProvider] - bindingConfig is NULL (item=officeMilightBright (Type=DimmerItem, State=Uninitialized)) -> processing bindingConfig aborted!

Yes, you missed a " in the item config.

reading the post again, you don’t need any virtual item.

you can simply reuse the rule posted earlier and just uses your item names.
This would captuere any ON commands to a bulb, switches it on and send a 100% to the dimmer item.

Also, I’m not really clear on what the brightness command does for white bulbs. The wiki says “it controls the brightness” but doesn’t say how. Would you mind explaining further please?

Very simple, it is the brightness channel of the bulbs.
If this channel receives an ON command, it sends on ton the bulb. According to the API, this will set the bulb to its last brightness. An OFF command swiches off.
Sennding a percent value through a dimmer item or a rule to the brightness channel will dim the bulb to this value.

With the below changes I now have no errors, but its still not working, and now I don’t have a brightness control, but I can get back to that…

items -

Switch officeMilight {milight=“mlbLounge;1”}
Switch officeMilightNight {milight=“mlbLounge;1;nightMode”}
Dimmer officeMilightBright “Brightness” {milight=“mlbLounge;1;brightness”}

sitemap -

Frame {
    Text label="Lights" icon="bulb" {
        Text label="Office" icon="bulb" {
            Switch item=officeMilight label="On/Off"
            Switch item=officeMilightNight label="Night Light"
        }
    }
}

rules -

rule "Office Light On"
when
item officeMilight received command ON
then
sendCommand(officeMilightBright,100)
end

debug for ON -

2016-10-15 19:32:41.631 [DEBUG] [.o.b.m.internal.MilightBinding] - milight: item is of type brightness
2016-10-15 19:32:41.632 [DEBUG] [.o.b.m.internal.MilightBinding] - milight: sendOn
2016-10-15 19:32:41.633 [DEBUG] [.o.b.m.internal.MilightBinding] - milight: messageBytes to transform: '38:00:55’
2016-10-15 19:32:41.635 [DEBUG] [.o.b.m.internal.MilightBinding] - Sent packet ‘38:00:55’ to bridge ‘mlbLounge’ (192.168.88.16:8899)
201

Ok, so for brightness bindings I need to have instead of this -

{milight=“mlbLounge;1;brightness”}

then something like this -

{milight=“mlbLounge;1;brightness;100”}

for full brightness?

no, this is not supported.

Your sitemap posted in your second last post is missing your dimmer item, therefore you have no brightness controll.

To have a simple swith setting the bulb to 100 percent, you could try a switch with mappings. Examples on how to achieve this can be found in the wiki.

I’ve tried the mappings as well, but to no avail, just a simple on/off mapping

Ok, so to set the brightness level the only way is to use sendCommand in a rule, is that right?

I’m clearly going around in circles here…Would you mind posting the most simple sitemap, item, rule (if required) to set the brightness? I can start with that and see if it works

I can send some examples tonight, when I get access to my computer.

That would be great thanks.

Now, to test your update, do I simply remove the 1.8.3 binding and drop the new one in addons?

Thanks

yes

Ok, I’ll do that and see how it goes

No change with the update, however I dont think my rule is being executed. I put an info log in the rule and I don’t see it in the log output

rule -

rule "Office Light On"
when
item officeMilight received command ON
then
sendCommand(officeMilightBright,100)
logInfo(“Lights”,“Executed ON with brightness”)
end

I also tried adding the mappings back to sitemap with no change -

Frame {
    Text label="Lights" icon="bulb" {
        Text label="Office" icon="bulb" {
            Switch item=officeMilight label="On/Off" mappings=[OFF="Off", ON="On"]
            Switch item=officeMilightNight label="Night Light"
        }
    }
}

this is the openhab.log output -

2016-10-15 20:06:19.474 [DEBUG] [.o.b.m.internal.MilightBinding] - milight: item is of type brightness
2016-10-15 20:06:19.475 [DEBUG] [.o.b.m.internal.MilightBinding] - milight: sendOn
2016-10-15 20:06:19.476 [DEBUG] [.o.b.m.internal.MilightBinding] - milight: messageBytes to transform: '38:00:55’
2016-10-15 20:06:19.477 [DEBUG] [.o.b.m.internal.MilightBinding] - Sent packet ‘38:00:55’ to bridge ‘mlbLounge’ (192.168.88.16:8899)

and from events log

2016-10-15 20:05:25 - officeMilight received command ON

well… gotta check the syntax I guess. lower case 'i" for item in the rule, now the rule is executed and the brightness works.

I’d still like some examples for brightness though, if you can post when you get a chance.