{"id":37177915,"url":"https://github.com/debevv/modbus","last_synced_at":"2026-01-14T20:44:27.760Z","repository":{"id":57518573,"uuid":"162504862","full_name":"debevv/modbus","owner":"debevv","description":"Fault-tolerant implementation of modbus protocol in Go (golang)","archived":false,"fork":true,"pushed_at":"2018-12-20T00:40:06.000Z","size":112,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-20T17:49:26.787Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"goburrow/modbus","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/debevv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-20T00:16:34.000Z","updated_at":"2018-12-20T00:40:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/debevv/modbus","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/debevv/modbus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debevv%2Fmodbus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debevv%2Fmodbus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debevv%2Fmodbus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debevv%2Fmodbus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/debevv","download_url":"https://codeload.github.com/debevv/modbus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debevv%2Fmodbus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434497,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-14T20:44:27.272Z","updated_at":"2026-01-14T20:44:27.747Z","avatar_url":"https://github.com/debevv.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"go modbus [![Build Status](https://travis-ci.org/goburrow/modbus.svg?branch=master)](https://travis-ci.org/goburrow/modbus) [![GoDoc](https://godoc.org/github.com/goburrow/modbus?status.svg)](https://godoc.org/github.com/goburrow/modbus)\n=========\nFault-tolerant, fail-fast implementation of Modbus protocol in Go.\n\nSupported functions\n-------------------\nBit access:\n*   Read Discrete Inputs\n*   Read Coils\n*   Write Single Coil\n*   Write Multiple Coils\n\n16-bit access:\n*   Read Input Registers\n*   Read Holding Registers\n*   Write Single Register\n*   Write Multiple Registers\n*   Read/Write Multiple Registers\n*   Mask Write Register\n*   Read FIFO Queue\n\nSupported formats\n-----------------\n*   TCP\n*   Serial (RTU, ASCII)\n\nUsage\n-----\nBasic usage:\n```go\n// Modbus TCP\nclient := modbus.TCPClient(\"localhost:502\")\n// Read input register 9\nresults, err := client.ReadInputRegisters(8, 1)\n\n// Modbus RTU/ASCII\n// Default configuration is 19200, 8, 1, even\nclient = modbus.RTUClient(\"/dev/ttyS0\")\nresults, err = client.ReadCoils(2, 1)\n```\n\nAdvanced usage:\n```go\n// Modbus TCP\nhandler := modbus.NewTCPClientHandler(\"localhost:502\")\nhandler.Timeout = 10 * time.Second\nhandler.SlaveId = 0xFF\nhandler.Logger = log.New(os.Stdout, \"test: \", log.LstdFlags)\n// Connect manually so that multiple requests are handled in one connection session\nerr := handler.Connect()\ndefer handler.Close()\n\nclient := modbus.NewClient(handler)\nresults, err := client.ReadDiscreteInputs(15, 2)\nresults, err = client.WriteMultipleRegisters(1, 2, []byte{0, 3, 0, 4})\nresults, err = client.WriteMultipleCoils(5, 10, []byte{4, 3})\n```\n\n```go\n// Modbus RTU/ASCII\nhandler := modbus.NewRTUClientHandler(\"/dev/ttyUSB0\")\nhandler.BaudRate = 115200\nhandler.DataBits = 8\nhandler.Parity = \"N\"\nhandler.StopBits = 1\nhandler.SlaveId = 1\nhandler.Timeout = 5 * time.Second\n\nerr := handler.Connect()\ndefer handler.Close()\n\nclient := modbus.NewClient(handler)\nresults, err := client.ReadDiscreteInputs(15, 2)\n```\n\nReferences\n----------\n-   [Modbus Specifications and Implementation Guides](http://www.modbus.org/specs.php)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebevv%2Fmodbus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdebevv%2Fmodbus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebevv%2Fmodbus/lists"}