{"id":22859966,"url":"https://github.com/reelyactive/pareto-anywhere","last_synced_at":"2025-06-29T15:02:25.047Z","repository":{"id":40245492,"uuid":"232445089","full_name":"reelyactive/pareto-anywhere","owner":"reelyactive","description":"Open source IoT middleware suite that makes the data from just about anything usable.  We believe in an open Internet of Things.","archived":false,"fork":false,"pushed_at":"2025-05-31T12:40:58.000Z","size":2549,"stargazers_count":27,"open_issues_count":0,"forks_count":8,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-31T23:37:15.176Z","etag":null,"topics":["context-aware","context-aware-physical-spaces","context-awareness","dynamb","hyperlocal-context","iot-platform","middleware","node-js","open-source","pareto-anywhere","raddec","rtls","spatem","web-bluetooth-scanning"],"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,"zenodo":null}},"created_at":"2020-01-08T00:41:43.000Z","updated_at":"2025-05-31T14:21:46.000Z","dependencies_parsed_at":"2024-04-27T23:23:57.811Z","dependency_job_id":"9f01f27a-d0d6-4d28-80ec-58d7c9224e5f","html_url":"https://github.com/reelyactive/pareto-anywhere","commit_stats":{"total_commits":185,"total_committers":4,"mean_commits":46.25,"dds":"0.032432432432432434","last_synced_commit":"35165e7c3ce588550c761f3e24a764077f6d4d14"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reelyactive/pareto-anywhere","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fpareto-anywhere","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fpareto-anywhere/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fpareto-anywhere/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fpareto-anywhere/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reelyactive","download_url":"https://codeload.github.com/reelyactive/pareto-anywhere/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fpareto-anywhere/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262614453,"owners_count":23337275,"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":["context-aware","context-aware-physical-spaces","context-awareness","dynamb","hyperlocal-context","iot-platform","middleware","node-js","open-source","pareto-anywhere","raddec","rtls","spatem","web-bluetooth-scanning"],"created_at":"2024-12-13T09:08:32.610Z","updated_at":"2025-06-29T15:02:25.029Z","avatar_url":"https://github.com/reelyactive.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Pareto Anywhere\n===============\n\n__Pareto Anywhere__ is the open source IoT middleware that makes the data from just about anything readily usable an application/technology/vendor-agnostic way.\n\n![Overview of Pareto Anywhere](https://reelyactive.github.io/pareto-anywhere/images/overview.png)\n\n__Pareto Anywhere__ provides a single standard stream of real-time data, in the form of developer-friendly JSON, regardless of the underlying radio-identifiable devices \u0026 technologies.\n\n__pareto-anywhere__ is a lightweight [Node.js package](https://www.npmjs.com/package/pareto-anywhere) that can run on resource-constrained edge devices as well as on powerful cloud servers and anything in between (i.e. _Anywhere_).  The bundled web apps, APIs and integrations offer a friendly and comprehensive introduction to [context-aware physical spaces](https://www.reelyactive.com/context-aware-physical-spaces/).  And, thanks to a modular, open architecture, __pareto-anywhere__ can easily be customised for scale and/or functionality.\n\nLearn more at [www.reelyactive.com/pareto/anywhere/](https://www.reelyactive.com/pareto/anywhere/)\n\n\nGetting Started\n---------------\n\nFollow our step-by-step tutorials to get started with __Pareto Anywhere__ on your platform of choice:\n- [Run Pareto Anywhere on a personal computer](https://reelyactive.github.io/diy/pareto-anywhere-pc/)\n- [Run Pareto Anywhere on a Raspberry Pi](https://reelyactive.github.io/diy/pareto-anywhere-pi/)\n\nLearn \"owl\" about the __raddec__, __dynamb__ and __spatem__ JSON data output:\n- [reelyActive Developer's Cheatsheet](https://reelyactive.github.io/diy/cheatsheet/)\n\n\nQuick(est) start\n----------------\n\nInstall (or update) the __pareto-anywhere__ package globally with the command:\n\n    npm install -g pareto-anywhere\n\nRun at any time with the command:\n\n    pareto-anywhere\n\nBrowse to [localhost:3001](http://localhost:3001) to see __Pareto Anywhere__ running, and to explore the web apps and APIs.\n\nThis installation affords _limited_ configuration through environment variables.  For _full_ configuration capability, instead follow the (Recommended) Quick start below.\n\n\n(Recommended) Quick start\n-------------------------\n\nClone this repository and its submodules, and install dependencies with the following commands:\n\n    git clone --recurse-submodules https://github.com/reelyactive/pareto-anywhere.git\n    cd pareto-anywhere\n    npm install\n\nThen from the __pareto-anywhere__ folder, run at any time with the command:\n\n    npm start\n\nBrowse to [localhost:3001](http://localhost:3001) to see __Pareto Anywhere__ running, and to explore the web apps and APIs.\n\nThis installation affords _full_ configuration through custom startup scripts and environment variables.  Consult our [Create a Pareto Anywhere startup script](https://reelyactive.github.io/diy/pareto-anywhere-startup-script/) tutorial to learn more, and our [Run Pareto Anywhere as a Windows service](https://reelyactive.github.io/diy/pareto-anywhere-windows-service/) tutorial for running in production on Windows machines.\n\n\nUpdating\n--------\n\nAn existing installation can be updated by running the following commands from the root of the cloned repository:\n\n    git fetch\n    git pull origin master --recurse-submodules\n    npm install\n\n\nWhat is pareto-anywhere?\n------------------------\n\n__pareto-anywhere__ is a convenient collection of complementary open source software modules by [reelyActive](https://www.reelyactive.com) which, together, collect ambient IoT data from common sources and process it into a standard JSON format that you can readily put to good use via APIs, web apps and familiar integrations.\n\n![pareto-anywhere components](https://reelyactive.github.io/pareto-anywhere/images/pareto-anywhere-components.png)\n\nThese open source software modules are hosted each in their own individual repository as follows:\n\n| Software module                                           | Role |\n|:----------------------------------------------------------|:-----|\n| [barnowl](https://github.com/reelyactive/barnowl)         | Interface for gateways, APs and readers |\n| [barnacles](https://github.com/reelyactive/barnacles)     | Efficient data aggregator/distributor |\n| [barterer](https://github.com/reelyactive/barterer)       | Real-time location \u0026 sensor data API |\n| [chickadee](https://github.com/reelyactive/chickadee)     | Contextual associations store and API |\n| [chimps](https://github.com/reelyactive/chimps)           | Spatial dynamics processor |\n| [advlib](https://github.com/reelyactive/advlib)           | Library for wireless advertising packet decoding |\n| [sniffypedia](https://github.com/reelyactive/sniffypedia) | Index for implicit URI assocation |\n| [json-silo](https://github.com/reelyactive/json-silo)     | Digital twins store |\n| [record-silo](https://github.com/reelyactive/record-silo) | Digital records store |\n\n__pareto-anywhere__ is designed to serve as a friendly launch point for developers and end-users alike.  [Create a Pareto Anywhere startup script](https://reelyactive.github.io/diy/pareto-anywhere-startup-script/) to add and customise modules, or, if necessary, edit the [lib/paretoanywhere.js](blob/master/lib/paretoanywhere.js) file directly, to remove and customise modules.\n\n\nInput: Ambient Data\n-------------------\n\n__pareto-anywhere__ listens for [ambient data](https://www.reelyactive.com/ambient-data/) from multiple sources, using the following open source software modules:\n\n| Software module                                               | Listens for |\n|:--------------------------------------------------------------|:------------|\n| [barnowl](https://github.com/reelyactive/barnowl)             | UDP raddec packets on port 50001 |\n| [barnowl-aruba](https://github.com/reelyactive/barnowl-aruba) | WebSocket on __/aruba__ |\n| [barnowl-minew](https://github.com/reelyactive/barnowl-minew) | HTTP POST on __/minew__ |\n| [barnowl-reel](https://github.com/reelyactive/barnowl-reel)   | UDP reel packets on port 50000 |\n| [barnowl-huawei](https://github.com/reelyactive/barnowl-huawei) | UDP Huawei packets on port 50010 |\n| [barnowl-impinj](https://github.com/reelyactive/barnowl-impinj) | HTTP POST on __/impinj__ |\n| [barnowl-rfcontrols](https://github.com/reelyactive/barnowl-rfcontrols) | STOMP over WebSocket |\n| [barnowl-csl](https://github.com/reelyactive/barnowl-csl)     | HTTP POST on __/csl__ |\n| [barnowl-axis](https://github.com/reelyactive/barnowl-axis)   | MQTT on localhost |\n\n[Create a Pareto Anywhere startup script](https://reelyactive.github.io/diy/pareto-anywhere-startup-script/) to add and customise input modules, or forward __raddec__ data as UDP packets simply by running the `npm run forwarder` script of the corresponding barnowl-x module, such as [barnowl-hci](https://github.com/reelyactive/barnowl-hci/#pareto-anywhere-integration).  \n\n\nOutput: Hyperlocal Context\n--------------------------\n\n__pareto-anywhere__ outputs [hyperlocal context](https://www.reelyactive.com/context/) which may be queried via the __/context__ API, or streamed as __raddec__, __dynamb__ and __spatem__ JSON data by subscribing via MQTT and/or Socket.IO.  These JSON data structures are explained in the [reelyActive Developers Cheatsheet](https://reelyactive.github.io/diy/cheatsheet/).\n\nThe __pareto-anywhere__ APIs are served by the following open source software modules:\n\n| Software module                                           | API          |\n|:----------------------------------------------------------|:-------------|\n| [barterer](https://github.com/reelyactive/barterer)       | __/devices__ |\n| [chickadee](https://github.com/reelyactive/chickadee)     | __/context__ \u0026 __/associations__ \u0026 __/features__ |\n| [json-silo](https://github.com/reelyactive/json-silo)     | __/stories__ |\n| [record-silo](https://github.com/reelyactive/record-silo) | __/records__ |\n\nData is published, by default, to a MQTT broker on localhost by the [barnacles-mqtt](https://github.com/reelyactive/barnacles-mqtt) module which observes the following topic structure:\n\n- `paretoanywhere/devices/[deviceId]/[deviceIdType]/raddec`\n- `paretoanywhere/devices/[deviceId]/[deviceIdType]/dynamb`\n- `paretoanywhere/devices/[deviceId]/[deviceIdType]/spatem`\n\nThe MQTT single-level wildcard (+) can be used to subscribe to all event types for a given device, and the multi-level wildcard (#) can be used to subscribe to all events for all devices, for example: `paretoanywhere/#`\n\n\n### Output logfiles\n\nTo capture __raddec__ and __dynamb__ data into .csv files, from the root folder of this repository, start Pareto Anywhere with the command:\n\n    npm run logfile\n\nFiles named raddec-yymmdd-hhmmss.csv and dynamb-yymmdd-hhmmss.csv will appear in the root folder when data is processed, rotating periodically, and which can be opened in a spreadsheet for analysis. \n\n\nConfig Files\n------------\n\nThe __/config__ folder, or a distinct folder specified by the PARETO_ANYWHERE_CONFIG_PATH environment variable, accepts the following run-time configuration files:\n\n### certificate.pem \u0026 key.pem\n\nOn startup, __pareto-anywhere__ attempts to initiate a HTTPS server using these files, if present.  If not, a HTTP server is instantiated instead.\n\nNote that ambient data sources which relay data to __pareto-anywhere__ should observe the corresponding protocol (http:// vs. https:// and ws:// vs. wss://) in their target configuration.\n\n### enocean.json\n\nEnOcean Alliance devices require a mapping between their device identifier and their EnOcean Equipment Profile (EEP) in order for their payload to be decoded by [advlib-esp](https://github.com/reelyactive/advlib-esp) and its sub-libraries.  The __/config/enocean.json__ file has the following format:\n\n    {\n      \"05174fc4/7\": { \"eepType\": \"A5-04-03\" },\n      \"0591ee96/7\": { \"eepType\": \"D5-00-01\" },\n      \"04141559/7\": { \"eepType\": \"D2-14-41\" },\n      \"002eea1f/7\": { \"eepType\": \"F6-02-02\" }\n    }\n\nNote that the 32-bit device identifier is specified in _lowercase_ hexadecimal and suffixed with \"/7\" which represents the [EURID-32 idType](https://reelyactive.github.io/diy/cheatsheet/#idtype), while the eepType is specified in _UPPERCASE_ hexadecimal.\n\n\nNative integrations\n-------------------\n\n__Pareto Anywhere__ integrates with just about any data store, stream processor or application either via existing APIs or the addition of a connector module.  Additionally, the following integrations are _natively_ supported by  __pareto-anywhere__.\n\n### InfluxDB v2\n\nFrom the root folder of this repository, start Pareto Anywhere with the command:\n\n    npm run influxdb2\n\nIf prompted, install [barnacles-influxdb2](https://github.com/reelyactive/barnacles-influxdb2/) with the command `npm install barnacles-influxdb2`.  __pareto-anywhere__ will automatically write __dynamb__ data to a local InfluxDB v2 database, if installed and running.\n\nThe local InfluxDB v2 instance is expected at [http://localhost:8086](http://localhost:8086/) with org \"reelyActive\" and bucket \"pareto-anywhere\".  Set INFLUXDB_TOKEN as an environment variable.\n\n### Elastic Stack\n\nFrom the root folder of this repository, start Pareto Anywhere with the command:\n\n    npm run elasticsearch\n\nIf prompted, install [barnacles-elasticsearch](https://github.com/reelyactive/barnacles-elasticsearch/) with the command `npm install barnacles-elasticsearch`.  __pareto-anywhere__ will automatically write to a local Elasticsearch database, if installed and running, so that the __raddec__ and __dynamb__ data may in turn be [analysed in Kibana](https://reelyactive.github.io/diy/kibana/).\n- __pareto-anywhere__ v1.8 and above expect an Elasticsearch 8.x instance, offering nominal backwards-compatiblility with 7.x\n- __pareto-anywhere__ v1.7 and below require an Elasticsearch 7.x instance\n\nThe local Elasticsearch instance is expected at [http://localhost:9200](http://localhost:9200/) and, if a Kibana instance is also running, the data will be available for analysis at [http://localhost:5601](http://localhost:5601/).\n\nTo instead have __pareto-anywhere__ store data in a _remote_ Elasticsearch database, first set the environment variable ELASTICSEARCH_NODE to the corresponding URL, including the corresponding username and password, for example:\n\n    https://username:password@server.com:9243\n\n### Node-RED\n\nThe [@reelyactive/node-red-pareto-anywhere](https://flows.nodered.org/node/@reelyactive/node-red-pareto-anywhere) Flow includes a __pareto-anywhere-socketio__ Node that will automatically connect to __pareto-anywhere__'s Socket.IO API running at [localhost:3001](http://localhost:3001), and will stream the __raddec__, __dynamb__ and __spatem__ JSON data to application logic in real-time.\n\n### Eclipse Sparkplug\n\nFrom the root folder of this repository, start Pareto Anywhere with the command:\n\n    npm run sparkplug\n\nIf prompted, install [barnacles-sparkplug](https://github.com/reelyactive/barnacles-sparkplug/) with the command `npm install barnacles-sparkplug`.  __pareto-anywhere__ will attempt to connect to a MQTT broker running on localhost:1883 using the ClientId \"ParetoAnywhereEdgeNode\" and, if successful, will publish Sparkplug B messages.\n\n\nBuild and run with Docker\n-------------------------\n\nFor users who prefer deployment using containers, first build the Docker image from the root folder of this repository:\n\n    docker build -t pareto-anywhere:core .\n\nThen start the container:\n\n\n    docker run -d \\\n    -p 3001:3001/tcp \\\n    -p 50000:5000/udp \\\n    -p 50001:50001/udp \\\n    --restart unless-stopped \\\n    --name pareto-anywhere \\\n    pareto-anywhere:core\n\nBrowse to [localhost:3001](http://localhost:3001) to see __Pareto Anywhere__ running and browse the APIs.\n\n\nRun Pareto Anywhere, Elastisearch and Kibana with Docker-Compose\n----------------------------------------------------------------\n\nFor users who prefer deployment using containers, Deploy Elasticsearch, Kibana and Pareto Anywhere from the root folder of this repository:\n\n    docker-compose up -d\n\nBrowse to [localhost:3001](http://localhost:3001) to see __Pareto Anywhere__ running and browse the APIs.\nBrowse to [localhost:5601](http://localhost:5601) to see __Kibana__ dashboard running.\nBrowse to [localhost:9200](http://localhost:9200) to see __Elasticsearch__ running and browse the APIs.\n\n\nDeveloper Notes\n---------------\n\nThe pareto-anywhere codebase includes [Pareto Apps](https://github.com/reelyactive/pareto-anywhere-apps) as a git submodule (in the web/apps folder).  To update to the latest Pareto Apps run:\n\n    git submodule update --remote\n\nIf developing Pareto Apps from within this repository, changes can be pushed to the Pareto Apps origin (pareto-anywhere-develop branch) by the usual means, from the web/apps folder:\n\n    cd web/apps\n    git checkout pareto-anywhere-develop\n    ...update files...\n    git add [...]\n    git commit -m \"Description of update\"\n    git push origin pareto-anywhere-develop\n\n\n![Pareto Anywhere logo](https://reelyactive.github.io/pareto-anywhere/images/pareto-anywhere-logo.png)\n\n\nPareto Anywhere variants\n------------------------\n\n[Pareto Anywhere for Azure](https://github.com/reelyactive/pareto-anywhere-azure) is adapted to run efficiently in the cloud as a stateless Azure Function.  Learn more [here](https://www.reelyactive.com/pareto/anywhere/integrations/azure/).\n\n[Pareto Anywhere for the Web](https://github.com/reelyactive/pareto-anywhere/tree/gh-pages) is adapted to run in-browser, leveraging the _experimental_ Web Bluetooth Scanning feature, introduced to the Chrome browser in late 2019.  Try it [here](https://reelyactive.github.io/pareto-anywhere/).\n\n\nProject History\n---------------\n\nIn 2019, __Pareto Anywhere__ was created to supersede [hlc-server](https://github.com/reelyactive/hlc-server/), our open source _Hyperlocal Context Server_, which was itself created in 2014.\n\n__pareto-anywhere__ v1.5.0 adopts [chickadee](https://github.com/reelyactive/chickadee) v1.4.0 which migrates to [ESMapDB](https://github.com/reelyactive/esmapdb) from [NeDB](https://github.com/louischatriot/nedb). If upgrading from a previous version, any stored associations will need to be recreated.\n\n__pareto-anywhere__ v1.13.0 removes explicit database dependencies (i.e. Elasticsearch), instead allowing the database to be specified at runtime (ex: `npm run elasticsearch` or `npm run influxdb2`).\n\nLearn more about the __Pareto by reelyActive__ collection at [www.reelyactive.com/pareto](https://www.reelyactive.com/pareto/)\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) 2020-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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freelyactive%2Fpareto-anywhere","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freelyactive%2Fpareto-anywhere","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freelyactive%2Fpareto-anywhere/lists"}