Fix for problems with Web_Relay_Con V2.0

I added a comment to MisterFixit1952’s topic “New option for 8-16 chanel lighting relay board”, but thought a new topic might make my project more visible.

There is an inexpensive 16 channel Ethernet connected relay control board available, typically found on Amazon or eBay. Here’s a picture for reference.

You can buy it for about $6 USD / $9 AUD. But the “from the factory” firmware has numerous issues, the main ones being that all the devices have the same MAC address with no means of changing it, and if you change the IP address or relay settings they all revert to defaults on a power cycle. In addition the devices claim to allow you to create a per device Port number … but it’s not really a Port number, it’s only a file path. The device default Port number is 80, and it can’t be changed. In my opinion all these backward problems made the devices worthless.

So, I’ve just completed a project to write new firmware for the device. Now via a browser I can change everything … IP address, default router/gateway address, netmask, port number, MAC, relay states, relay output invert, name the module, view net stats … AND all the settings are stored in EEPROM to survive power cycles.

The source code and instructions on how to reprogram the devices are available for free in a GitHub project. Search GitHub for the project “NetMod-ServerApp” or follow this link https://github.com/nielsonm236/NetMod-ServerApp. The project includes full documentation, and my email address is in the documentation if you need some help.

Some additional comments:

  • When reprogramming the device I found that an 8 channel device becomes a 16 channel device with the new code. So, you can buy the cheaper 8 channel device and still get 16 channels.
  • A thought for future changes (or you can do it yourself with the source code) is that the 16 channels can either be inputs or outputs. My code makes all 16 channels outputs for controlling relays, but I could just as easily have made it 8 outputs for relays, and 8 inputs for sensing.

I’ve made a few minor changes to the code in the past month, but in general I believe it is complete. I have five of the controllers on my network for testing, and they seem to be very stable at this time.

2 Likes

I added a video demonstrating a reprogrammed V2.0 module at https://www.youtube.com/watch?v=-EmmJZlkIXQ

Great work! This looks really nice!

Thank you. If you give it a try and notice any bugs or have change suggestions let me know. It’s just a personal project for me, but I’d be happy to make suggested improvements if it will fit in the limited Flash space available. By the way, I created a version that has 8 outputs, 8 inputs as an experiment. I haven’t put that version on GitHub yet, but can accelerate availability if someone needs it.
Mike

The code has been updated on GitHub so that it now supports the original 16 outputs (16 relays), 8 outputs/8 inputs, or 16 inputs. Each configuration requires a different code load due to flash size limitations of the Network Module. Of course you can reprogram a Network Module at any time to change its configuration. The GitHub address is visible in the video. I’m working on additional videos to demonstrate the new configurations and to demonstrate how to program the devices. In the meantime the document in the GitHub site explains it all in a step by step procedure.

1 Like

This is making me want to delve into doing a holiday lighting show… yet another project!

Something I haven’t tried is to see how fast I can make it switch … or whether I could maintain specific relay timing. A lot of factors involved: speed of relays, delays/traffic on the ethernet, execution speed in the SM8S processor on the Network Module. Would take some experimentation to see if this will work in a light show where synchronization with music was important. Still, get’s the “wonder if it would work” thought going. Would be easy enough to work up a little LED breadboard instead of relays to test the basics.

I added a couple of videos to YouTube.

This one demonstrates the additional configurations (8 Output / 8 Input and 16 Input):

This one shows where to get all the hardware and software, and how to reprogram the Network Module:

1 Like

Someone replied on one of my YouTube videos asking if I could add MQTT compliance to the Network Module. MQTT is the publish/subscribe messaging technology used in applications like Home Assistant, and perhaps others but I admit I’m only studying it now. It looks like a hefty project, but I think I could make it work. I’m curious if others on this forum have much experience with it and if they thought it would be worthwhile to pursue.
Thanks
Mike