Modbus write a FC 5 value other than True or False i.e. 0x5500

Hi - On the Waveshare POE ethernet 8 channel relay you have the ability to toggle the state of a relay by sending 0x5500 using an FC5 message. I known this is a coil not a register but quoting the manual wiki here Waveshare POE Relay

It appears that the modbus write and modes flex write node only allow true or false - values. If you send any positive values it changes it to 0xFF00. Any clues on how to send 0x5500 without it being changed!

That is super odd.

It may be a typo - perhaps it should be FC6? I would give it a go.

Question, that manual states the device can be controlled via MQTT - is that not a better option?

Hi - I had the same thought process - tried FC6 and get a timeout. I have also raised a case with Waveshare. They have similar none POE relay devices but they also use FC5.
I did try MQTT - but the only refs I can find are linked to their cloud. Its not a massive deal as I can code my way around a toggle but would like to prevent someone else wasting a lot of time on the same thing.

The manual shows a connection field. Have you tried setting that to your own broker?

Cheers - will do

Why bother fussing with their toggle control? Node red can handle toggling logic. I assume the coil on and off commands work even though that oddball flip command doesn’t. Is that correct?

Toggle logic in node red could read the coil and then command the opposite of the current state.

Yep Agree - On and Off work fine so agree I can code around it. More checking I wasn't doing anything wrong as new to nodered and wasn't aware of the behaviour of the FC5 Modbus node to send any none zero value passed to it as True.

I did try MQTT again but not convinced with the level of firmware support for it- Unable to get the broker values to stick and never saw it try to connect to it in the Mosquitto logs

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