Configuration UI v2 #436
Replies: 4 comments 4 replies
-
@KeiranHines First off, I'm so happy you're asking these questions! The endpoints we're now discussing have been there for ages by now (well, that's what it feels like to me :) ), so it's great someone is finally picking these up! I'm a bit short on time right now, so I'll focus on the API questions first. I can't deduce from your questions if you've read REST_API.md, but in addition to what's there:
It's good to know that quite a few effects get some of their configuration from the device settings (like 12HR/24HR time, time zone, location, etc.) So, offering a UI for the device settings will also contribute to the configurability of such effects. I hope this helps. I'll take a look at the actual UI design later today. |
Beta Was this translation helpful? Give feedback.
-
I did a quick check: the only setting that current has validation is the openWeatherApiKey device-level setting. That's also the only one that's "secret"; its value can be written but not retrieved via /settings. Actual validation requires writing via /settings/validated, as I'd guess you already know. |
Beta Was this translation helpful? Give feedback.
-
Lots of "my" effects had places marked for settings. (18/57) I've not
updated my own trees yet with what actually landed, but LOTS of them had
hardcoded "Settings" at the top for Speed and Scale. These came from a
place where there are a couple of "knobs" that could be externally turned,
presumably while they were running, from 0-100. We didn't have the UI, so
they were just hardcoded.
Actually looking at the web tree: PatternSMPicasso3in1
<https://github.com/PlummersSoftwareLLC/NightDriverStrip/blob/d2ed96286510df3d415ea356233ec5f4884792f3/include/effects/matrix/PatternSMPicasso3in1.h#L11>
has
some pretty gnarly code that overrides even that so Scale is taken from
0-33, 34-65, 66-100 (ish) to implement three different effects and "scale"
(which is never actually used for "scale" at all in any of the *SM*
effects, I think, could be a slider within them. PatternSMFire2021
overloads palette (which I may have gotten wrong) and something else inside
of Speed and Scale. PatternSMStrobeDiffusion has some knobs
They probably need some kind of "onSettingChanged" watcher to pick up
changes, but the basic wiring of "numbers that should change how an effect
draws" are present in many of those. Like in PatternSMHolidayLights.h, I
probably wouldn't have made "speed" const if I'd had a UI (or had a
connection from the JSON down to the effect that I'd known about) so some
of them may need the wire nuts removed before hooking a real UI back up to
them, but the wiring is there.
So I'd tried to get my head around how runtime changed settings were
supposed to work. We'd all kind of snipped at each other about how we
needed or didn't need change observers or notifiers or signals or {/waves
hand} something but never really had a UI to chase it. Maybe if the ojects
were torn down and destroyed every time you clicked + or - in the UI
(yikes!) and we pulled those out of the JSON that would work and we could
pull them from the effects constructors, but that seems like putting the
car in park to turn the steering wheel.
There were a lot more in
https://github.com/PlummersSoftwareLLC/NightDriverStrip/tree/all-robertlipe-effects/include/effects/matrix
but, well, here we are.
If you're just looking for ONE to start with, I'd poke at
PatternSMPicasso3in1.h.. Implied by the name, there are three distinctly
different Draw() functions in that one and they each have a pretty wild
range. I remember recompiling and messing with that one dozens of times
with different Speed values. (And finding some that just worked badly...)
Now that I think about it, some of those that use bands (0-32, 33-65,
etc...) stand a chance of flipping out if those effects roll over from band
to band while running. Those just represent, uh, "opportunities." :-)
I think I had the other half of Rutger's described "catch 22".
As for seeing the first color changes, I think the color buttons on our
remote trigger them on some of the older effects.
I think there are visually interesting things that can be done in the *SM*
effects. Let's figure out together how to get those from a key on a remote
or a slider on the web down into the effects and changing our blinkage.
…On Fri, Sep 22, 2023 at 2:00 AM Keiran Hines ***@***.***> wrote:
Thankyou for all the info. I'll look to add device level settings as well
for time etc. Hopefully once I have some config ui up that will encourage
other contributions for exposing settings.
—
Reply to this email directly, view it on GitHub
<#436 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCSD36AG3ZY5LKLGKR2IITX3UZPVANCNFSM6AAAAAA5CMT2IY>
.
You are receiving this because you are subscribed to this thread.Message
ID:
<PlummersSoftwareLLC/NightDriverStrip/repo-discussions/436/comments/7078315
@github.com>
|
Beta Was this translation helpful? Give feedback.
-
PR is up: #442
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have started to design an updated configuration UI for configuring effects. The below screenshot shows the progress so far. the essence will be a dialog built from the data from /settings/effect and /settings/effect/spec. Any and all feedback is welcome on this idea.
@rbergen for API endpoints. I noticed an
/effectsConfig
endpoint which looks to have more configuration than the current endpoints I am using. Should I look at using this endpoint for anything. Or for the/settings/effect/spec
endpoint. Do you know of any effects that leverage those settings outside of the default name and time? Particularly any I can use to validate Palette or Color data types, or that make use of the validation property?Thanks as always,
Keiran.
Beta Was this translation helpful? Give feedback.
All reactions