logo elektroda
logo elektroda
X
logo elektroda

How to control RGB LED colours via Domoticz and RPi 3 using a dimmer?

shooterkacpi1995 1674 3
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 17948031
    shooterkacpi1995
    Level 2  
    Warm welcome,

    I'm trying to do an RGB LED control via RPi 3, using a dimmer from Domoticz. Is it at all possible to do this? I would like that when changing the % dimmer, the colour of the LED light changes smoothly. Alternatively, it would be sufficient for me to know if there is such a possibility in Domoticz to assign a given % dimmer to a given executable in python and what formula to use then in LUA. I am keen to control the LED directly from the GPIO of the Raspberry.

    Thank you in advance for your help,
    regards,
    Kacper D.
    Do you have a problem with Raspberry? Ask question. Visit our forum Raspberry.
  • ADVERTISEMENT
  • #2 17948144
    xury
    Automation specialist
    As for the control itself, it certainly can be done, and probably in many ways. It all depends on how the diode is connected. Will it be connected directly to the gpio or via a driver of some kind. Will the current output from the gpio be sufficient? Because as you know, the maximum current is 17mA.
  • ADVERTISEMENT
  • #3 17948746
    shooterkacpi1995
    Level 2  
    The diode would be directly connected to the GPIO. Such a current is perfectly sufficient for me. Could you drop me a reasonably simple solution? :) Alternatively, as I wrote, maybe you know how to create a LUA for the dimmer that would call the given executables in python?
  • #4 17948834
    xury
    Automation specialist
    Just as a quick what comes to mind:
    Code: Lua
    Log in, to see the code
    .
    Of course it needs refinement. This is only a skeleton. We write such a script in the Events menu in Domoticz. It is a dzvents script.
    mojdimmer is the name of the dummy switch in domoticz. I recommend reading:
    https://www.domoticz.com/wiki/DzVents:_next_g...cripting#Switch_.28dimmer.2C_selector_etc..29
ADVERTISEMENT