The "new" Milight IBox and milight binding

Nothing to do, even if I enter only the command

sudo mv org.openhab.binding.milight_2.1.0.ref-beta12.jar /usr/share/openhab2/addons/

I always get the same error message. After downloading the .jar file on the Raspbian of my Raspberry, I get lost and do not know how to move. :confused:

I have updated the addon and fixed the offline/online behaviour. Please report back if this works for you all. If there are no further problems, this will be included in the next OH2 addon release. A ready to use jar file can be found here:

Cheers, David

Hey @m.leone,

  • Copy the .jar.pdf file to your Raspbian (via ssh or using the desktop directly). I assume you copied it to /home/your_name/org.openhab.binding.milight_2.1.0.ref-rc9.jar.pdf
  • Remove the .pdf suffix from the file.
  • Make sure there is a /usr/share/openhab/addons directory, for example with the command ls /usr/share/openhab/addons which should show you a list of installed addons.
  • Remove the old milight binding from the paperui while OH2 is running.
  • Copy the new addon while OH2 is running with a command like this: sudo cp /home/your_name/org.openhab.binding.milight_2.1.0.ref-rc9.jar /usr/share/openhab2/addons/. Enter the password.

OH2 needs some seconds to setup the binding. You should find it in the paperui under the Add-ONs section.

Thanks, David

Works for me now, thanks a lot for your help!

@m.leone I used the following commands, give this a try:
cd
wget https://github.com/openhab/openhab2-addons/files/800962/org.openhab.binding.milight_2.1.0.ref-rc9.jar.pdf
mv org.openhab.binding.milight_2.1.0.ref-rc9.jar.pdf org.openhab.binding.milight_2.1.0.ref-rc9.jar
sudo cp org.openhab.binding.milight_2.1.0.ref-rc9.jar /usr/share/openhab2/addons/

That does the following:
go to your home directory
download the jar file
rename the file
move the file to the right directory

Hello David,

i tried your new RC but the Offline issue still exists. I’m not sure if i made a misstake while configuring my bridge or it’s a problem with your new RC.

  1. Added Milight 6 W RGBWW Bulb to iBox2 Color Group 1
  2. new Binding in /usr/share/openhab2/addons
  3. Searching for new Milight Bridge -> added by ip(Without mac-> when i try to use Mac, the bridge went offline)
  4. All available Things appear in inbox, i add colorgroup1(tried with all other groups too) to my things and try to turn on my bulb , but nothing 


Any suggestions?

Usually your bridges should be found automatically. You only need to add them manually if you have to cross multiple network hops (like controlling them trough the internet/vpn). But if you add them manually it is essential that you enter the bridge ID (=mac address without colons) and IP address.

If the bridge without an ID appears online, that’s a bug ^^

Cheers, David

The bridge cant be found by searching. I have to add it manually with these settings


When adding the bridge id the bridge will be offline.

I am still getting this when I try to add it via PaperUI (Error 409 Conflict)
I do not have any manual entries in my things.
2017-02-25 08:31:36.782 [ERROR] [home.core.thing.binding.ThingFactory] - Thing factory (class org.openhab.binding.milight.internal.MilightHandlerFactory) returned null on create thing when it reports to support the thing type (milight:bridgeV6).
2017-02-25 08:31:36.787 [WARN ] [g.discovery.internal.PersistentInbox] - Cannot create thing. No binding found that supports creating a thing of type milight:bridgeV6.

When I do add it manually, I get this
2017-02-25 08:43:26.474 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate command ‘OFF’ for item ‘Light_GroundfloorN’ to handler for channel ‘milight:rgbLed:F0FE6B168FE2:7:nightMode’, because no thing with the UID ‘milight:rgbLed:F0FE6B168FE2:7’ could be found.

Manual entry is.
Bridge milight:bridge:F0FExxxxxxE2 [ ADDR=“192.168.0.237”, PORT=8899, ID=“F0FExxxxxxE2” ] {
Thing rgbLed 6
Thing rgbLed 7
}

Switch Light_Groundfloor “Sconce1” (FF_Living, remote, LivingRoom) {channel=“milight:rgbLed:F0FExxxxxxE2:7:ledbrightness”}

Unfortunately OH2 gets quite confused if multiple versions of a binding were installed and each had a different schema for things.

  • Please have a look at the Readme, your Things for the bulbs are using a zone number of 6 and 7 but zones have to be 1-4 or 0 for controlling all bulbs of that type. This is different in how the old milight binding works.
  • Please don’t provide a port if it’s just the default port. And again have a look at the readme, it is CUSTOM_PORT now.
  • It is now longer the “bridge” type but “bridgeV3” or “bridgeV6”.

You can do a lot of things wrong if you specify things manually. PaperUI have to work otherwise OH2 hasn’t registered the addon correctly which might happen if there are old fragments of milight data still in the database. Try to open the REST API website and scan through the listed things there and remove everything that is milight related, that is the only solution I can thing of at the moment.

Cheers, David

From your screenshot I can tell you that you are not using the latest rc but the old milight addon. That didn’t have support for the iBox that’s why you can’t find them :slight_smile:.

You didn’t remove the jar file of the milight 2.0.0 and 2.1.0 versions from your addons directory.

Cheers, David

@David_Graeff You are awesome ! Your hint was right. I was sure i uninstalled the old version but that never happend. Removed RC from /usr/share/openhab2/addons and uninstalled the binding from paperui . Copied the rc to /usr/share/openhab2/addons again and everything worked as expected !

THANK YOU !

EDIT: I’m not able to switch from an color to white and saturation is not working.

Hi David,
I think my problem is that the directory /usr/share/openhab/addons do not exist on my Raspberry. In fact, in the console by entering the command ls the only voices that appear are “Desktop - Documents - Downloads - Music - oldconffiles - Picturs Public - python_games - Templates - Videos”.
After downloading the file in the path /home/pi/, removing the suffix .pdf and uninstalled the old binding of Milight, I tried the same to add the command

sudo cp /home/pi/org.openhab.binding.milight_2.1.0.ref-rc9.jar /usr/share/openhab2/addons/

but nothing happens, not even an error message (the password is not required from the program and nothing on Paper UI). Then I tried to manually add on Raspbian the path /usr/share/openhab/addons (though I do not know if it’s the right method) creating folders directly from folder pi (not from the console), but once inserted the code sudo cp
 does not happen again nothing, the password is not required from the program and nothing on Paper UI (in this regard, I would like to know by what name appears this update in the Add-ons section of openHAB).
I know it is a problem to be nothing, but I still can not find the solution.

ps. Once added the folders /usr/share/openhab/addons, they appear on the console if I type in the ls code.

Thanks for your patience,
Michele

I’m sorry I don’t have enough time to solve linux problems in this thread. This is not a problem with the addon, please use another thread in the forum.

Just for you to know: cp never returns any message if the action was successful. Try to reboot (restart OH). Look at the incoming box on paperUI.

Cheers, David

Is it a RGBW instead of RGBWW bulb? Then it doesnt have saturation. Please read the readme and the thing description :slight_smile: The saturation slider emulates saturation by changing between white and color at a given threshold.

Thanks, David

Yeah that’s true. Its a RGBW Bulb and the saturation is not working. In my understanding, i switch saturation on to get colored light or off to get white light.

EDIT: I found a solution to deactivate colors. { channel=“milight:rgbwLed:F0FE6B2DC252:1:ledwhitemode”}
But i got another question 
 How can i setup startup color, brightness etc or setup another scene?

Hi @David_Graeff,
thanks for all the help you gave me, I think I’ll open a thread relating to this argument. Let me ask you just one last thing that I am not clear. Once you install this update, with what name appears in the Add-ons section? Milight 2.0.0., Milight_2.1.0.ref-rc9, or with some other name?

Thanks again,
Michele

If you copied the file to /usr/share/openhab/addons u dont need to add the milight binding from the binding section. It’s running automatically!

Hello guys,
in the end I finally managed to add the update. It works very well. :grinning:
Thank you for helping me and for adding this file to run the iBox1. :slight_smile:

Michele

Hello!
iBox2, RGBW LED bulb.

milight.things:

Bridge milight:bridgeV6:F0FE6B1E2F2E [ADDR="192.168.1.61", ID="F0FE6B1E2F2E" ] {
    Thing rgbwLed 1 "Zone-01" @ "Milight" 
}

milight.items

Switch	milight_switch_01			"Power"						{channel="milight:rgbwLed:F0FE6B1E2F2E:1:ledbrightness"}
Dimmer	milight_brightness_01		"Brightness"				{channel="milight:rgbwLed:F0FE6B1E2F2E:1:ledbrightness"}
Color	milight_color_01			"Color"			<colorlight>{channel="milight:rgbwLed:F0FE6B1E2F2E:1:ledcolor"}
Switch	milight_whitemode_01		"White"						{channel="milight:rgbwLed:F0FE6B1E2F2E:1:ledwhitemode"}
Switch	milight_nightmode_01		"Night mode"				{channel="milight:rgbwLed:F0FE6B1E2F2E:1:nightMode"}
Dimmer	milight_animationmode_01	"Mode"						{channel="milight:rgbwLed:F0FE6B1E2F2E:1:animation_mode_relative"}
Dimmer	milight_animationspeed_01	"Speed"						{channel="milight:rgbwLed:F0FE6B1E2F2E:1:animation_speed_relative"}

home.sitemap

    Frame {
		Switch item=milight_switch_01
		Slider item=milight_brightness_01
		Switch item=milight_whitemode_01  mappings=[ON='On']
		Switch item=milight_nightmode_01  mappings=[ON='On']

		Switch item=milight_animationmode_01 mappings=[DECREASE='-', INCREASE='+']
		Switch item=milight_animationspeed_01 mappings=[DECREASE='-', INCREASE='+']
		Colorpicker item=milight_color_01
    }

openhab.log:

2017-03-02 17:32:57.863 [ERROR] [ng.milight.handler.MilightLedHandler] - Channel unknown nightMode
2017-03-02 17:34:43.178 [ERROR] [nal.protocol.MilightV6SessionManager] - Session registration aborted by timeout timer!

More in depth I have not tested later tell. Now I can say, night mode does not work (see log file). The choice of color is shifted, the red and yellow is selected. In paperUI tied animation speed and animation mode, and there is no night mode. What a row (last) in the log file?
Thank you for your work!

PS milight_2.1.0.ref-rc9.jar

Hey thanks for the test. The error message is ok if it still works for you. It just means that the binding lost the connection in between. Nightmode channel is called lednightmode. If this is wrong in the readme I have to correct that.

The color for yellow is off I know that but can’t really do anything because I don’t have an ibox to calculate a correction function. Most colours should work though.

Cheers david