Value from slider

Hi to all,

first sorry for my english, sometimes it is not the best english.

I am new to node red and I have some beginner questions.
My actual problem:

I want to send a massage to an esp contoller with mqtt. The communitaction is working, the frist massages are also working fine. Now I want to send this massage "brightness:X" and X should be a value from a dashborad slider.

I have tried to google but I was not able to find something. I hope some of you can help me.

Thanks danny_v1

Hi.

This is how you do it with the two nodes.
Please understand I can't set the MQTT topic, etc.

But this is how you connect them.

[{"id":"821e7123.2c3898","type":"ui_slider","z":"9245b569.9f881","name":"","label":"slider","tooltip":"","group":"596129cc.2bc108","order":1,"width":0,"height":0,"passthru":true,"outs":"end","topic":"","min":0,"max":10,"step":1,"x":460,"y":4610,"wires":[["a323ab00.fdf3c"]]},{"id":"a323ab00.fdf3c","type":"mqtt out","z":"9245b569.9f881","name":"","topic":"","qos":"","retain":"","x":610,"y":4610,"wires":[]},{"id":"596129cc.2bc108","type":"ui_group","z":"","name":"Load monitor","tab":"6bedb3c5.f5ae94","order":2,"disp":true,"width":"3"},{"id":"6bedb3c5.f5ae94","type":"ui_tab","z":"","name":"TimePi Remote control","icon":"fa-dashboard","order":1,"disabled":false,"hidden":false}]

Copy all this to your clipboard.

Go into Node-red and import via the menu on the right.
Paste the code into the box/area for input.

One suggestion - which I set - is to set the slider node so it only sends the value once you release the slider.

Good luck and welcome to node-red.

This is what it looks like:

Screenshot from 2020-01-23 17-47-20

Thank you very much,

I will try it this evening.

Hi,
I tried it but there is only the value from the slider in the massage, so the massage is for example "1".
But I need to add a string to this massage so that it looks like this :"brightness:1".

I hope someone can help me.

Thanks danny_v1

insert a template node with brightness:{{payload}} in it

Now it works, thank you very much!

Is there a good document I can read to such "standard" informations?