Hi, I’ve just got my first Milight installed with the wifi receiver, and working with the android app. I’ve followed the instructions in the binding doco, but the doco doesn’t appear to give a sitemap config for the white/warm bulbs. I’ve taken my best guess but no luck so far; in particular I’m not sure what the mappings should be.
For my first step I just want to be able to create a simple switch that turns them on or off, but I’ve tried the nightliight mode and no luck with that either. I’ve read some of the other posts here where people have managed to get the binding to work, but the configs that have been posted use virtual switches and other tricks, and seem more complex than what should be required.
My configs are below, if anyone can point out what I need to chnage, or post some examples, or let me know where there are examples or further documentation that would be very helpful.
Thanks
sitemap :-
Frame {
Text label="Lights" icon="bulb" {
Text label="Office" {
Switch item=officeMilight mappings=[OFF="Off", ON="On"]
Switch item=officeMilightNight
}
}
}
I did actually try first with no mappings, when I had no luck I changed it to what it is now.
Events debug (with mappings still included) -
2016-10-12 14:09:18 - officeMilight received command OFF
2016-10-12 14:09:21 - officeMilight received command ON
removed the mappings and no change -
2016-10-12 14:12:33 - officeMilight received command OFF
2016-10-12 14:12:38 - officeMilight received command ON
sitemap is now -
Frame {
Text label="Lights" icon="bulb" {
Text label="Office" {
Switch item=officeMilight
Switch item=officeMilightNight
}
}
}
The only thing I noticed is that since I added the configs in openhab.cfg for milight I’m getting the duplicate resource error. From what I have read those warnings are not relevant.
This does not look lige debug log entries.
Please add logger name=“org.openhab.binding.milight” level=“DEBUG” to logback_debug and use start_debug(.sh/.bat)
Then please post all milight relevant lines completely.
BTW, are you shure to have the binding added to your addons folder ???
I’ve added that debug entry in the logger and started in debug mode. When I activate the Milight switches from the web interface I can see in the events log the commands are being sent, as per the previous post. However nothing appears in openhab.log for the debug, except the initial startup -
08:19:07.153 [DEBUG] [.b.m.internal.MilightActivator:34 ] - Milight binding has been started.
Nothing appears after this. The debug is being constantly updated by networkhealth so I know its running -
08:24:10.413 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:85 ] - established connection [host ‘192.168.88.14’ port ‘0’ timeout ‘5000’]
restarted again and this time I also saw these log items -
10:45:30.851 [DEBUG] [i.internal.GenericItemProvider:341 ] - Start processing binding configuration of Item ‘officeMilight (Type=SwitchItem, State=Uninitialized)’ with ‘MilightGenericBindingProvider’ reader.
10:45:30.857 [DEBUG] [i.internal.GenericItemProvider:341 ] - Start processing binding configuration of Item ‘officeMilightNight (Type=SwitchItem, State=Uninitialized)’ with ‘MilightGenericBindingProvider’ reader.
Also, I ran a packet sniffer from the router on the IP address of the milight, there didnt seem to be any packets sent to it, even though I still got the event “officeMilight received command ON”
I’ve seen some other posts for getting Milight working and people have done it very differently, virtual switches with rules and such. I’ll see what I can find. One of those things that theoretically should be very simple but…
Thanks for the help, if anything springs to mind drop me another post
I got it working! After reading a few other postings I tried port 8899 instead of 50000 and all good.
The thing that was misleading me, and I still have to work out, was that I have no messages in the debug log when I activate the switches. I put the same log entries in logback.xml and i can see the debug messages.
one other thing thats confusing about this product, other than the multitude of really badly written and non-functional android apps, is that the product advertising states that you can use any number of bulbs with a single bridge.Is this true? The apps that I have seen only allow for 4 bulbs per device, as does the binding.
No, this is a misunderstanding. You can have quite more than 4 bulbs per group, but they are only controlable in 4 Groups for the white ones, one group for the RGB and 4 groups for the RGBW.