Skip to main content

Description

https://travis-ci.com/exosite/lib_exoedge_modbus_python.svg?token=tgjcyH1MG5sXqcVsD1kG&branch=master

This project is a Modbus source for Exosite’s ExoSense which uses ExoEdge.

Install

From Source

pip install -r requirements.txt
python setup.py install

From PyPi

The wheel for this hasn’t been published yet.

pip install exoedge_modbus

ExoEdge Configuration

In order to start using this Modbus source, start the edged daemon with your desired parameters. For more information on edged, visit ExoEdge on PyPi.

Example

$ cat modbus-test1.ini
[device]
murano_host = mqtt://f5330e5s8cho0000.m2.exosite.io/
murano_id = modbus-test1
$ edged -i modbus-test1.ini go

ExoSense Configuration

Below is an example config_io settings that illustrates how Modbus RTU data can be sent to ExoSense via ExoEdge.

{
  "channels": {
    "001": {
      "display_name": "Input Register 1",
      "description": "Input Register 1.",
      "channel_name": "001",
      "properties": {
        "data_unit": "NUMBER",
        "data_type": "TEMPERATURE",
        "min": null,
        "max": null,
        "precision": null,
        "device_diagnostic": false
      },
      "protocol_config": {
        "timeout": null,
        "report_on_change": false,
        "report_rate": 2000,
        "application": "Modbus_RTU",
        "app_specific_config": {
          "byte_endianness": "big",
          "register_range": "INPUT_REGISTER",
          "register_offset": "0002",
          "register_count": 1,
          "register_endianness": "big",
          "bitmask": "0xffffffff",
          "slave_id": 1,
          "evaluation_mode": "unsigned"
        },
        "sample_rate": 2000,
        "input_raw": {},
        "offset": 0,
        "interface": "/dev/ttyM0",
        "down_sample": "ACT"
      }
    }
  }
}

Below is the config_applications configuration needed for the config_io above:

{
  "applications": {
    "Modbus_RTU": {
      "application_display_name": "Modbus RTU",
      "interfaces": [
          {
            "interface": "/dev/ttyM0",
            "baud_rate": 19200,
            "stop_bits": 1,
            "data_bits": 7,
            "parity": "none"
          }
      ]
    }
  }
}

Below is a config_io example for Modbus_TCP:

{
  "channels": {
    "1": {
      "display_name": "Input Register 1",
      "description": "One-second intervals of input register 1.",
      "properties": {
        "max": null,
        "precision": null,
        "data_type": "BINARY",
        "min": null
      },
      "protocol_config": {
        "application": "Modbus_TCP",
        "report_on_change": false,
        "report_rate": 1000,
        "sample_rate": 1000,
        "down_sample": "ACT",
        "app_specific_config": {
          "ip_address": "192.168.11.139",
          "port": 5020,
          "register_range": "INPUT_REGISTER",
          "register_offset": 0,
          "register_count": 1,
          "byte_endianness": "big",
          "register_endianness": "big",
          "evaluation_mode": "string-ascii",
          "bitmask": "0x0000"
        }
      }
    }
  }
}

For linux user

Users should not run exoedge with sudo for security reasons. If you get permission denied: could not open port when using Modbus_RTU, try:

groups ${USER}

This will list all the groups you belong to. If you don’t belong to the dialout group then add yourself to it, for example:

sudo gpasswd --add ${USER} dialout

You then need to log out and log back in again for it to be effective.

Metadata

Release files for exoedge-modbus 21.9.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for exoedge-modbus 21.9.15
File Interpreter ABI Platform Actions
exoedge_modbus-21.9.15-py2.py3-none-any.whl Python 2, Python 3 none any Details for exoedge_modbus-21.9.15-py2.py3-none-any.whl

Release files / exoedge_modbus-21.9.15-py2.py3-none-any.whl

Download URL exoedge_modbus-21.9.15-py2.py3-none-any.whl
Size 21.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
bf94e52dc74a3c8ff86d60df82e43e9ccc15ada2f2b2621b8729be33d35975bc
BLAKE2b-256 checksum
How to use checksums
8be7ab070707cb1deccad199cb2f4d3b908f4694d70e43bd32f1d182397e6cb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.1

Security for exoedge-modbus 21.9.15

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page