Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 1.1 KB

README.md

File metadata and controls

28 lines (22 loc) · 1.1 KB

EMI-Modbus

We adapted the original modbus library and created a lightweight version of it. Ours is also more flexible, but only offers support for the RTU configuration, and only for the modbus_read_input_registers call.

How to run

  1. Make sure you have git, make and gcc.

  2. Install paho.mqtt.c:

    1. git clone [email protected]:eclipse/paho.mqtt.c.git
    2. cd paho.mqtt.c
    3. make install
  3. Install libsystemd-dev:

    1. sudo apt install libsystemd-dev
  4. Build the software: make

  5. Run it: build/emi-read mqtt://<mqtt-host> <mqtt-user> <mqtt-pwd>

Future steps

  1. Code cleanup.
  2. Add support for write (so that EMI address can be changed. Might be useful for residential buildings).
  3. Allow further customisation via args:
    1. Serial device file name
    2. Interval for instant values polling
    3. Values to poll
    4. We may consider going next level with a yaml config file instead.
  4. Contrib flow and guidelines
  5. install signal handlers for mqtt logoff and signaling.