Create automation projects with ladder logic, function blocks, structured text, and Modbus TCP.
Home automation projects can take advantage of a number of good software packages (e.g., Home Assistant and Node-RED) to manage and monitor sensors and controllable devices. If you are interested in looking at an industrial controls approach to your automation projects, then OpenPLC  is a good package to consider. A programmable logic controller (PLC) is a hardened industrial hardware device that manages I/O and logic according to the IEC 61131-3 standard .
The OpenPLC open source software runs on a Raspberry Pi, Linux, or Windows PC, and it offers users a great way to learn industrial control concepts, programming languages, and communications protocols.
In this article, I introduce IEC 61131-3 programming by creating three small OpenPLC programs that use ladder logic, function blocks, and structured text programming languages. The programs in the projects presented here connect to the Raspberry Pi general purpose input/output (GPIO) pins for basic read and write functions; then, the PLC project passes data by Modbus TCP to a Node-RED  dashboard.
Use Express-Checkout link below to read the full article (PDF).