Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to toggle glow effect around LED on and off from config panel #55

Closed
AndreasHeine opened this issue Sep 22, 2020 · 12 comments
Closed
Labels
enhancement New feature or request

Comments

@AndreasHeine
Copy link

AndreasHeine commented Sep 22, 2020

22 Sep 09:33:59 - [info] Node-RED version: v1.1.3
22 Sep 09:33:59 - [info] Node.js version: v12.18.3
22 Sep 09:33:59 - [info] Windows_NT 10.0.18363 x64 LE

Unbenannt4

Unbenannt

if i inject a msg.glow = false the glow is still there!?

Unbenannt1
Unbenannt2
Unbenannt3

@AndreasHeine
Copy link
Author

if set

const glow = false; //msg.glow;

glow is gone ...

@yoiang
Copy link
Member

yoiang commented Sep 22, 2020

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!

@AndreasHeine
Copy link
Author

injecting glow false does not turn the glow off!
yes color too - at least its similar code

@yoiang
Copy link
Member

yoiang commented Sep 22, 2020

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?

@AndreasHeine
Copy link
Author

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)

@yoiang
Copy link
Member

yoiang commented Sep 22, 2020

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!

README

@AndreasHeine
Copy link
Author

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...

@zaubererty
Copy link

plus one

@yoiang
Copy link
Member

yoiang commented Oct 7, 2020

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?

@AndreasHeine
Copy link
Author

both color and glow would be a awesome features!

dashboard gauge node:

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;

Unbenannt

@yoiang
Copy link
Member

yoiang commented Oct 13, 2020

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.

@yoiang yoiang changed the title msg.glow doesn't seem to work Add ability to toggle glow effect around LED on and off from config panel and from msg Oct 13, 2020
@yoiang yoiang added the enhancement New feature or request label Jan 13, 2021
@yoiang yoiang changed the title Add ability to toggle glow effect around LED on and off from config panel and from msg Add ability to toggle glow effect around LED on and off from config panel Jan 13, 2021
@yoiang
Copy link
Member

yoiang commented Jan 13, 2021

The ability to disable the glow effect has been added to the node config panel in version 0.4.4!

Created a separate issue for toggling from msg.

@yoiang yoiang closed this as completed Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants