{"id":22860033,"url":"https://github.com/reelyactive/neopixel-ble-bindicators","last_synced_at":"2026-07-03T07:33:12.205Z","repository":{"id":194405138,"uuid":"690609609","full_name":"reelyactive/neopixel-ble-bindicators","owner":"reelyactive","description":"REST API to light up individual NeoPixels associated with a specific cart/shelf/bin via a Bluetooth Low Energy link to a microcontroller. We believe in an open Internet of Things.","archived":false,"fork":false,"pushed_at":"2023-09-14T16:38:10.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T08:24:13.414Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/reelyactive.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-12T14:19:08.000Z","updated_at":"2023-09-12T20:56:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"0c8274c2-289e-4340-bfb7-f7fdfd6141ec","html_url":"https://github.com/reelyactive/neopixel-ble-bindicators","commit_stats":null,"previous_names":["reelyactive/neopixel-ble-bindicators"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reelyactive/neopixel-ble-bindicators","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fneopixel-ble-bindicators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fneopixel-ble-bindicators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fneopixel-ble-bindicators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fneopixel-ble-bindicators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reelyactive","download_url":"https://codeload.github.com/reelyactive/neopixel-ble-bindicators/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fneopixel-ble-bindicators/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35077507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-12-13T09:08:47.230Z","updated_at":"2026-07-03T07:33:12.189Z","avatar_url":"https://github.com/reelyactive.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"neopixel-ble-bindicators\n========================\n\nREST API to light up individual NeoPixels associated with a specific cart/shelf/bin via a Bluetooth Low Energy link to a microcontroller.\n\n\nQuick Start\n-----------\n\nClone this repository, install package dependencies with `npm install`, and then from the root folder run at any time:\n\n    npm start\n\n__neopixel-ble-bindicators__ will attempt to connect with the Bluetooth Low Energy microcontroller defined in the config/bluetooth.json file, and accept requests to configure via API any LED strips connected to that microcontroller.\n\n\nMicrocontrollers\n----------------\n\nThe following microcontrollers are supported, with code provided:\n\n| Microcontroller | Code (in /microcontrollers folder) |\n|:-------------------------------|:--------------------|\n| [bledstripper-grove](https://github.com/reelyactive/bledstripper-grove) | bledstripper-grove.js |\n\n\nREST API\n--------\n\n__neopixel-ble-bindicators__'s REST API includes the following base route:\n- /bindicators _to indicate one or more bins with specific LED settings_\n\n### PUT /bindicators\n\nUpdate the strips to indicate one or more bins with specific LED settings.\n\n#### Example request\n\n| Method | Route        | Content-Type     |\n|:-------|:-------------|:-----------------|\n| PUT    | /bindicators | application/json |\n\n    [\n      { \"cart\": \"A\", \"shelf\": 1, \"bin\": 2, \"rgb\": \"0770a2\" },\n      { \"cart\": \"B\", \"shelf\": 3, \"bin\": 1, \"rgb\": [ 7, 112, 162 ] }\n    ]\n\n#### Example response\n\n    {\n      \"_meta\": {\n        \"message\": \"ok\",\n        \"statusCode\": 200\n      },\n      \"_links\": {\n        \"self\": {\n          \"href\": \"http://localhost:3000/bindicators/\"\n        }\n      }\n    }\n\n#### Notes\n\nTo turn off all LEDs, PUT /bindicators with an empty array (`[]`).\n\n\nConfiguration Files\n-------------------\n\nOn startup, __neopixel-serial-bindicators__ will load all relevant files in the /config directory.\n\n### strips-x.csv\n\nThe strips-x.csv files define the association of a chain of strips with the cart(s)/shelves/bins it serves to indicate.  The 'x' represents the id of the chain of strips with reference to the microcontroller (ex: strips-0.csv).\n\nThe first line of the file is ignored, and therefore typically used as a header defining each column to facilitate manual editing.  The second line, and all subsequent lines, are read into the configuration, each representing a specific shelf, and observe the following column ordering:\n\n| Column | Title         | Description                                        |\n|:-------|:--------------|:---------------------------------------------------|\n| 1      | \"cartName\"    | String identifying the cart (ex: \"1\")              |\n| 2      | \"shelfId\"     | Positive integer defining the shelf (ex: 2)        |\n| 3      | \"shelfWidth\"  | Width of the shelf in mm (ex: 1000)                |\n| 4      | \"stripOffset\" | Offset of the first LED of this shelf (ex: 0)      |\n| 5      | \"stripLength\" | Number of LEDs associated with this shelf (ex: 60) |\n| 6      | \"isReverse\"   | true if strip goes left-to-right, false otherwise  |\n| 7      | \"bin(1)\"      | Offset in mm from the start of the shelf to the start of the first bin (ex: 0) |\n| 7+n-1  | \"bin(n)\"      | Offset in mm from the start of the shelf to the start of the n-th bin (ex: 920) |\n\nThe line corresponding with the table above is as follows:\n    \"1\",2,1000,0,60,true,0,...,920\n\n### bluetooth.json\n\nThe bluetooth.json file defines the address of the Bluetooth Low Energy LED driver with which to connect, as follows:\n\n    {\n      \"peripheralAddress\": \"b1:ed:57:21:44:e7\"\n    }\n\n\nOver-the-Air Protocol\n---------------------\n\n__neopixel-ble-bindicators__ translates API requests into binary messages, according to the following protocol, which are written to the LED Strips characteristic of the bindicators service (Bluetooth GATT).\n\n### Clear Strip\n\nThe Clear Strip command instructs the microcontroller to extinguish all LEDs on the given strip.\n\n| Byte offset | Description                                       |\n|:------------|:--------------------------------------------------|\n| 0           | 0x00 (Clear Strip command)                        |\n| 1           | Strip id (0-255)                                  |\n\n### Write Strip\n\nThe Write Strip command instructs the microcontroller to illuminate a given range of LEDs with a specific RGB value.\n\n| Byte offset | Description                                       |\n|:------------|:--------------------------------------------------|\n| 0           | 0x01 (Write Strip command)                        |\n| 1           | Strip id (0-255)                                  |\n| 2           | 16-bit offset of first LED (0x0000-0xffff)        |\n| 4           | 16-bit offset of last LED (0x0000-0xffff)         |\n| 6           | Red intensity (0 to 255)                          |\n| 7           | Green intensity (0 to 255)                        |\n| 8           | Blue intensity (0 to 255)                         |\n| 9           | 16-bit strip length (0x0000-0xffff)               |\n| 11          | Option (reserved for future use) (0-255)          |\n\n\nLicense\n-------\n\nMIT License\n\nCopyright (c) 2023 [reelyActive](https://www.reelyactive.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \nTHE SOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freelyactive%2Fneopixel-ble-bindicators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freelyactive%2Fneopixel-ble-bindicators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freelyactive%2Fneopixel-ble-bindicators/lists"}