{"id":26824826,"url":"https://github.com/cybcon/modbus-client","last_synced_at":"2025-09-07T08:40:29.648Z","repository":{"id":65383353,"uuid":"574489437","full_name":"cybcon/modbus-client","owner":"cybcon","description":"The Modbus TCP Client is a command line tool, written in python to read and interpret Modbus registers.","archived":false,"fork":false,"pushed_at":"2024-12-23T17:26:43.000Z","size":60,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-28T14:05:04.933Z","etag":null,"topics":["docker-image","modbus-tcp","python3"],"latest_commit_sha":null,"homepage":"https://www.oberdorf-itc.de/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cybcon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://www.paypal.com/donate/?hosted_button_id=BHGJGGUS6RH44"]}},"created_at":"2022-12-05T12:31:53.000Z","updated_at":"2025-04-11T11:30:05.000Z","dependencies_parsed_at":"2023-02-12T22:45:41.315Z","dependency_job_id":"4d51ef1d-1ae5-4a81-a248-574f5d8d9904","html_url":"https://github.com/cybcon/modbus-client","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybcon%2Fmodbus-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybcon%2Fmodbus-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybcon%2Fmodbus-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybcon%2Fmodbus-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cybcon","download_url":"https://codeload.github.com/cybcon/modbus-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251326836,"owners_count":21571634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-image","modbus-tcp","python3"],"created_at":"2025-03-30T10:17:44.166Z","updated_at":"2025-04-28T14:05:10.077Z","avatar_url":"https://github.com/cybcon.png","language":"Python","funding_links":["https://www.paypal.com/donate/?hosted_button_id=BHGJGGUS6RH44"],"categories":[],"sub_categories":[],"readme":"# Quick reference\n\nMaintained by: [Michael Oberdorf IT-Consulting](https://www.oberdorf-itc.de/)\n\nSource code: [GitHub](https://github.com/cybcon/modbus-client)\n\nContainer Registry: [DockerHub](https://hub.docker.com/r/oitc/modbus-client)\n\n\u003c!-- SHIELD GROUP --\u003e\n[![][github-action-test-shield]][github-action-test-link]\n[![][github-action-release-shield]][github-action-release-link]\n[![][github-release-shield]][github-release-link]\n[![][github-releasedate-shield]][github-releasedate-link]\n[![][github-stars-shield]][github-stars-link]\n[![][github-forks-shield]][github-forks-link]\n[![][github-issues-shield]][github-issues-link]\n[![][github-license-shield]][github-license-link]\n\n[![][docker-release-shield]][docker-release-link]\n[![][docker-pulls-shield]][docker-pulls-link]\n[![][docker-stars-shield]][docker-stars-link]\n[![][docker-size-shield]][docker-size-link]\n\n\n# Supported tags and respective `Dockerfile` links\n\n* [`latest`, `1.0.16`](https://github.com/cybcon/modbus-client/blob/v1.0.16/Dockerfile)\n* [`1.0.15`](https://github.com/cybcon/modbus-client/blob/v1.0.15/Dockerfile)\n* [`1.0.14`](https://github.com/cybcon/modbus-client/blob/v1.0.14/Dockerfile)\n* [`1.0.13`](https://github.com/cybcon/modbus-client/blob/v1.0.13/Dockerfile)\n* [`1.0.12`](https://github.com/cybcon/modbus-client/blob/v1.0.12/Dockerfile)\n* [`1.0.11`](https://github.com/cybcon/modbus-client/blob/v1.0.11/Dockerfile)\n\n\n# What is Modbus TCP Client?\n\nThe Modbus TCP Client is a command line tool, written in python to read and interpret Modbus registers.\n\nThe Modbus specification can be found here: [PDF](https://modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf)\n\n\n# QuickStart with Modbus TCP Client and Docker\n\nStep - 1 : Pull the Modbus TCP Client\n\n```\ndocker pull oitc/modbus-client\n```\n\nStep - 2 : Run the Modbus TCP Client to scan your Modbus Server Registers\n\n```\ndocker run --rm oitc/modbus-client:latest [options]\n\nusage: modbus_client.py [-h] [-s SLAVE] [-p PORT] [-i SLAVEID]\n                        [-t REGISTERTYPE] [-r REGISTER] [-l LENGTH] [-b] [-c]\n                        [-d]\n\nModbus TCP Client v1.0.13\n\noptional arguments:\n  -h, --help            show this help message and exit\n\n  -s SLAVE, --slave SLAVE\n                        Hostname or IP address of the Modbus TCP slave\n                        (default: 127.0.0.1)\n  -p PORT, --port PORT  TCP port (default: 502)\n  -i SLAVEID, --slaveid SLAVEID\n                        The slave ID, between 1 and 247 (default: 1)\n  -t REGISTERTYPE, --registerType REGISTERTYPE\n                        Register type 1 to 4 to read (1=Discrete Output Coils,\n                        2=Discrete Input Contacts, 3=Analog Output Holding\n                        Register, 4=Analog Input Register) (default: 3)\n  -r REGISTER, --register REGISTER\n                        The register address between 0 and 9999 (default: 0)\n  -l LENGTH, --length LENGTH\n                        How many registers should be read, between 1 and 125\n                        (default: 1)\n  -b, --bigEndian       Use big endian instead of little endian when\n                        calculating the 32bit values\n  -c, --csv             Output as CSV\n  -d, --debug           Enable debug output\n```\n\n# Examples\n## Read Analog Input Register\n\n```\ndocker run --rm oitc/modbus-client:latest -s 192.168.58.70 -p 1503 -t 4 -r 0 -l 10\n           HEX16  UINT16  INT16               BIT       HEX32    FLOAT32\nregister\n30000     0x84D9   34009 -31527  1000010011011001  0x84D90000  -0.000000\n30001     0x41ED   16877  16877  0100000111101101  0x41ED84D9  29.689867\n30002     0x0000       0      0  0000000000000000  0x000041ED   0.000000\n30003     0xC24C   49740 -15796  1100001001001100  0xC24C0000 -51.000000\n30004     0x0000       0      0  0000000000000000  0x0000C24C   0.000000\n30005     0xBF80   49024 -16512  1011111110000000  0xBF800000  -1.000000\n30006     0x0068     104    104  0000000001101000  0x0068BF80   0.000000\n30007     0x006C     108    108  0000000001101100  0x006C0068   0.000000\n30008     0x0074     116    116  0000000001110100  0x0074006C   0.000000\n30009     0x0032      50     50  0000000000110010  0x00320074   0.000000\n```\n\n## Discrete Discrete Input Contacts\n\n```\ndocker run --rm test:latest -s 192.168.57.10 -p 5020 -t 2 -r 0 -l 3\n          BIT   BOOL\nregister\n10000       1   True\n10001       0  False\n10002       1   True\n```\n\n# Donate\nI would appreciate a small donation to support the further development of my open source projects.\n\n\u003ca href=\"https://www.paypal.com/donate/?hosted_button_id=BHGJGGUS6RH44\" target=\"_blank\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/stefan-niedermann/paypal-donate-button/master/paypal-donate-button.png\" alt=\"Donate with PayPal\" width=\"200px\"\u003e\u003c/a\u003e\n\n\n# License\n\nCopyright (c) 2020-2024 Michael Oberdorf IT-Consulting\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\u003c!-- LINK GROUP --\u003e\n[docker-pulls-link]: https://hub.docker.com/r/oitc/modbus-client\n[docker-pulls-shield]: https://img.shields.io/docker/pulls/oitc/modbus-client?color=45cc11\u0026labelColor=black\u0026style=flat-square\n[docker-release-link]: https://hub.docker.com/r/oitc/modbus-client\n[docker-release-shield]: https://img.shields.io/docker/v/oitc/modbus-client?color=369eff\u0026label=docker\u0026labelColor=black\u0026logo=docker\u0026logoColor=white\u0026style=flat-square\n[docker-size-link]: https://hub.docker.com/r/oitc/modbus-client\n[docker-size-shield]: https://img.shields.io/docker/image-size/oitc/modbus-client?color=369eff\u0026labelColor=black\u0026style=flat-square\n[docker-stars-link]: https://hub.docker.com/r/oitc/modbus-client\n[docker-stars-shield]: https://img.shields.io/docker/stars/oitc/modbus-client?color=45cc11\u0026labelColor=black\u0026style=flat-square\n[github-action-release-link]: https://github.com/cybcon/modbus-client/actions/workflows/release-from-label.yaml\n[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/cybcon/modbus-client/release-from-label.yaml?label=release\u0026labelColor=black\u0026logo=githubactions\u0026logoColor=white\u0026style=flat-square\n[github-action-test-link]: https://github.com/cybcon/modbus-client/actions/workflows/container-image-build-validation.yaml\n[github-action-test-shield-original]: https://github.com/cybcon/modbus-client/actions/workflows/container-image-build-validation.yaml/badge.svg\n[github-action-test-shield]: https://img.shields.io/github/actions/workflow/status/cybcon/modbus-client/container-image-build-validation.yaml?label=tests\u0026labelColor=black\u0026logo=githubactions\u0026logoColor=white\u0026style=flat-square\n[github-forks-link]: https://github.com/cybcon/modbus-client/network/members\n[github-forks-shield]: https://img.shields.io/github/forks/cybcon/modbus-client?color=8ae8ff\u0026labelColor=black\u0026style=flat-square\n[github-issues-link]: https://github.com/cybcon/modbus-client/issues\n[github-issues-shield]: https://img.shields.io/github/issues/cybcon/modbus-client?color=ff80eb\u0026labelColor=black\u0026style=flat-square\n[github-license-link]: https://github.com/cybcon/modbus-client/blob/main/LICENSE\n[github-license-shield]: https://img.shields.io/badge/license-MIT-blue?labelColor=black\u0026style=flat-square\n[github-release-link]: https://github.com/cybcon/modbus-client/releases\n[github-release-shield]: https://img.shields.io/github/v/release/cybcon/modbus-client?color=369eff\u0026labelColor=black\u0026logo=github\u0026style=flat-square\n[github-releasedate-link]: https://github.com/cybcon/modbus-client/releases\n[github-releasedate-shield]: https://img.shields.io/github/release-date/cybcon/modbus-client?labelColor=black\u0026style=flat-square\n[github-stars-link]: https://github.com/cybcon/modbus-client\n[github-stars-shield]: https://img.shields.io/github/stars/cybcon/modbus-client?color=ffcb47\u0026labelColor=black\u0026style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcybcon%2Fmodbus-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcybcon%2Fmodbus-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcybcon%2Fmodbus-client/lists"}