{"id":23127627,"url":"https://github.com/hlfshell/serial-synapse-socket","last_synced_at":"2025-07-11T16:37:09.750Z","repository":{"id":146170867,"uuid":"61496580","full_name":"hlfshell/serial-synapse-socket","owner":"hlfshell","description":"Given a synapse object, create a socket server for the device","archived":false,"fork":false,"pushed_at":"2016-06-20T00:44:46.000Z","size":4,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T05:42:58.338Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/hlfshell.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}},"created_at":"2016-06-19T19:28:19.000Z","updated_at":"2025-01-01T20:34:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"9f1d8143-3e35-42cc-a2db-c9cbe118f51a","html_url":"https://github.com/hlfshell/serial-synapse-socket","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hlfshell/serial-synapse-socket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlfshell%2Fserial-synapse-socket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlfshell%2Fserial-synapse-socket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlfshell%2Fserial-synapse-socket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlfshell%2Fserial-synapse-socket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hlfshell","download_url":"https://codeload.github.com/hlfshell/serial-synapse-socket/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlfshell%2Fserial-synapse-socket/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264852351,"owners_count":23673408,"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":[],"created_at":"2024-12-17T09:14:16.902Z","updated_at":"2025-07-11T16:37:09.690Z","avatar_url":"https://github.com/hlfshell.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# synapse-serial-socket\nGiven a synapse object, create a socket server for the device. This is an accessory module for [Serial Synapse](https://github.com/hlfshell/serial-synapse).\n\n#Install\n```\nnpm install serial-synapse-socket\n```\n\n#Example\n\n```\n//Assuming you created a synapse object called synapse\n\nvar SynapseServer = require('serial-synapse-socket');\nvar server = new SynapseServer({\n  port: 8080,\n  synapse: synapse\n});\n```\n\n...That's it!\n\n#Command syntax\nsynapse-serial-socket is expecting incoming messages to always be a JSON formatted message. It requires a command attribute, and and args attribute. If it is a single argument, you can just send it alone. Multiple arguments can be sent in an array in the order they are to be sent.\n\nFor example:\n```\n{\n  \"command\": \"drive\",\n  \"args\": 255\n}\n//OR\n{\n  \"command\": \"stepDistance\",\n  \"args\": [1, 217]\n}\n```\n\n#Example\n\nI've put together [a quick example](https://github.com/hlfshell/redbot-synapse-example) using a sub $100 robot you can buy off of Sparkfun.\n\n#TODO\n1 - There is no authentication yet\n\n2 - Your update functions (*then*) are overridden in this version with one that broadcasts the data to all connected clients.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlfshell%2Fserial-synapse-socket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhlfshell%2Fserial-synapse-socket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlfshell%2Fserial-synapse-socket/lists"}