The "new" Milight IBox and milight binding

Hi,
is it only the overhead of opening a session what concerns you, @David_Graeff?
If so, I think the overhead of trying to keep it alive will typically be higher. Or did I get something wrong here?

Anyway, if the v6 bridge would work, many people would be happy. :slight_smile:

Regards,
Simon

I assume you know about this, right?

I don’t know if it helps.

Simon

@David_Graeff Is this the protocol you implemented?

Yes exactly. The limitlessled website is not existing anymore though and there is no official information. You can find those pieces on different web-pages but none has archived yet to keep a session alive for longer. They are all establishing a new session for each command as far as I have seen.

Do I get you right, that the session handling is the only issue with your current version of the bindung? What’s the benefit about trying to keep the session alive?
Opening the session for every command sounds acceptable as typically therw won’t be that much commands per given timeframe.
Is there anything I can help with?
Simon

Yup, if you can do a bit of Java programming, you could try that scenario out. Establish a new session for each command and see if that is more reliable.

The session is used to determine if the bridge is still online. We can of course also just poll via the discover package (most solutions out there do it like this).

New here and to Opensource projects after recently retiring. So please guidance as needed if I am out of bounds. My ultimate goal is to build a binding for Pioneer SC-LX501. Planned steps on the way were to get a few things setup and then move on to determining how the bindings are built. My immediate next step is to install eclipse and find the documentation on building bindings. I am also expecting an ESP8266 and assorted goodies in the mail tomorrow to play with SimonFlei binding as well. However, if it helps - I am getting this in the logs
==> /var/log/openhab2/openhab.log <==
2019-02-22 15:38:38.323 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.milight.internal.handler.MilightV6RGBCWWWHandler@13fe0d13’: null
java.lang.NullPointerException: null
at org.openhab.binding.milight.internal.handler.AbstractLedV6Handler.sendRepeatableCat(AbstractLedV6Handler.java:212) ~[?:?]
at org.openhab.binding.milight.internal.handler.AbstractLedV6Handler.setBrightness(AbstractLedV6Handler.java:96) ~[?:?]
at org.openhab.binding.milight.internal.handler.AbstractLedHandler.handleCommand(AbstractLedHandler.java:139) ~[?:?]
at org.openhab.binding.milight.internal.handler.AbstractLedV6Handler.handleCommand(AbstractLedV6Handler.java:202) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]
at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [102:org.eclipse.smarthome.core:0.10.0.oh240]
at com.sun.proxy.$Proxy125.handleCommand(Unknown Source) [208:org.openhab.binding.milight:2.4.0]
at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:75) [109:org.eclipse.smarthome.core.thing:0.10.0.oh240]
at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [109:org.eclipse.smarthome.core.thing:0.10.0.oh240]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [102:org.eclipse.smarthome.core:0.10.0.oh240]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]

Looks like a serious bug. Unfortunately I do not have time to fix that in the very near future, as I’m busy with another openHab part. Because you are a new user, I cannot expect you to fill a bug report, can I?

Cheers, David

I can do that - I saw that button today!

David -
Those Java error were due to be adding the bulb thing without marking the bridge. My mistake. If there is not one already - I can capture the logs and versions of everything a create a pull request for the binding and apparently v1.0.08 of the bridge not successfully marrying the globes. Offer woould include testing as well.
Apologies for the mistake

@David_Graeff

I stumbled across this and thought it may be useful, it is a JAR file with instructions on how to use it for sniffing the traffic between a ibox1/2 and the milight app. It will display the keep alive packets Milight uses and more. See post number 6


Hi @David_Graeff,
could you maybe give me some hints where to start and what to change?
I found the classes MilightV6SessionManager and BridgeV6Handler, but can’t where the changes should be made.
I’m new to openhab and bindings development, so please forgive my stupid questions. :slight_smile:
Simon

@MickPB

That’s not neccessary, you can try the Onkyo binding. (There was a fusion of Onkyo and Pioneer in 2015) See also this topic.

Thanks Celaeno. It works perfectly1

So whrere can I download the latest build?^^
Thanks

hi

I really need a bit of help on this because mi light binding is not picking up the zones on openhab 2.5.1 on the new blinding.
do you want any logs?

hope to hear back from you

From Oliver

Most people are using the EspMilightHub which works great. You have posted in multiple threads so I know you have seen it, you just need to read, learn and use it.

1 Like

I looked it up and it looks like it’s a new bridge you can put this flimware https://blog.christophermullins.com/2017/02/11/milight-wifi-gateway-emulator-on-an-esp8266/248/

What parts do you used for EspMilightHub

thanks I have done the bridge also setup with mi light flimware

but how do I connect to openhab openhab is not picking it up?

Stuck at the very beginning:
Ihave the ibox2 with 2 rgb led stripes. I can add the box correctly but i dont see any channels i could use nor can i add new things