Closed AndreasHeine closed 3 years ago
if set
const glow = false; //msg.glow;
glow is gone ...
Hello @AndreasHeine !
To clarify is injecting a glow
false of false turning it off or is it still on?
Internally the control is passing glow
amongst itself, and would overwrite values of glow
someone sent further up the line. Perhaps the controls should internalize both the color and glow results in its own payload
, hmmm!
injecting glow false does not turn the glow off! yes color too - at least its similar code
Gotcha! Would you have expected it to? If you read through the README documentation glow
and color
aren't expected msg.payload
values. Can you explain your usage so I can understand better and we can discuss what would make sense?
message object: msg.payload msg.glow msg.color
i would expect that the led glow updates on message!? at least i tought thats what the code looks like (i might be wrong)
That code is internal to the node, the msg
with glow
and color
are processed from the payload it receives and sent between different parts of the node (a result of the way Node-RED dashboard signals). The code isn't really a great way to learn how to use the node, the README is best!
if i look for example into the dashboard gauge its possible to change the sections on message same in some charts aswell. i normaly hardcode them off because i dont like the glow effect...
plus one
So to clarify when you want to independent of the msg.payload
value toggle the glow effect do you mean any coloration of the led or just the actual hazy glow around it?
both color and glow would be a awesome features!
if you want to change the colors of the sectors you can send a msg with a ui_contorl obj and empty payload obj to adjust the colors dynamic according to a setpoint
let upper = msg.payload * 1.04;
let lower = msg.payload * 0.95;
msg = {};
msg.ui_control = {seg1:lower||0,seg2:upper||0}
return msg;
Gotcha! I'm going to rename the issue accordingly for the glow, that would be new functionality.
Have you had a chance to read the documentation re: color definitions in the message (vs the default in the config panel): https://github.com/Adorkable/node-red-contrib-ui-led/blob/master/README.md#custom-statuses-in-msg . Let me know if that isn't enough, if there is some functionality regarding the colors that you don't think is covered here.
if i inject a msg.glow = false the glow is still there!?