Would any developer be able to create a driver to control wled? It would be perfect to have this control via lan
Tagging @TAustin
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.
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.
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.
Iâm going to see how to install the cli here and Iâm waiting
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.
@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
I will install your driver and see how it works.
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.
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.
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 (```).
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.
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)
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.
exact⊠just turning it on and off goes fine