I'm pretty new to all of this so please excuse my ignorance.
I'm running Node-Red on a Raspberry Pi 4 (Standard Raspbian Operating System) and I'm trying to retrieve some data from a PLC and then send that data via MQTT. The Raspberry Pi is connected to the PLC via an ethernet cable and the Raspberry Pi is connected to my Wifi for an internet connection.
The PLC is a Siemens PLC so I'm using the node-red-contrib-s7 library to communicate with it.
I have been able to successfully communicate with the PLC via the ethernet connection and retrieve data. Separately I've been able to successfully send and receive MQTT messages over WiFi, but when I try and do both, one of them doesn't work.
This is the basic flow at the moment:
All I want to do at the moment is log an MQTT message (over WiFi) and at the same time log data from the PLC (over the LAN connection with an ethernet cable).
When I first set up this flow, the PLC connection was working, but the MQTT connection didn't work. Then I rebooted the Raspberry Pi, and when it started up, the MQTT connection was working but the PLC connection wouldn't work.
Is this not working because I'm trying to send and receive data over two different Network Interfaces? Is it possible to use two Network Interfaces at once? Or is there a way of defining which network interface you want Node Red to use? Or have I made some other silly mistake?
Thanks in advance for your thoughts!