WLed: A binding for controlling LED strips and strings from an opensource esp8266 project

  1. How do I use segments?
  2. When changing presetDuration:
    image
2020-11-19 16:32:18.858 [WARN ] [ab.core.internal.events.EventHandler] - Dispatching/filtering event for subscriber 'org.openhab.core.events.EventSubscriber' failed: class org.openhab.core.library.items.DimmerItem cannot be cast to class org.openhab.core.library.items.NumberItem (org.openhab.core.library.items.DimmerItem and org.openhab.core.library.items.NumberItem are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @6bf69d00)
java.lang.ClassCastException: class org.openhab.core.library.items.DimmerItem cannot be cast to class org.openhab.core.library.items.NumberItem (org.openhab.core.library.items.DimmerItem and org.openhab.core.library.items.NumberItem are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @6bf69d00)
	at org.openhab.core.thing.internal.CommunicationManager.convertToQuantityType(CommunicationManager.java:433) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.toAcceptedType(CommunicationManager.java:361) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.lambda$7(CommunicationManager.java:331) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) ~[?:?]
	at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1603) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.handleEvent(CommunicationManager.java:324) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.receiveCommand(CommunicationManager.java:282) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.receive(CommunicationManager.java:158) ~[?:?]
	at org.openhab.core.internal.events.EventHandler.lambda$0(EventHandler.java:152) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]
2020-11-19 16:32:18.866 [WARN ] [ab.core.internal.events.EventHandler] - Dispatching/filtering event for subscriber 'org.openhab.core.events.EventSubscriber' failed: class org.openhab.core.library.items.DimmerItem cannot be cast to class org.openhab.core.library.items.NumberItem (org.openhab.core.library.items.DimmerItem and org.openhab.core.library.items.NumberItem are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @6bf69d00)
java.lang.ClassCastException: class org.openhab.core.library.items.DimmerItem cannot be cast to class org.openhab.core.library.items.NumberItem (org.openhab.core.library.items.DimmerItem and org.openhab.core.library.items.NumberItem are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @6bf69d00)
	at org.openhab.core.thing.internal.CommunicationManager.convertToQuantityType(CommunicationManager.java:433) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.toAcceptedType(CommunicationManager.java:361) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.lambda$7(CommunicationManager.java:331) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) ~[?:?]
	at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1603) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.handleEvent(CommunicationManager.java:324) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.receiveUpdate(CommunicationManager.java:297) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.receive(CommunicationManager.java:156) ~[?:?]
	at org.openhab.core.internal.events.EventHandler.lambda$0(EventHandler.java:152) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]
  1. When changing presetTransformTime:
    image
2020-11-19 16:37:17.680 [WARN ] [ab.core.internal.events.EventHandler] - Dispatching/filtering event for subscriber 'org.openhab.core.events.EventSubscriber' failed: class org.openhab.core.library.items.DimmerItem cannot be cast to class org.openhab.core.library.items.NumberItem (org.openhab.core.library.items.DimmerItem and org.openhab.core.library.items.NumberItem are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @6bf69d00)
java.lang.ClassCastException: class org.openhab.core.library.items.DimmerItem cannot be cast to class org.openhab.core.library.items.NumberItem (org.openhab.core.library.items.DimmerItem and org.openhab.core.library.items.NumberItem are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @6bf69d00)
	at org.openhab.core.thing.internal.CommunicationManager.convertToQuantityType(CommunicationManager.java:433) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.toAcceptedType(CommunicationManager.java:361) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.lambda$7(CommunicationManager.java:331) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) ~[?:?]
	at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1603) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.handleEvent(CommunicationManager.java:324) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.receiveCommand(CommunicationManager.java:282) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.receive(CommunicationManager.java:158) ~[?:?]
	at org.openhab.core.internal.events.EventHandler.lambda$0(EventHandler.java:152) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]
2020-11-19 16:37:17.684 [WARN ] [ab.core.internal.events.EventHandler] - Dispatching/filtering event for subscriber 'org.openhab.core.events.EventSubscriber' failed: class org.openhab.core.library.items.DimmerItem cannot be cast to class org.openhab.core.library.items.NumberItem (org.openhab.core.library.items.DimmerItem and org.openhab.core.library.items.NumberItem are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @6bf69d00)
java.lang.ClassCastException: class org.openhab.core.library.items.DimmerItem cannot be cast to class org.openhab.core.library.items.NumberItem (org.openhab.core.library.items.DimmerItem and org.openhab.core.library.items.NumberItem are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @6bf69d00)
	at org.openhab.core.thing.internal.CommunicationManager.convertToQuantityType(CommunicationManager.java:433) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.toAcceptedType(CommunicationManager.java:361) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.lambda$7(CommunicationManager.java:331) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) ~[?:?]
	at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1603) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.handleEvent(CommunicationManager.java:324) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.receiveUpdate(CommunicationManager.java:297) ~[?:?]
	at org.openhab.core.thing.internal.CommunicationManager.receive(CommunicationManager.java:156) ~[?:?]
	at org.openhab.core.internal.events.EventHandler.lambda$0(EventHandler.java:152) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]
  1. Preset. The list does not open in basicUI. In the settings WLED Interface I added preset16 after creating the files of things and items. Maybe this is the reason?
    Thanks!

What version openhab?
What are you using to send the commands?
Jar or is it the merged binding?

openHAB 3.0.0
Build #2017

BasicUI

Binding

How do I use segments?

See readme here

It needs to be a build made in the last 10 days.

Also check your sitemap against the example in the readme.

Yes! This is a different file than what I was looking at.

There are differences, tomorrow Iā€™ll try and report back.
Thanks!

Some changes were made to get the binding merged and that newer readme will go live when V3 stable is released in a months time.

I couldnā€™t figure out how to manage segments :frowning:
Did I understand correctly that you need to create as many things as there are segments?

Thing wled:wled:stairs_seg0 "seg-01" @ "box" [address="http://192.168.215.29:80", segmentIndex=0]
Thing wled:wled:stairs_seg1 "seg-02" @ "box" [address="http://192.168.215.29:80", segmentIndex=1]
Thing wled:wled:stairs_seg2 "seg-03" @ "box" [address="http://192.168.215.29:80", segmentIndex=2]
Thing wled:wled:stairs_seg3 "seg-04" @ "box" [address="http://192.168.215.29:80", segmentIndex=3]
Thing wled:wled:stairs_seg4 "seg-05" @ "box" [address="http://192.168.215.29:80", segmentIndex=4]

I split into segments in the WLED interface and saved in slot 16.
In BASICUI, no matter what segment I switch, all the segments are switched.
Unfortunately I donā€™t understand how it works :frowning:

Yes, as each segment can have a different FX loaded you need a new set of controls for each. Some tips are:

  1. Donā€™t create segments that overlap, make sure each start and end LED is not overlapping or you get conflicts and it does not work very well.
  2. Some of the controls do nothing or may cause issues as the firmware does not support segments and cycling through FX for example, so those controls should not be linked.
  3. Expect some bugs in the firmware for segments and also expect some big changes in the next firmware of WLED for segments as I believe they are doing a lot of work in that area. I had it working pretty well here, but then after a few minutes of nothing being touched I got glitches and it changing randomly to a new colour.
  4. You need to use the most up to date firmware.
  5. I am not tech support, you need to work it out by playing around with it.

Thanks! Iā€™ll try again later!

@matt1, I just tried the binding and it works very well. Thank you!

I do notice one small issue: the list of FX is not sorted alphabetically; it seems random now, making it hard to search by name.

Thanks for the feedback. If anyone trys the new 0.11 firmware that was released a few hours ago can they post if it works with the binding without issues? It has a long list of changes mostly to do with presets and segments.

do you have a link to find out more ? about this music led looks great

1 Like

Here is the link.
Please note that it works with esp32 only due to adc limitations on esp8266.
And its quite awesome

1 Like

Hello, I am on openhab 2.5.11 , I installed the 2.5.9 wleb bindingā€¦ all work but ā€¦ often I have this message :

2020-12-15 22:24:48.797 [hingStatusInfoChangedEvent] - ā€˜wled:wled:0d995e18ā€™ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): TimeoutException: WLED was not reachable on your network

After 10 secondes itā€™s online. An idea please ? thank you guys :slight_smile:

Sounds like the wifi connection is not stable, the web page for wled probably shows the signal strength to help diagnose it.
Also it is common sadly for some esp8266 boards to have the antenna disconnected and you have to solder bridge a connection to choose between onboard antenna and the socket for external antennas. Google this for pictures and instructions.

Same problem with two esp82. both are next to the wifi router.

I see an option on WLED : ā€œDisable Wifi sleepā€ ā€¦ may be the problem is hereā€¦

What firmware version? I have never see that happen not even once and mine has been on 24-7 for the last 17 days. I am using 10.2 firmware.

I might have missed it in this discussion, but will the WLED binding become an official binding in OH3?

Yes it is already merged so will be installable in the RC1 and newer.

2 Likes

Awesome!