{"id":15697252,"url":"https://github.com/threez/ban","last_synced_at":"2025-06-12T02:07:20.030Z","repository":{"id":10432482,"uuid":"12596196","full_name":"threez/ban","owner":"threez","description":"A home control system based on firmata","archived":false,"fork":false,"pushed_at":"2013-10-14T20:23:14.000Z","size":292,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-08T23:46:57.537Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/threez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-04T16:33:44.000Z","updated_at":"2020-04-20T01:01:29.000Z","dependencies_parsed_at":"2022-09-22T19:30:43.261Z","dependency_job_id":null,"html_url":"https://github.com/threez/ban","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Fban","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Fban/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Fban/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Fban/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/threez","download_url":"https://codeload.github.com/threez/ban/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Fban/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258867334,"owners_count":22770086,"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-10-03T19:14:48.653Z","updated_at":"2025-06-12T02:07:19.953Z","avatar_url":"https://github.com/threez.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ban\n\nBan is a arduino firmware (based on firmata) that receives incoming remote control switch commands, infrared commands, door open/close signaling and can send out remote control commands also. Ban distributes all this information over a websocket. The Websocket protocol is described below:\n\n## The Arduino Layout\n\n![Laoyut](https://raw.github.com/threez/ban/master/doc/ban-layout.png)\n\n## Websocket Protocol\n\nBasically the protocol has no authentication and is based on JSON.\n\n### Send messages\n\nThe following commands and there json representation are send by the ban server to all clients:\n\n#### rc-turned-on\n\n    { 'rc-turned-on': { 'decimal': 21780,\n                        'bits': 24,\n                        'binary': '000000000101010100010100',\n                        'tristate': '0000FFFF0FF0',\n                        'delay': 322,\n                        'protocol': 1 } }\n\n#### rc-turned-off\n\n    { 'rc-turned-off': { 'decimal': 21780,\n                         'bits': 24,\n                         'binary': '000000000101010100010001',\n                         'tristate': '0000FFFF0F0F',\n                         'delay': 322,\n                         'protocol': 1 } }\n\n#### ir-received\n\n    { 'ir-received': { 'code': 4294967295, 'hex': 'ffffffff' } }\n\n#### door-opened\n\n    { 'door-opened': { 'state': 'open' } }\n\n#### door-closed\n\n    { 'door-closed': { 'state': 'closed' } }\n\n### Received messages\n\nThe following commands can be send to the ban server:\n\n#### rc-turn-off\n\n    { 'rc-turn-off': { 'address': '11110D' } }\n\n\n#### rc-turn-on\n\n    { 'rc-turn-on': { 'address': '11110D' } }\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'ban'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install ban\n\n## Flash the arduino\n\n1. Install the [inotool](http://inotool.org)\n2. Install the arduino library [rc-switch](https://code.google.com/p/rc-switch/)\n3. Install the arduino library [IRremote](https://github.com/shirriff/Arduino-IRremote)\n4. Fetch the git repository\n5. Configure the arduino board in the **ino.ini** file.\n6. And build and upload the Firmware to your arduino. using\n\n\t\t$ ino clean \u0026\u0026 ino build \u0026\u0026 ino upload\n\n## Usage\n\nStart the ban server using:\n\n\t\t$ ban server\n\nThen by default a websocket server is started on the port 8080 on all interfaces. The websocket server will then send and receive the json messages.\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreez%2Fban","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthreez%2Fban","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreez%2Fban/lists"}