{"id":22859982,"url":"https://github.com/reelyactive/barnowl-axis","last_synced_at":"2026-04-21T03:31:03.953Z","repository":{"id":224283497,"uuid":"759390273","full_name":"reelyactive/barnowl-axis","owner":"reelyactive","description":"Collect anonymous occupancy and passage data from Axis Communications network cameras. We believe in an open Internet of Things.","archived":false,"fork":false,"pushed_at":"2024-02-26T21:02:18.000Z","size":293,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-04-01T12:13:19.184Z","etag":null,"topics":["axis-camera","barnowl","mqtt","object-analytics"],"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":"2024-02-18T13:16:50.000Z","updated_at":"2025-04-12T07:00:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"b2b83221-9124-4d78-b27b-80a605ba91a3","html_url":"https://github.com/reelyactive/barnowl-axis","commit_stats":null,"previous_names":["reelyactive/barnowl-axis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reelyactive/barnowl-axis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fbarnowl-axis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fbarnowl-axis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fbarnowl-axis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fbarnowl-axis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reelyactive","download_url":"https://codeload.github.com/reelyactive/barnowl-axis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reelyactive%2Fbarnowl-axis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32075213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T02:38:07.213Z","status":"ssl_error","status_checked_at":"2026-04-21T02:38:06.559Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["axis-camera","barnowl","mqtt","object-analytics"],"created_at":"2024-12-13T09:08:35.884Z","updated_at":"2026-04-21T03:31:03.940Z","avatar_url":"https://github.com/reelyactive.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"barnowl-axis\n============\n\n__barnowl-axis__ converts [AXIS Object Analytics](https://www.axis.com/products/axis-object-analytics) messages from network cameras into standard developer-friendly JSON that is vendor/technology/application-agnostic.\n\n![Overview of barnowl-axis](https://reelyactive.github.io/barnowl-axis/images/overview.png)\n\n__barnowl-axis__ is a lightweight [Node.js package](https://www.npmjs.com/package/barnowl-axis) that can run on resource-constrained edge devices as well as on powerful cloud servers and anything in between.  It is included in reelyActive's [Pareto Anywhere](https://www.reelyactive.com/pareto/anywhere/) open source middleware suite, and can just as easily be run standalone behind a [barnowl](https://github.com/reelyactive/barnowl) instance, as detailed in the code examples below.\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__barnowl-axis__ will attempt to connect to a local MQTT server localhost (mqtt://localhost) and subscribe to the Object Analytics topic, outputting processed messages as JSON to the console.\n\n\nHello barnowl-axis!\n-------------------\n\nDeveloping an application directly from __barnowl-axis__?  Start by pasting the code below into a file called server.js:\n\n```javascript\nconst Barnowl = require('barnowl');\nconst BarnowlAxis = require('barnowl-axis');\n\nlet barnowl = new Barnowl({ enableMixing: true });\n\nbarnowl.addListener(BarnowlAxis, {}, BarnowlAxis.MqttListener,\n                    { url: \"mqtt://localhost\" });\n\nbarnowl.on('infrastructureMessage', (infrastructureMessage) =\u003e {\n  console.log(infrastructureMessage);\n  // Trigger your application logic here\n});\n```\n\nFrom the same folder as the server.js file, install package dependencies with the commands `npm install barnowl-axis` and `npm install barnowl`.  Then run the code with the command `node server.js` and observe infrastructureMessage objects output to the console:\n\n```javascript\n{\n  deviceId: \"b8a44f941234\",\n  deviceIdType: 2,\n  isMotionDetected: [ true ],\n  timestamp: 1645568542222\n}\n```\n\nSee the [Supported Listener Interfaces](#supported-listener-interfaces) below to adapt the code to listen for your network camera(s).\n\n\nSupported Listener Interfaces\n-----------------------------\n\nThe following listener interfaces are supported by __barnowl-axis__.  Extend the [Hello barnowl-axis!](#hello-barnowl-axis) example above by pasting in any of the code snippets below.\n\n### MQTT\n\nConnect to a MQTT server and subscribe to the Object Analytics topic to receive messages:\n\n```javascript\nlet options = { url: \"mqtt://localhost\", clientOptions: { username: \"user\",\n                                                          password: \"pass\" } }; \nbarnowl.addListener(BarnowlAxis, {}, BarnowlAxis.MqttListener, options);\n```\n\n### Test\n\nProvides periodic AXIS Object Analytics messages for testing purposes.\n\n```javascript\nbarnowl.addListener(BarnowlAxis, {}, BarnowlAxis.TestListener, {});\n```\n\nSupported AXIS Object Analytics scenarios\n-----------------------------------------\n\nThe following AXIS Object Analytics scenarios are supported:\n\n| Scenario           | Decoded property  | Required scenario name |\n|:-------------------|:------------------|:-----------------------|\n| Object in area     | isMotionDetected  | n/a                    |\n| Line crossing      | isMotionDetected  | n/a                    |\n| Time in area       | isMotionDetected  | n/a                    |\n| Crossline counting | passageCounts     | Crossline              |\n| Occupancy in area  | numberOfOccupants | Occupancy              |\n\nSee the [advlib Standard Properties](https://github.com/reelyactive/advlib/#standard-properties) for details of each decoded property.\n\n![AXIS Object Analytics scenarios](https://reelyactive.github.io/barnowl-axis/images/object-analytics-scenarios.png)\n\nNote that the Crossline counting scenario must be named _Crossline_ and the Occupancy in area scenario named _Occupancy_ in order for the corresponding messages to be decoded into `passageCounts` and `numberOfOccupants` properties, respectively.  The AXIS Object Analytics MQTT messages do not include a property to distinguish scenario type, and hence the user-defined name (included in the message as \"scenario\" property) is observed by __barnowl-axis__ to make this distinction.\n\n![Named AXIS Object Analytics scenarios](https://reelyactive.github.io/barnowl-axis/images/named-scenarios.png)\n\nThe other scenarios require no naming constraints.  The messages for the other scenarios simply include an \"active\" property which is interpreted by __barnowl-axis__ as `isMotionDetected`.  It is therefore possible for two such scenarios to simultaneously produce contradictory `isMotionDetected` outputs.\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) 2024 [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%2Fbarnowl-axis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freelyactive%2Fbarnowl-axis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freelyactive%2Fbarnowl-axis/lists"}