Modbus tcp and mqtt at the same time

Can anybody Tell me please if IT is possible to use modbus tcp to Read values from a modbus tcp Server and push them to the iot cloud dashboard? When i use modbus tcp to Read the values, i loose Connection to dashboard. Iot cloud Shows opta as offline.

1 Like

Hi. I am using MQTT (publish only) with Modbus TCP master (to query an UPS) on MKR ZERO + MKR ETH. I constantly close/open both connection alternately.
Ps.:
Here I found a possible solution:

EthernetClient eth_client_MQTT;
EthernetClient eth_client_Modbus;

It maybe doesn't need to switch. I can try it on Monday.

1 Like

Now i teste with a New Project. Modbus TCP and Arduino Dashboard work simultaneously. No need to change Connections. Modbus can stay connected

1 Like