Giter Site home page Giter Site logo

mqtt2modbus's Introduction

MQTT to Modbus Bridge

I use a PLC (CLICK series from AutomationDirect) to control all lighting at my home. Although the PLC and the basic lighting functionality operates independently, I needed a bridge between the PLC and the embedded Linux computer for my automation tasks implemented on a higher level. This is a simple implementation of the MQTT to Modbus bridge written in C language that allows to easily control the lights using the MQTT publish commands.

Basic Usage

MQTT publish commands:

mosquitto_pub -t plc/y709/set -m true

mosquitto_pub -t plc/y709/set -m false

mosquitto_pub -t plc/y709/toggle -n

MQTT publish responses:

plc/y709/set/ok (null)

plc/y709/toggle/ok (null)

Requirements

Installing

The software has been tested on Debian 9.3 (amd64).

Clone the repository:

git clone [email protected]:hubpav/mqtt2modbus.git

Go to the repository:

cd mqtt2modbus

Build the program:

make

Running

Currently the program does not take any arguments. The parameters can be adjusted in the beginning of main.c.

Run the program:

./mqtt2modbus

You can use PM2 process manager to keep this program starting on the boot.

pm2 start mqtt2modbus

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details.

mqtt2modbus's People

Contributors

hubpav avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.