Not able to create a new trigger with WLED Recall Preset

rodb
Posts: 13
Joined: Fri Nov 10, 2017 7:04 pm

Not able to create a new trigger with WLED Recall Preset

Post by rodb »

Creating a trigger with Actions -> Type "Recall Preset (WLED Actions)"

I get the following error in the Configure Recall Preset Edit window when I attempt to set the preset number.

Error validating fields. Hover over the red
field labels above to see the error reason.


In the log I get this error.

WLED Error Error in plugin execution UiValidate:

File "plugin.py", line 370, in validateActionConfigUi
type: name 'xrange' is not defined


Using 13.3 WLED. I have tried going back to 11, same error.

I cannot create new triggers or edit existing working triggers with Recall Preset as the Action.

Just changing the preset number on a working Recall Preset action generates the error.

I can duplicate a working trigger and use it for different triggers but am limited to the 0 and 1 that I had already created. The newer version of WLED doesn't use 0 for preset IDs so I am stuck with just 1.

Indigo 2022.1.2
neilk
Posts: 729
Joined: Mon Jul 13, 2015 1:51 pm
Location: Reading, UK

Re: Not able to create a new trigger with WLED Recall Preset

Post by neilk »

Hi rodb,
It has been some time since I dug deep into this plugin and I have fallen behind testing with newer WLED versions. I will take a look and I sure it can be resolved but it may be the weekend as I am mid migration onto a new Mac for my development machine.
Thanks,
Neil
neilk
Posts: 729
Joined: Mon Jul 13, 2015 1:51 pm
Location: Reading, UK

Re: Not able to create a new trigger with WLED Recall Preset

Post by neilk »

rodb,

Actually it was a really simple fix, and apologies something I missed in the migration to Python 3 and the subsequent testing. the xrange becomes simply range in Python 3.

I will spend some more time at the weekend checking for more issues but in the interim try

https://github.com/neilkplugins/WLED-in ... 2.0.2alpha

That should give you access to those presets !

Please let me know if this works for you, and I should be able to formalise as well at the weekend.

Neil
rodb
Posts: 13
Joined: Fri Nov 10, 2017 7:04 pm

Re: Not able to create a new trigger with WLED Recall Preset

Post by rodb »

neilk, Recall Preset now works great with WLED version 0.13.3.

It is the only Action I use and tested.

It has red text in the Configure Recall Preset window on error that says to hover over
red field labels to see the error reason. I didn't understand this when I got the error
before. I get no error now but when I intentionally get it to error by putting in a letter
instead of a number, because I was curious, I get the red message but I see nothing
red to hover over. Not a problem because editing Recall Preset works now.

I very much appreciate that you created this plugin and took the time to update.
neilk
Posts: 729
Joined: Mon Jul 13, 2015 1:51 pm
Location: Reading, UK

Re: Not able to create a new trigger with WLED Recall Preset

Post by neilk »

Not a problem, and thanks for the feedback. WLED was my first plugin after learning python and the Indigo API, an the code is more than ugly but it does work. I will take a look at the validation as it should give a useful indication of the issue, but entirely possible the implementation was clumsy. It is more useful when you have multiple fields to validate, but that is no excuse :-)

Update: I spotted the error in the validation, failed to change the field name when I cut and pasted the validation from another action, hence the wrong field name passed back and no highlighting, this will be fixed in the formal released version.
neilk
Posts: 729
Joined: Mon Jul 13, 2015 1:51 pm
Location: Reading, UK

Re: Not able to create a new trigger with WLED Recall Preset

Post by neilk »

Version 2022.0.3 posted to the plugin store that removes this issue (and the other use of orange I had missed) as well as the UI validation bug you highlighted when the field was not highlighted.
Post Reply

Return to “WLED LED Controller”