MIT License

项目介绍

MichielVanwelsenaere/HomeAutomation.CoDeSys3 是一个托管在 GitHub 上的开源项目,采用 MIT License 许可证,目前获得 148 个 Star、38 次 Fork。

仓库全名
MichielVanwelsenaere/HomeAutomation.CoDeSys3
开源许可证
MIT License
Star 数
148
Fork 数
38
未关闭 Issue
1

README 摘要

MQTT enabled CoDeSys 3 Home Automation This CoDeSys 3.5 project is built for home automation purposes. The goal of the approach is to perform any critical operations like reading inputs, switching light, controlling sunscreens, etc. Inside the PLC itself and make use of MQTT events to send events to an MQTT broker. Using MQTT subscriptions it's possible to send commands to the PLC to control -for example- outputs…

完整内容见 GitHub 原始 README 或本页 。

常见问题

HomeAutomation.CoDeSys3 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 HomeAutomation.CoDeSys3 的源码?

可以直接克隆仓库:git clone https://github.com/MichielVanwelsenaere/HomeAutomation.CoDeSys3.git,默认分支为 master;安装与运行步骤见仓库 README。

HomeAutomation.CoDeSys3 最近还在维护吗?

仓库最近一次更新为 1 周前,当前有 1 个未关闭 Issue;Star 数为 148,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Home Automation system build in CoDeSys 3 with MQTT communication to any third party Home Automation software

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
244
价值分
102
活跃状态
活跃

Release

README

MQTT enabled CoDeSys 3 Home Automation

Releases Gitter License

This CoDeSys 3.5 project is built for home automation purposes. The goal of the approach is to perform any critical operations like reading inputs, switching light, controlling sunscreens, etc. Inside the PLC itself and make use of MQTT events to send events to an MQTT broker. Using MQTT subscriptions it’s possible to send commands to the PLC to control -for example- outputs.

The purpose? Redundancy on a software level but also on a hardware level!

  • PLCs are very (very) robust controllers: no PC, SoC, etc. is more robust and failure resistant.
  • Hardware continuity: Home automation providers often renew their modules every X years, modules aren’t sold anymore or a full upgrade is required when something breaks. PLCs models and their modules are sold decades after their initial release date. For an example, check out the Wago 750 series controllers and modules.
  • Avoid performing critical operations that should work 24/7 inside a less redundant controller (it will fail sooner or later).
  • Keep your wife/girlfriend happy when you’re not at home and your Rpi, Odroid, Banana Pi, Pc crashes (running your MQTT broker, OpenHab, Home Assistant, etc.).

Supported Runtimes

The project is developed using the IEC 61131-3 standard, there are multiple development environments with their own runtime that support the standard:

Architecture

Core processing logic is executed in the (robust) PLC. Meaning that events like reading pushbuttons/switches, updating outputs are executed in the PLC software. To enable integration with external software the PLC sends out events to an MQTT broker when events occur (like pushbutton events, outputs that change state). MQTT subscriptions are enabled as well to allow control from the external software to control -for example- outputs.

GeneralArchitecture

Software Architecture

More information on the software architecture here.

Function blocks

Basic function blocks

Basic function blocks for basic IO events and operations.

Virtual function blocks

Function blocks developed to easily set and get values from the processing logic through MQTT.

Modbus RTU over RS485

With many PLCs having a onboard RS485 serial port it is a popular protocol to create a robust Modbus RTU sensor network.

Using Modbus RTU

How to use Modbus RTU differs depending on the PLC/development environment used. The topics belows address the usage of Modbus RTU in several development environments:

RS485 function blocks

To translate the byte array received by the modbus device to their actual value and send their values through MQTT the function blocks below have been developed. Note that a specific function block is required for each type of Modbus RTU device.

In addition to the above a buscontroller function block (FB_RS485_BUSCONTROLLER) is used to control access to the RS485 bus between multiple RS485 device function blocks.

DALI

Control DALI drivers using the WAGO DALI modules (753-647).

DMX

Control DMX drivers.

HVAC

Control your HVAC setup, more detail in the HVAC getting started guide.

Additional functionality

FAQ

Libraries

The following libraries are used in this PLC project and can be found under src\Libraries:

Special thanks to Stefan Dreyer for his assistance in some of the MQTT aspects of this project and his great work on his open-source CoDeSys MQTT library.

评论

暂无评论