{"id":40513144,"url":"https://github.com/synapticon/motion-master-client-examples","last_synced_at":"2026-01-20T20:31:25.753Z","repository":{"id":151842242,"uuid":"620756992","full_name":"synapticon/motion-master-client-examples","owner":"synapticon","description":"TypeScript/JavaScript examples for interacting with Motion Master to configure and control SOMANET devices.","archived":false,"fork":false,"pushed_at":"2025-12-05T09:58:36.000Z","size":3571,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-08T03:09:35.088Z","etag":null,"topics":["ethercat","javascript","protobuf","typescript","websockets"],"latest_commit_sha":null,"homepage":"https://synapticon.github.io/oblac/motion-master-client/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/synapticon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-29T10:07:02.000Z","updated_at":"2025-12-05T09:58:40.000Z","dependencies_parsed_at":"2023-12-14T13:42:41.522Z","dependency_job_id":"79f91a77-e053-4c8b-af9b-881651709154","html_url":"https://github.com/synapticon/motion-master-client-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/synapticon/motion-master-client-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synapticon%2Fmotion-master-client-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synapticon%2Fmotion-master-client-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synapticon%2Fmotion-master-client-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synapticon%2Fmotion-master-client-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synapticon","download_url":"https://codeload.github.com/synapticon/motion-master-client-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synapticon%2Fmotion-master-client-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28612859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T18:56:40.769Z","status":"ssl_error","status_checked_at":"2026-01-20T18:54:26.653Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["ethercat","javascript","protobuf","typescript","websockets"],"created_at":"2026-01-20T20:31:25.687Z","updated_at":"2026-01-20T20:31:25.743Z","avatar_url":"https://github.com/synapticon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Motion Master Client Examples\n\nThis repository provides TypeScript/JavaScript examples for interacting with Synapticon's Motion Master server application to configure and control SOMANET devices.\n\n## Building\n\nClone this repository and install its dependencies:\n\n```console\ngit clone https://github.com/synapticon/motion-master-client-examples.git\ncd motion-master-client-examples\nnpm install\n```\n\nTo transpile from TypeScript to JavaScript, use the following command:\n\n```console\nnpm run build\n```\n\nThe resulting JavaScript files will be located in the `dist` folder.\n\n## Running\n\nBefore executing any scripts, ensure to set the `MOTION_MASTER_HOSTNAME` environment variable. For example, if the Motion Master process runs at `192.168.1.112`, you have two options:\n\n1. Create a `.env` file in the repository root with `MOTION_MASTER_HOSTNAME=192.168.1.112`.\n2. Run a script directly by setting the variable inline: `MOTION_MASTER_HOSTNAME=192.168.1.112 node ./dist/request/get-devices.rx.js`.\n\nThe advantage of using the `.env` file is that all scripts will consistently use the specified hostname without needing to set the variable each time.\n\nTo log all incoming and outgoing messages from Motion Master, set the `ROAR_LOG=true` environment variable when running your scripts.\n\nHere's an example `.env` file configuration:\n\n```sh\nMOTION_MASTER_HOSTNAME=192.168.1.112\nROARR_LOG=true\n```\n\nAlternatively, you can run TypeScript files directly without transpiling using `ts-node`:\n\n```console\nnpx ts-node ./src/request/get-devices.rx.ts\n```\n\n## Command line arguments\n\nAll commands associated with a specific device require the `--device-ref` option, along with other specific arguments. To view detailed help documentation for any command, use the `--help` option. For example:\n\n```console\nnpx ts-node ./src/request/upload.ts --help\nUsage: upload [options] \u003cindex\u003e \u003csubindex\u003e [loadFromCache]\n\nArguments:\n  index                          object index in hexadecimal notation\n  subindex                       object subindex in hexadecimal notation\n  loadFromCache                  load parameter values from the Motion Master cache (choices: \"true\", \"false\", default: false)\n\nOptions:\n  -d, --device-ref \u003cvalue\u003e       position, address, or serial number (default: 0 position represents the first device in a network chain)\n  -t, --request-timeout \u003cvalue\u003e  after sending a request, how long will the client wait for Motion Master to send the status message back\n  -m, --message-id \u003cvalue\u003e       the message ID, which uniquely identifies the request, will be generated by the client library if not specified\n  -h, --help                     display help for command\n```\n\nHere is an example of how to read the drive temperature:\n\n```console\nnpx ts-node ./src/request/upload.ts --device-ref=1 0x2031 0x01\n```\n\n## Monitoring\n\nTo monitor output data and save it to both stdout and a file (data.csv), use:\n\n```console\nnode ./dist/start-monitoring.js --device-ref=1 | tee data.csv\n```\n\n## Developing\n\nTo watch `.ts` files for changes and automatically transpile, use:\n\n```console\nnpm run watch\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynapticon%2Fmotion-master-client-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynapticon%2Fmotion-master-client-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynapticon%2Fmotion-master-client-examples/lists"}