Author Topic: Nodemcu running WLED with usermod for muli relay controls.  (Read 1525 times)

Offline ubear7

  • Newbie
  • *
  • Posts: 4
    • View Profile
Nodemcu running WLED with usermod for muli relay controls.
« on: April 04, 2022, 07:11:50 PM »
I'm running Nodemcu with WLED and a usermod for multi relay controls. The led lights are controlled through GPIO 2 and GPIO 1. The relays are controlled on GPIO 5,4,12, and 13. H Is it possible to control the relays through Xlights? If so how do I setup the controller. If not could this support be added? I have several dumb led static displays that I want to turn off with all the lights during a sequence.

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Nodemcu running WLED with usermod for muli relay controls.
« Reply #1 on: April 06, 2022, 07:56:05 AM »
You need to have a controller that can take in the command to turn on a pixel and let that drive a relay outputs.  Others have done it like the Pixel2Things devices.  The support that needs to be added is not inside xLights its the code running in the Nodemcu that needs to support it.

Offline ubear7

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Nodemcu running WLED with usermod for muli relay controls.
« Reply #2 on: April 06, 2022, 05:15:39 PM »
The controller in its native WLED app controls both the led lights and the relays. I would think that a simple on/off signal to a gpio pin wouldn?t be too difficult. But then again I know nothing about coding or how they actually work. ;D Just learning as I go.

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Nodemcu running WLED with usermod for muli relay controls.
« Reply #3 on: April 07, 2022, 07:26:52 AM »
It should be easy.  xLights can already do what it needs to do.  You could model an output in xLights that will send 8bits of data for the relay channel but its going to be in an E1.31 packet just like it does for an LED.  The NodeMCU needs to have the smarts to take that E1.31 packet and say oh universe 4 channel 1 is 255 so I need to turn on the gpio1 output.  So like I said the work that needs to be done is inside the NodeMCU firmware if it doesn't already exist and I don't work on that side.

Offline ubear7

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Nodemcu running WLED with usermod for muli relay controls.
« Reply #4 on: April 10, 2022, 10:07:57 AM »
The problem I?m having is that Xlights only recognizes 3 ports for WLED controller. I tried putting the relays on the 3rd port but can?t figure out what model to use. If Xlights would allow me to use pwm white protocol it may work but I have tried all the protocols allowed on the controller and no luck.

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Nodemcu running WLED with usermod for muli relay controls.
« Reply #5 on: April 11, 2022, 08:06:08 AM »
Defining ports and protocols in xLights is only needed if you want xLights to auto-configure the controller.  You should be able to manually configure your controller and then just model xLights to send E1.31 packets.  Turn off all the auto stuff and just manually set the model to a universe/channel.