How to control light with analog signal input and no analog output

Helo,

I am looking for a program solution to control a light.
Discription:

I use an eltako dimmer EUD12Z UC with SUD12 0-10v eltako to normal 0-10v converter.
When I press the button then the lights go's on. Pressing long then the dimming effect starts. The value of the analog signal is changing.
I will bring this analog signal into Arduino with a voltage divider. Then i will see on what brightness the lights ar shining.
But now the tricky part. How can I regulate this with a fader? In home assistant i can make input_numeric and set value between 0-100. If i set it to 65 brightness i should regulate the light dimmer to 665 analog value (1024/100*65).
How can this be done with node red that it works automaticaly? If it starts from 0 then it should run up and slow down to reach the analog value. When its to far it should go down.

Is this even possible???

regards
Andries

You can use a range node to map 0-100 to 0-1024, followed by a change node to floor the value.
e.g.

[{"id":"ab556716.b58c4","type":"inject","z":"c74669a0.6a34f8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"65","payloadType":"num","x":100,"y":3640,"wires":[["55294b5f.144964"]]},{"id":"55294b5f.144964","type":"range","z":"c74669a0.6a34f8","minin":"0","maxin":"100","minout":"0","maxout":"1024","action":"scale","round":false,"property":"payload","name":"","x":260,"y":3660,"wires":[["75973e87.4980b8"]]},{"id":"75973e87.4980b8","type":"change","z":"c74669a0.6a34f8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$floor(payload)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":3700,"wires":[["2718fd9c.8710ca"]]},{"id":"2718fd9c.8710ca","type":"debug","z":"c74669a0.6a34f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":480,"y":3640,"wires":[]}]

Thx!
I will try that!
I will come back on this topic. For the moment I don't get a 0-10v signal at all... have to solve this first if i won it to work.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.