Will we have an edge lan driver to control wled?

Would any developer be able to create a driver to control wled? It would be perfect to have this control via lan

Tagging @TAustin :slight_smile:

You could do it now with Webcore:

I’m not really knowledgeable about WLED, but yes, it looks quite doable to create an Edge driver to send commands to it, but the main consideration is what functions would be needed and how to initiate them either from the mobile app or from automation routines or Rules engine. And can we accomplish everything without needing a SmartApp.

I’ll have to get up to speed on the API.

1 Like

today it works for me with a DHT but in the routines it is cloudy and it would be great if it worked over LAN. I followed some screenshots and the link to the dht I use

DHT





Ah you already have a DTH; I take it that you’ve already asked the original author to port it to Edge ? It looks like it would be very straight forward.

If he/she can’t do it, I could but I don’t have a way to test it. You would have to do that and be able to install and use the CLI.

1 Like

I already talked to him but his daughter was born a short time ago (he is from Brazil too). and said he has no time to move because he is focused on work and on her for now. I can help you in the testing process with the greatest pleasure.

Well that’s a wonderful reason not to be writing device drivers!

As long as you can run logging with the CLI, we can get this done. I’ll get back to you sometime this coming week with a driver to try.

1 Like

I’m going to see how to install the cli here and I’m waiting

1 Like

Hello again. I have a question for you. In looking at the material you posted above, I see there are two separate ‘path’ configurations - one set in the device preference settings (shown with value=“T=__switch__&SB=__level__
”), and one set on the device controls page (shown with value=“RV=0&SS=0&SV=1”. If I understand the DTH correctly, it looks like they are eventually combined when the request is sent to the WLED server.

Can you please help me understand the purpose of having two separate fields like this?


One further thought for you to consider: you could use my Web Requestor Edge driver today to send the WLED server any HTTP request string you’d like. And you can save up to 50 of them in one device and then use automations to invoke them whenever and in whatever order you’d like. It doesn’t provide the nice user interface that the DTH gives you for individual commands, but if you use it primarily to set up automations, then Web Requestor might serve your needs.

1 Like

@w35l3y could you give more details to @TAustin about how the dht for wled you developed works? he is studying the possibility of migrating and creating a driver for him

1 Like

I will install your driver and see how it works.

1 Like

You are right.
The ideia behind this is to have a fixed part defined in the preferences that would never change and another one that could be used wildly in automations/routines (and also can override the fixed part defined in preferences).
So we could use different paths depending on the routine.

This is because I only wanted to implement the basic functionalities like switching on/off and changing colors.
Everything else could be done with this advanced field.

I didn’t go further because I was learning how to make custom capabilities at that moment in the past and this path field wasn’t working on automations due to some smartthings limitation. I don’t know if it was fixed already.

2 Likes

If you don’t mind, it is always a good practice to reference the original source:

You have a very good driver.
I intend to learn lua someday in near future.

1 Like

I have a driver for you to test. If you don’t have the CLI logging working yet, you can still give it a shot and see if it works. However if you do have the CLI installed, it will be helpful to be able to watch the logs to see what’s happening.

Here is the channel invite: https://api.smartthings.com/invitation-web/accept?id=8f025878-71e3-4bb4-bbac-5dd37b1a27eb

Enroll to your hub and then select the driver named ‘WLED Driver’

Once it has gotten installed onto your hub, start logging for the WLED driver:

smartthings edge:drivers:logcat

then in the mobile app, do an Add device/Scan nearby and a new device will be added and found in your ‘No room assigned’ room. Go in and set the WLED server address in the device Settings and then see if you can control your lights.

If you have any issues, capture the log output and paste here surrounded by triple-backwards quotes (```).

1 Like

ours worked almost 100%
 I was able to turn it on and off, change color, effect, dimmer. Only when I put in some routine to turn on and enter some effect I get a network error when trying to save
something else
 is it possible to put the effects in alphabetical order from a-z?

Those might be app issues - network errors usually are and if you wait a little longer and try again it may go away. Nevertheless I’ll try to recreate it.

The effect list being in random order is an Edge issue right now. Hopefully it will get fixed sometime in the future.

1 Like

I was able to recreate the error during automation routine creation. It appears to be related to the effect mode capability. If you don’t try to change it, the automation saves OK. I’ll have to look at the custom capability definition (I am using Wesley’s original definition)

2 Likes

very happy to have something with wled already running locally
 i have some here with led tape using nodemcu and it helps a lot
 i hope it’s possible to adjust these errors
 in wled’s github you may have something to help.

1 Like

exact
 just turning it on and off goes fine