Getting I/O signals from old machines to communicate with Node-RED

In another post I asked about how to convert different different voltages into useful voltage that can be fed into a rasberrypi gpio's..

Is there anything that could transmit on/off signals via MQTT to use as an I/Os without the hardwire?..

I am not looking for a PLC, but is there something less expensive that could do the work so that we can get a signal and be able to write some Node-RED logics using the I/Os?

maybe something from waveshare, but you have to write the mqtt support yourself
8in 8out ~ 50$

1 Like

Thank you!

Always fun to discover new toys :slight_smile:

You can use an ESP flashed with something like Tasmota to send MQTT messages on GPIO changes.

How to convert really depends on the voltages.

2 Likes

I do exactly this to monitor my pre-internet espresso machine.
It does involve a PLC though and it's not especially cheap at c ÂŁ12 per machine

I supply mains power to the espresso machine via a power monitoring smart socket which runs Tasmota.

The socket sends a message via MQTT when it is switched on or off, which I can do from Node-red, then I can interrogate it, also over MQTT, to obtain for example :

{
"Today":0.002, // Watt hours (since the power cut earlier)
"Power":756, // Watts
"ApparentPower":756,
"ReactivePower":0,
"Factor":1,
"Voltage":196,   // Either it's a major brown-out or I need to recalibrate the smart socket
"Current":3.849 // Amps
}