EspMilightHub new binding for milight limitlessLED and easybulb

No worries, OH has its problems with starting. The zwave binding will eventually sort itself out. The ESPMilightHub binding gets in a panic mode and will fill the logs pretty quickly.

Either way, it has become customary to do a restart of OH due to other inconsistencies in the core.

1 Like

It was a bug: https://github.com/Skinah/EspMilightHub/commit/0f04475ba6252eb64f5e6a9d0a41e2000e07cbb6

I’m still having issues when trying to use the 2.5 binding. I don’t have this issue with 2.4 so I’m wondering what I can look at to help resolve the issue. basically the system works for about 2 minutes after reboot. then it starts to become unstable, and I start to get connects/disconnects to the MQTT (mosquitto) broker. They are running on the same machine, the ESP module has no issues staying connected to the broker, but for some reason the binding keeps connecting and disconnecting.

15:29:25.641 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:esp8266Bridge:001’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): MQTT broker connection lost:Connection lost (32109) - java.io.EOFException

15:29:25.676 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:esp8266Bridge:001’ changed from OFFLINE (COMMUNICATION_ERROR): MQTT broker connection lost:Connection lost (32109) - java.io.EOFException to ONLINE

15:29:25.681 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:rgbw:001:0x14BA1’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

15:29:25.687 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:rgbw:001:0x14BA2’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

15:29:25.691 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:rgbw:001:0x14BA3’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

15:29:25.695 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:rgb_cct:001:0x88F1’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

15:29:25.699 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:rgb_cct:001:0x88F2’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

15:29:25.706 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:rgb_cct:001:0x88F3’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

15:29:25.714 [INFO ] [ub.handler.EspMilightHubBridgeHandler] - Sucessfully connected to the MQTT broker.

15:29:25.715 [INFO ] [ub.handler.EspMilightHubBridgeHandler] - Sucessfully connected to the MQTT broker.

15:29:25.729 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:rgbw:001:0x14BA1’ changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

15:29:25.739 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:rgbw:001:0x14BA2’ changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

15:29:25.749 [ERROR] [ub.handler.EspMilightHubBridgeHandler] - MQTT connection has been lost, cause reported is:{}

org.eclipse.paho.client.mqttv3.MqttException: Connection lost

at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:190) [53:org.eclipse.paho.client.mqttv3:1.2.2]

at java.lang.Thread.run(Thread.java:748) [?:?]

Caused by: java.io.EOFException

at java.io.DataInputStream.readByte(DataInputStream.java:267) ~[?:?]

at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:92) ~[?:?]

at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:137) ~[?:?]

… 1 more

15:29:25.769 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:rgbw:001:0x14BA3’ changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

15:29:25.765 [INFO ] [ub.handler.EspMilightHubBridgeHandler] - Sucessfully connected to the MQTT broker.

15:29:25.782 [INFO ] [ub.handler.EspMilightHubBridgeHandler] - Sucessfully connected to the MQTT broker.

15:29:25.789 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:rgb_cct:001:0x88F1’ changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

15:29:25.797 [ERROR] [ub.handler.EspMilightHubBridgeHandler] - MQTT connection has been lost, cause reported is:{}

org.eclipse.paho.client.mqttv3.MqttException: Connection lost

at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:190) [53:org.eclipse.paho.client.mqttv3:1.2.2]

at java.lang.Thread.run(Thread.java:748) [?:?]

Caused by: java.io.EOFException

at java.io.DataInputStream.readByte(DataInputStream.java:267) ~[?:?]

at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:92) ~[?:?]

at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:137) ~[?:?]

… 1 more

15:29:25.814 [INFO ] [ub.handler.EspMilightHubBridgeHandler] - Sucessfully connected to the MQTT broker.

15:29:25.803 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:rgb_cct:001:0x88F2’ changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

15:29:25.834 [INFO ] [ub.handler.EspMilightHubBridgeHandler] - Sucessfully connected to the MQTT broker.

15:29:25.830 [ERROR] [ub.handler.EspMilightHubBridgeHandler] - MQTT connection has been lost, cause reported is:{}

org.eclipse.paho.client.mqttv3.MqttException: Connection lost

at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:190) [53:org.eclipse.paho.client.mqttv3:1.2.2]

at java.lang.Thread.run(Thread.java:748) [?:?]

Caused by: java.io.EOFException

at java.io.DataInputStream.readByte(DataInputStream.java:267) ~[?:?]

at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:92) ~[?:?]

at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:137) ~[?:?]

… 1 more

15:29:25.839 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:rgb_cct:001:0x88F3’ changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

15:29:25.871 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:esp8266Bridge:001’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): MQTT broker connection lost:Connection lost (32109) - java.io.EOFException

15:29:25.880 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:rgbw:001:0x14BA1’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

15:29:25.883 [INFO ] [ub.handler.EspMilightHubBridgeHandler] - Sucessfully connected to the MQTT broker.

15:29:25.890 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘espmilighthub:rgbw:001:0x14BA2’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

caches cleared. any help in what I should look for. I’m somewhat baffled. Since I got lots of time at home :wink: figured I would try to find out what the issue is.

Thanks much+++

See issue at GitHub

New build now uploaded to fix the above mentioned issue of mass reconnects.

1 Like

Cleared tmp/cache and restarted with new binding version and no errors noted. Great work!

1 Like

Hey guys,

I am new at this forum and alsow new at openHAB. I just installed openHAB and got some things working already, good stuff! :slight_smile:

I made a EspMilightHub and I can control the lights via openHAB. I configured it via the paper UI. Thanks a lot for everybody who contributed to this topic!
The only problem I have (for now :slight_smile: ) is that openHAB doesn’t update the status of the lights when I use my remote to control the lights.
In my MQTT broker I can see that in topic milight/states/+/+/+ the new state is sent when I use my remote but openHAB doesnt seem to read this information.

In the webinterface of the milighthub in settings MQTT I set the following:
MQTT state topic pattern: milight/states/:device_id/:device_type/:group_id
Group state fields: state, level, hue, saturation, mode, color_temp, bulb_mode

Can anybody point me in the right direction to get this working?

Can the EspMilightHub and Wled sync together ?

They work fine on the same system together.

Can you please show how this is possible I was thinking to have my Milight gu10/E27 lights bulbs
follow the color of a wled or vice versa around my tv and other places ,but i have no idea how ? is it via UDP or how to combine the two bindings , this will be a lot cheaper then buying Philips hue led strips that can easily follow the wled ,i have the EspMilightHub up and running whit a lot of lights bulbs ,so if this is posible it wood be very cool and beautiful.

Or just a hint too what to look for ???’

is it via the UDP or what

Hi, having some problems with binding … After major breakdown i setted this binding again, but im not gettin it to send mqtt commands, at all.

Im using paper only, it did find loads of globes, which none of them sends anything to mqtt…

Im using mosquitto, and esp2mh is working nicely. I dont see any error in openhab log, ot in karaf console with DEBUG :confused:

Im confused, before breakdown when i added it, it was super easy to get this working …

-Tomi

Try doing three reboots of openhab. Openhab 2.5.x seems to need multiple restarts for cache to be created and for things to start working.

Thnx, one restart did it :slight_smile:

Hi @matt1, after longtime
I’m getting crazy with this scenario
2 Bulb FUT106 (RGB_CCT) assigned to a virtual ID 0x6666 on the Hub

`Thing   rgb_cct         0x66661   "Spot Mansarda"`
Dimmer                  Spot_Cursore       "Spot Dimmer"    {channel="espmilighthub:rgb_cct:001:0x66661:level"}
Dimmer                  Spot_Ctemp         "Spot Temperatura"                {channel="espmilighthub:rgb_cct:001:0x66661:colourtemperature"}```

Now the strange behavior is:
MQTT explore indicate after a the switch action an Id called 0x0 under the State structure where the same action executed via Sitemap indicate the 0x6666 Id is used under the Command structure


Under Sitemap via the binding command is not executed
Via the Hub is normally executed
![MQTTEXP|304x500](upload://fRWBPqAm5UuCbfq1P7eHUUO73o6.jpeg) 
Thanks in advance if you got the time

Can you write the strange behaviour description again in different words? Sorry but I don’t understand what the issue is.

Sorry, try to clarify.

It happen with a virtual id defined via thing and item file, commands seems not to be received by the bulbs but the same commands are correctly addressed via the Hub Web Interface with the same virtuali Id
I tried to pair the bulbs with a remote control and using the Id in the same things and item files are well interpreted and executed, meaning I simply substitute all the definitions with the real Id without typing errore
So, pairing with virtual Id with web interface is not working within Openhab
Tried different virtual id, the last and current is 1234 and protocol choice is RGB_CCT

Things

     Thing   rgb_cct     0x12341   "Spot Mansarda"

Items

Switch        Spot_Stato         "Spot On/Off"         (GMansarda)        {channel="espmilighthub:rgb_cct:001:0x12341:level"}
Dimmer        Spot_Cursore       "Spot Dimmer"                        {channel="espmilighthub:rgb_cct:001:0x12341:level"}

Sitemap

   Text label="Spot" icon="lamps"  { //               Switch item=Sopra_Stato label="Acc&Spegn"
            Switch item=Spot_Stato label="AccSpegn"

			   Slider 		item=Spot_Cursore label="Intensita'"
			   Slider 		item=Spot_Ctemp label="Calore"
            Colorpicker item=Spot_Colore
            Selection	item=Spot_Cmd mappings=[next_mode='next_mode', previous_mode='previous_mode', mode_speed_up='mode_speed_up', mode_speed_down='mode_speed_down', set_white='set_white', pair='pair',unpair='unpair',level_down='level_down',level_up='level_up',temperature_down='temperature_down',temperature_up='temperature_up',night_mode='night_mode',favourite_white='favourite_white']
			   Switch 		item=Spot_SndCmd mappings=[ON="Send"]
         }         

Bulbs are FUT016

Thanks

Ok so if I understand, the Hubs web UI works, but the binding does not? Then watch the MQTT messages passing through the MQTT broker and look to see what is different. The readme has some example linux commands to watch the mqtt traffic with.

Sorry Matt, you put me on the right way so your help got the but
I defined the virtual id in the Device Name field of the web interface instead of Device Id
So consequently a 0x0 virtual id was addressed by MQTT not mine (0x1234)
Thank you so much

New builds for openHAB V3.x and also 2.5.9

Precompiled JAR files and source code are available here:

Hi Matt,

I don’t see a link to a pre-compiled jar for version 2.5.9. Can you make it available also?

Thanks a lot for this binding!