Modbus rtu & PLC comunications


#1

Hello to all,
I would like to connect to the home plc (domotics) via Modbus-rtu communication to the rasp PI3B and read the values from it, to transform them into events to integrate into the cayenne interface.

it’s possible?


#2

Do you have any existing code that works?


#3

I do not have a code that works on raspberry, but I can tell the PLC with the arduino.

So I think I’ll put the arduino as an interface between the PLC and the raspberry.

Only the arduino has only 25 virtual i / o, here i think i will put 3 o 4 in the same network to satisfy my needs.

With the home PLC I can really do many functions.


#4

Cool, sounds like you have a plan on what you want to do and how to do it. You can use the MQTT API to achieve this. I have an example here on using a python script to send values back and forth to Cayenne. Just substitute out the bits where I read the DHT11/22 sensor with your modbus commands for your Arduino. If you need any help just post your code and I’ll make some suggestions.