Waveshare 8 CH POE ETH Relay

280 views
Skip to first unread message

Paul Watkin

unread,
Feb 7, 2025, 1:55:21 PM2/7/25
to Loxone English
Hello all, 

I am hoping someone can help me, I have the above Waveshare relay (this is the original one without the digital inputs), 

I was able to connect to it via the Waveshare apps initially and set the ip address etc (but now seem to be locked out for some reason) but have not been able to get the relays to turn on or off following the instructions on the Waveshare site.

Can someone please shed any light on the virtual output command in Loxone to get a relay to do something - anything will do - otherwise I may be forced to sling this thing before I have a nervous breakdown!!

Many Thanks

Paul
P.S. If there is an obvious gotcha in the relay settings that I may have missed please let me know

Ricardo Tavares Dias

unread,
Apr 20, 2025, 5:25:58 PM4/20/25
to Loxone English
Hi Paul,

are you still having trouble wikth this?
I am playing with a 30-CH version and seems to be working ok with the TCP commands.

The integration with Loxone not done yet.

Ricardo

Paul Watkin

unread,
Apr 22, 2025, 7:53:31 AM4/22/25
to Loxone English
Hello Ricardo,

i should have updated this, it was my operator error on my part that it didn't work - now have it working with the software that came with it but haven't got around to integrating it with Loxone just yet.

Paul

Jonathan Dixon

unread,
Apr 22, 2025, 8:52:00 AM4/22/25
to Paul Watkin, Loxone English
I was intending to write some HOWTO on this but haven't managed so far, anyway the raw template for the 32CH RTU relay module is here

If you download and import that you should be able to use it with Modbus TCP as well as RTU. I've successfully used it with the 16CH module too - just delete any unnecessary channels after instantiating the module from the template.
Don't forget to set address and serial port settings if using RTU

Also if you've already configured the modules as you want them using the Waveshare software stack I'd suggest deleting the "Set Baud" and "Set address" actuators as accidentally putting them on the page will send a zero value to these registers and really mess things up for you. (Worse case you can recover the factory setting by re-installing the module's bootstrap firmware: https://www.waveshare.com/wiki/Modbus_Series_BootLoader_Description)
(For the record I did successfully reconfigure the device baud and address using this template; I never had to use the waveshare proprietary software nor recover the bootloader. It's a rather hairy process; not a job for a Friday afternoon )

Enjoy

--
You received this message because you are subscribed to the Google Groups "Loxone English" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loxone-englis...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/loxone-english/afd856f9-5088-414e-8a5e-b2fc2be69f73n%40googlegroups.com.

Ricardo Tavares Dias

unread,
Apr 22, 2025, 10:55:03 AM4/22/25
to Jonathan Dixon, Paul Watkin, Loxone English
Hi Jonathan, many thanks for the template and the precious advice.

Do I understand correctly that you are using a Loxone ModBus extension?

Am I too optimistic to think that we could operate the Waveshare relays simply using a virtual output with a TCP command?

Ricardo

Jonathan Dixon

unread,
Apr 22, 2025, 11:03:47 AM4/22/25
to Ricardo Tavares Dias, Paul Watkin, Loxone English
No problem.
Correct, to date I've only used the Waveshare RTU relays, via Loxone Modbus extension.
I can't foresee any issues  using it with Modbus TCP if you purchase those variants of the device.

In my designs I favour modbus RTU for core mission critical stuff (e.g. if relays are controlling lights) as if the IP network goes does for any reason it would be very bad to lose lights. But modbus TCP is in many ways easier to get setup (no baud rate nonsense) and much higher bandwidth so better responsiveness if you are flipping many relays simultaneously, for example.  RTU suffers a "mexican wave" effect in that scenario. (Waveshare does have advanced interface for flipping a range of channels in a single command, but I've not implemented that as it's not really compatible with the Loxone graphical programming model)

HTH!

Ricardo Tavares Dias

unread,
Apr 22, 2025, 11:28:27 AM4/22/25
to Loxone English
I can understand your logic in avoiding dependence on the ethernet network availability.
I can't say if a Modbus "bus" is more reliable, I have no experience there.

I am planning 5 or 6 30CH Waveshare Relay banks, as I have many devices to control, besides lights, and Loxone relays, while elegant, would consume precious panel space and wallet €€€. :-)

I have tested a few in my test bench very successfully until now, with the Waveshare SW stack. They seem extremely quick to react.
I have found out that commands for all channels above 8 (9-30) are not very well documented in the Waveshare wiki, particularly in the way that the checksum is calculated (CHKSUM16 MODBUS), but my ChkSum theory is many years behind me so I had to get a refresher course from DeepSeek R1. :-)

Next step is to setup the virtual outputs properly in Loxone Config, and try to get a graphical representation in the app that is easy on the eye.

Ricardo

Jonathan Dixon

unread,
Apr 22, 2025, 11:48:36 AM4/22/25
to Ricardo Tavares Dias, Loxone English
On Tue, 22 Apr 2025 at 16:28, Ricardo Tavares Dias <ricardo.ta...@gmail.com> wrote:
I can understand your logic in avoiding dependence on the ethernet network availability.
I can't say if a Modbus "bus" is more reliable, I have no experience there.

Once working it's very robust. Best tip for anything RS485 based (DMX too) is keep the bus strictly within one panel and observe the strict daisy chaining rules, and the termination resistor. That said, my own modbus bus spans panel and plant room on another floor, and that has never failed.
 
I am planning 5 or 6 30CH Waveshare Relay banks, as I have many devices to control, besides lights, and Loxone relays, while elegant, would consume precious panel space and wallet €€€. :-)

My experience of the 32CH RTU is it doesn't save much panel space: the relays are SPDT so with 3 screw terms per channel, it needs  as much panel space as a loxone relay would

I have tested a few in my test bench very successfully until now, with the Waveshare SW stack. They seem extremely quick to react.
I have found out that commands for all channels above 8 (9-30) are not very well documented in the Waveshare wiki, particularly in the way that the checksum is calculated (CHKSUM16 MODBUS), but my ChkSum theory is many years behind me so I had to get a refresher course from DeepSeek R1. :-)

I just had another look at the wiki and seems you're probably using RTU over TCP 
See https://www.waveshare.com/wiki/Modbus_POE_ETH_Relay#MODBUS_TCP_Test - True modbus TCP has not RTU layer so shouldn't involve any CRC caclulations.
(But equally, when using the Loxone modbus extension it handles CRC calc automatically, so it's never something I've had to get involved in on loxone)

However that page also suggests even with TCP there's some baud rate settings, I think this is exposing internal architecture of the waveshare devices: even when presenting an ethernet port internally they're just a TCP to RS482 gatesway and then a relay board on the end of that piece of string.  So, not very elegant design nor the fact API exposes this to the user, and likely a much lower throughput that you'd get using a modbus TCP native device. (also, shame they don't expose that internal RS485 connection as it is there anyway; would allow more flexibility in how to use the thing after purchase)

IIRC this is another reason I veered towards the RTU version: I could see exactly what I was getting with that!


Next step is to setup the virtual outputs properly in Loxone Config, and try to get a graphical representation in the app that is easy on the eye.

Good luck, let us know  if you succeed.

Paul Watkin

unread,
Apr 22, 2025, 7:23:17 PM4/22/25
to Loxone English
Hi Ricardo - MODBUS is a pretty robust standard used for factory automation etc which has been around for years, much more common in Europe than the UK. It is mainly a physical point to point BUS so much easier to diagnose issues than with TCP networks - a fairly important things seems to be a correct termination resistor (if needed) at the end device. My last Loxone training we talked a fair bit about Modbus and I was advised to get a USB to RS485 dongle from Waveshre (about £20) to help with fault finding.

Hi Jonathan, Thaks for sharing the RTU commands - my relay does both TCP and RTU so May decide to have a play with RTU as I already have the Modbus extension as I had been playing with some Modbus energy meters prior to Loxone relasing the Tree energy meters.

My first application for the Waveshare Relay is going to be for Garden irrigation valves so TCP is good enough, but I am also thinking about for Velux control as multiple electric velux's, plus exterior shutters plus blinds adds up to a lot of Loxone relay channels where a 30 channel Modbus RTU relay may give the assurance level and still be sensibly priced (and not require a whole Future automation cabinet of its own to house).

Other applications i have in mind are for non core actions like opening a side gate, garage door, water feature , outdoor socket, traditional door bell etc where any slight delay isn't relevant - core lighting I will always use Loxone relays or dimmers.
Reply all
Reply to author
Forward
0 new messages