{"id":22860061,"url":"https://github.com/reelyactive/barterer","last_synced_at":"2025-08-11T09:31:42.888Z","repository":{"id":26331522,"uuid":"29780121","full_name":"reelyactive/barterer","owner":"reelyactive","description":"Real-time location \u0026 sensor data API for location-aware physical spaces.  We believe in an open Internet of Things.","archived":false,"fork":false,"pushed_at":"2024-01-23T00:53:01.000Z","size":1707,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-14T23:30:14.420Z","etag":null,"topics":["api","bluetooth-low-energy","dynamb","location-awareness","node-js","pareto-anywhere","raddec","rtls"],"latest_commit_sha":null,"homepage":"https://www.reelyactive.com/pareto/anywhere/","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":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-24T15:02:30.000Z","updated_at":"2024-04-28T14:37:01.230Z","dependencies_parsed_at":"2023-10-12T01:15:38.306Z","dependency_job_id":"a6d5176a-2442-4323-b36c-e5884adf19bb","html_url":"https://github.com/reelyactive/barterer","commit_stats":{"total_commits":170,"total_committers":2,"mean_commits":85.0,"dds":0.0117647058823529,"last_synced_commit":"c16ceb6a68f06995bfc0e87962bc2717b1d7b9e9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fbarterer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fbarterer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fbarterer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fbarterer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reelyactive","download_url":"https://codeload.github.com/reelyactive/barterer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229318344,"owners_count":18054395,"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":["api","bluetooth-low-energy","dynamb","location-awareness","node-js","pareto-anywhere","raddec","rtls"],"created_at":"2024-12-13T09:08:49.735Z","updated_at":"2025-08-11T09:31:42.876Z","avatar_url":"https://github.com/reelyactive.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"barterer\n========\n\n__barterer__ is an API for the real-time location, identification and sensing of wireless devices, and a core module of [Pareto Anywhere](https://www.reelyactive.com/pareto/anywhere/) open source IoT middleware.\n\n![Overview of barterer](https://reelyactive.github.io/barterer/images/overview.png)\n\nSpecifically, __barterer__ provides a vendor-and-technology-agnostic IoT API when coupled with live data from a [barnacles](https://github.com/reelyactive/barnacles/) instance and optional [chimps](https://github.com/reelyactive/chimps/) instance.   __barterer__ can run standalone, although it is usually run together with its peer modules.\n\n\nInstallation\n------------\n\n    npm install barterer\n\n\nHello barterer!\n---------------\n\n    npm start\n\nBrowse to [localhost:3001/devices/001bc50940810000/1](http://localhost:3001/devices/001bc50940810000/1) to see if there are any associations for the device with EUI-64 identifier 00-1b-c5-09-40-81-00-00.  By default, this should return Not Found.\n\n\nREST API\n--------\n\n### GET /devices\n\nRetrieve all active devices.\n\n#### Example request\n\n| Method | Route    | Content-Type     |\n|:-------|:---------|:-----------------|\n| GET    | /devices | application/json |\n\n#### Example response\n\n    {\n      \"_meta\": {\n        \"message\": \"ok\",\n        \"statusCode\": 200\n      },\n      \"_links\": {\n        \"self\": {\n          \"href\": \"http://localhost:3001/devices\"\n        }\n      },\n      \"devices\": {\n        \"fee150bada55/2\": {},\n        \"001bc50940810000/1\": {},\n        \"001bc50940820000/1\": {}\n      }\n    }\n\n\n### GET /devices/{id}/{type}\n\nRetrieve the active device with the given _id_ and _type_.\n\n#### Example request\n\n| Method | Route                   | Content-Type     |\n|:-------|:------------------------|:-----------------|\n| GET    | /devices/fee150bada55/2 | application/json |\n\n#### Example response\n\n    {\n      \"_meta\": {\n        \"message\": \"ok\",\n        \"statusCode\": 200\n      },\n      \"_links\": {\n        \"self\": {\n          \"href\": \"http://localhost:3001/devices/fee150bada55/2\"\n        }\n      },\n      \"devices\": {\n        \"fee150bada55/2\": {\n          \"raddec\": {\n            \"transmitterId\": \"fee150bada55\",\n            \"transmitterIdType\": 2,\n            \"rssiSignature\": [\n              {\n                \"receiverId\": \"001bc50940820000\",\n                \"receiverIdType\": 1,\n                \"rssi\": -71,\n                \"numberOfDecodings\": 2\n              },\n              {\n                \"receiverId\": \"001bc50940810000\",\n                \"receiverIdType\": 1,\n                \"rssi\": -84,\n                \"numberOfDecodings\": 2\n              }\n            ],\n            \"packets\": [\n               \"(as hexadecimal strings)\"\n            ],\n            \"timestamp\": 1621865950453,\n            \"events\": [\n              2\n            ]\n          },\n          \"dynamb\": {\n            \"timestamp\": 1621865950453,\n            \"batteryPercentage\": 100,\n            \"acceleration\": [\n              -0.46875,\n              -0.76953125,\n              0.3984375\n            ]\n          },\n          \"spatem\": {\n            \"timestamp\": 1621865950453,\n            \"type\": \"position\",\n            \"data\": {\n              \"type\": \"FeatureCollection\",\n              \"features\": [\n                {\n                  \"type\": \"Feature\",\n                  \"properties\": {\n                    \"isDevicePosition\": true,\n                    \"positioningEngine\": \"External\"\n                  },\n                  \"geometry\": {\n                    \"type\": \"Point\",\n                    \"coordinates\": [ -73.57123, 45.50883 ]\n                  }\n                }\n              ]\n            }\n          },\n          \"statid\": {\n            \"uuids\": [\n              \"ffe1\",\n              \"feaa\"\n            ],\n            \"uri\": \"https://sniffypedia.org/Product/Google_Eddystone/\",\n            \"deviceIds\": [\n              \"7265656c652055554944/fee150bada55\"\n            ],\n            \"name\": \"NAME\"\n          }\n        }\n      }\n    }\n\n\nSocket.IO\n---------\n\nWhen initialised with a Socket.IO server as an option, __barterer__ supports the following namespaces:\n- /devices\n- /devices/raddec\n- /devices/dynamb\n- /devices/spatem\n- /devices/{id}/{type}\n- /devices/{id}/{type}/raddec\n- /devices/{id}/{type}/dynamb\n- /devices/{id}/{type}/spatem\n\nraddec, dynamb and spatem events are emitted except for namespaces ending with /raddec, /dynamb or /spatem, in which case only the specified event is emitted.  For an example of the raddec, dynamb JSON structures, consult the [reelyActive Developer's Cheatsheet](https://reelyactive.github.io/diy/cheatsheet/) as well as the sample response of the REST API above.\n\n\n![barterer logo](https://reelyactive.github.io/barterer/images/barterer-bubble.png)\n\n\nWhat's in a name?\n-----------------\n\nBarter is a system of exchange by which goods or services are directly exchanged for other goods or services without using a medium of exchange, such as money.  Seems fitting for an API in an open Internet of Things.\n\nWhy is barterer represented by a starfish?  Well, in our software architecture, barterer consumes data from barnacles, and in nature, starfish consume barnacles.  One such example is the species [Pisaster ochraceus](http://en.wikipedia.org/wiki/Pisaster_ochraceus).  And, as Wikipedia states, \"while most individuals are purple, they can be orange, orange-ochre, yellow, reddish, or brown\".  Orange was the only colour in the reelyActive palette which fit, so there you have it, an orange starfish.\n\nIf we stretch the story even further, the initials of Pisaster Ochraceus (PO) are the same as the architect of our original API (P-O).  That API was named bartender, but alas, that name had already been claimed on npmjs, and so we exchanged it for barterer (pun intended, as usual).\n\nWhy is the starfish holding scales with a one and a zero?  Because he's bartering digital information of course!\n\n\nContributing\n------------\n\nDiscover [how to contribute](CONTRIBUTING.md) to this open source project which upholds a standard [code of conduct](CODE_OF_CONDUCT.md).\n\n\nSecurity\n--------\n\nConsult our [security policy](SECURITY.md) for best practices using this open source software and to report vulnerabilities.\n\n\nLicense\n-------\n\nMIT License\n\nCopyright (c) 2015-2025 reelyActive\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.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freelyactive%2Fbarterer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freelyactive%2Fbarterer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freelyactive%2Fbarterer/lists"}