{"id":17686437,"url":"https://github.com/psi-4ward/s7client","last_synced_at":"2025-04-14T21:52:46.629Z","repository":{"id":28827780,"uuid":"119452796","full_name":"psi-4ward/s7client","owner":"psi-4ward","description":"Hi level API for node-snap7 to communication with Siemens S7 PLCs","archived":false,"fork":false,"pushed_at":"2023-01-06T15:33:49.000Z","size":2059,"stargazers_count":47,"open_issues_count":19,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-07T11:52:22.595Z","etag":null,"topics":["javascript","node-snap7","nodejs","plc","siemens","siemens-s7-plcs","snap7","sps"],"latest_commit_sha":null,"homepage":"https://psi-4ward.github.io/s7client/","language":"JavaScript","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/psi-4ward.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-01-29T22:58:18.000Z","updated_at":"2025-01-17T03:54:59.000Z","dependencies_parsed_at":"2023-01-14T09:41:02.867Z","dependency_job_id":null,"html_url":"https://github.com/psi-4ward/s7client","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psi-4ward%2Fs7client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psi-4ward%2Fs7client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psi-4ward%2Fs7client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psi-4ward%2Fs7client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psi-4ward","download_url":"https://codeload.github.com/psi-4ward/s7client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248968753,"owners_count":21191158,"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":["javascript","node-snap7","nodejs","plc","siemens","siemens-s7-plcs","snap7","sps"],"created_at":"2024-10-24T10:44:54.543Z","updated_at":"2025-04-14T21:52:46.608Z","avatar_url":"https://github.com/psi-4ward.png","language":"JavaScript","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=RTWDCH74TJN54\u0026item_name=s7client"],"categories":[],"sub_categories":[],"readme":"# S7Client\n\n[![npm](https://img.shields.io/npm/v/s7client.svg)](https://www.npmjs.com/package/s7client)\n[![Dependencies](https://david-dm.org/psi-4ward/s7client.svg)](https://david-dm.org/psi-4ward/s7client)\n[![Known Vulnerabilities](https://snyk.io/test/github/psi-4ward/s7client/badge.svg)](https://snyk.io/test/github/psi-4ward/s7client)\n[![Greenkeeper badge](https://badges.greenkeeper.io/psi-4ward/s7client.svg)](https://greenkeeper.io/)\n[![Maintainability](https://api.codeclimate.com/v1/badges/74afb63a0af08f701de3/maintainability)](https://codeclimate.com/github/psi-4ward/s7client/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/74afb63a0af08f701de3/test_coverage)](https://codeclimate.com/github/psi-4ward/s7client/test_coverage)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=RTWDCH74TJN54\u0026item_name=s7client)\n\n\nHi-Level API for [node-snap7](https://github.com/mathiask88/node-snap7) to communicate with Siemens S7 PCLs (See [compatibility](http://snap7.sourceforge.net/snap7_client.html#target_compatibility)).\n\n* Promise based, `async/await` support\n* Returns javascript objects with parsed var objects\n* EventEmitter: (`connect`, `disconnect`, `connect_error`, `value`)\n* Optional auto reconnect\n\n**[API Documentation](https://psi-4ward.github.io/s7client)**\n\n[Blog post](https://psi.cx/2018/siemens-s7-web-hmi/) about my SIMATIC S7 Web HMI project.\n\n## Usage\n\n```sh\nnpm install s7client\n```\n\n```js\nconst {S7Client} = require('s7client');\n\n// PLC Connection Settings\nconst plcSettings = {\n  name: \"LocalPLC\",\n  host: 'localhost',\n  port: 9102,\n  rack: 0,\n  slot: 2\n};\n\n// DBA to read\nlet dbNr = 1;\nlet dbVars = [\n  { type: \"CHAR\", start: 0 },\n  { type: \"BOOL\", start: 2, bit: 0 },\n  { type: 'INT', start: 3 }\n];\n\nlet client = new S7Client(plcSettings);\nclient.on('error', console.error);\n\n(async function() {\n  await client.connect();\n\n  // Read DB\n  const res = await client.readDB(dbNr, dbVars);\n  console.log(res);\n\n  // Write multiple Vars\n  await client.writeVars([{\n    area: 'db', dbnr: 1, type: 'BOOL',\n    start: 5, bit: 2,\n    value: true\n  }]);\n\n  client.disconnect();\n})();\n```\n\n\n## Special thanks to\n- Davide Nardella for creating [snap7](http://snap7.sourceforge.net)\n- Mathias Küsel for creating [node-snap7](https://github.com/mathiask88/node-snap7)\n\n\n## License \u0026 copyright\n* [S7Client](https://github.com/psi-4ward/s7client/blob/master/LICENSE): MIT\n* [node-snap7](https://github.com/mathiask88/node-snap7/blob/master/LICENSE): MIT\n* [snap7](http://snap7.sourceforge.net/licensing.html): LGPLv3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsi-4ward%2Fs7client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsi-4ward%2Fs7client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsi-4ward%2Fs7client/lists"}