Code Monkey home page Code Monkey logo

pypoller's Introduction

pypoller

Modbus poller in Python

Installation

Virtual env creation

$ python3 -m venv venv
$ source venv/bin/activate

Installation

Master

$ pip install https://github.com/daniviga/pypoller/archive/master.zip

Release

$ pip install https://github.com/daniviga/pypoller/releases/download/X.Y.Z/pypoller-X.Y.Z-py3-none-any.whl

Releases are available at https://github.com/daniviga/pypoller/releases

Development installation

$ git clone https://github.com/daniviga/pypoller.git
$ cd pypoller
$ pip install -r requirements-dev.txt -e .

Usage

usage: pypoller.py [-h] [--port PORT] [--slave SLAVE] [--timeout TIMEOUT] [--delay DELAY] [--loop LOOP] [--comma] ip csv_file

positional arguments:
  ip                    Target IP address
  csv_file              CSV file to be parsed

optional arguments:
  -h, --help            show this help message and exit
  --port PORT, -p PORT  Target modbus port
  --slave SLAVE, -s SLAVE
                        Slave ID
  --timeout TIMEOUT, -t TIMEOUT
                        Time a client should wait for a request to be processed (3 seconds)
  --delay DELAY, -d DELAY
                        Delay between registers polling (100 ms)
  --loop LOOP, -l LOOP  Loop over the CSV, with a delay
  --comma, -c           Use comma separator

$ pypoller.py 192.168.0.120 demo/registers.csv --port 502 --slave 1 --loop 1 --delay 0.01

Docker

$ docker run --rm -ti -v $(pwd)/demo:/io daniviga/pypoller 192.168.0.120 /io/registers.csv --port 502 --slave 1 --loop 1 --delay 0.01

pypoller's People

Contributors

daniviga avatar farflyer avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

farflyer barcep

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.