{"id":13506028,"url":"https://github.com/telefonicaid/lightweightm2m-iotagent","last_synced_at":"2025-04-19T12:09:43.436Z","repository":{"id":21983473,"uuid":"25308392","full_name":"telefonicaid/lightweightm2m-iotagent","owner":"telefonicaid","description":"IoT Agent accepting COAP requests. Designed to be a bridge between the OMA Lightweight M2M protocol and the NGSI interface.","archived":false,"fork":false,"pushed_at":"2024-01-15T11:43:28.000Z","size":963,"stargazers_count":24,"open_issues_count":37,"forks_count":30,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-01-17T10:12:16.629Z","etag":null,"topics":["fiware","iot","iot-agent"],"latest_commit_sha":null,"homepage":"https://fiware-iotagent-lwm2m.rtfd.io/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/telefonicaid.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES_NEXT_RELEASE","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":"docs/roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-10-16T15:23:06.000Z","updated_at":"2024-05-08T02:44:10.000Z","dependencies_parsed_at":"2023-01-12T03:46:21.253Z","dependency_job_id":"44c56e48-431b-4457-9632-e473f405f3f4","html_url":"https://github.com/telefonicaid/lightweightm2m-iotagent","commit_stats":{"total_commits":531,"total_committers":17,"mean_commits":"31.235294117647058","dds":0.7495291902071564,"last_synced_commit":"a9ce178efdc68c718a69297ae9ad60823898582a"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telefonicaid%2Flightweightm2m-iotagent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telefonicaid%2Flightweightm2m-iotagent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telefonicaid%2Flightweightm2m-iotagent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telefonicaid%2Flightweightm2m-iotagent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/telefonicaid","download_url":"https://codeload.github.com/telefonicaid/lightweightm2m-iotagent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235233243,"owners_count":18957066,"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":["fiware","iot","iot-agent"],"created_at":"2024-08-01T01:00:33.268Z","updated_at":"2025-01-23T06:16:27.440Z","avatar_url":"https://github.com/telefonicaid.png","language":"JavaScript","funding_links":[],"categories":["FIWARE Catalogue"],"sub_categories":["IoT Agents"],"readme":"# FIWARE IoT Agent for OMA LightWeight Machine2Machine\n\n[![FIWARE IoT Agents](https://nexus.lab.fiware.org/static/badges/chapters/iot-agents.svg)](https://www.fiware.org/developers/catalogue/)\n[![License: APGL](https://img.shields.io/github/license/telefonicaid/lightweightm2m-iotagent.svg)](https://opensource.org/licenses/AGPL-3.0)\n[![Support badge](https://img.shields.io/badge/tag-fiware+iot-orange.svg?logo=stackoverflow)](https://stackoverflow.com/questions/tagged/fiware+iot)\n\u003cbr\u003e\n[![Quay badge](https://img.shields.io/badge/quay.io-fiware%2Flightweightm2m--iotagent-grey?logo=red%20hat\u0026labelColor=EE0000)](https://quay.io/repository/fiware/lightweightm2m-iotagent)\n[![Docker badge](https://img.shields.io/badge/docker-telefonicaiot%2Flightweightm2m--iotagent-blue?logo=docker)](https://hub.docker.com/r/telefonicaiot/lightweightm2m-iotagent)\n\u003cbr\u003e\n[![Documentation badge](https://img.shields.io/readthedocs/fiware-iotagent-lwm2m.svg)](http://fiware-iotagent-lwm2m.readthedocs.io/en/latest/?badge=latest)\n[![CI](https://github.com/telefonicaid/lightweightm2m-iotagent/workflows/CI/badge.svg)](https://github.com/telefonicaid/lightweightm2m-iotagent/actions?query=workflow%3ACI)\n[![Coverage Status](https://coveralls.io/repos/github/telefonicaid/lightweightm2m-iotagent/badge.svg?branch=master)](https://coveralls.io/github/telefonicaid/lightweightm2m-iotagent?branch=master)\n![Status](https://nexus.lab.fiware.org/static/badges/statuses/iot-lightweightm2m.svg)\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4701/badge)](https://bestpractices.coreinfrastructure.org/projects/4701)\n\nThis Internet of Things Agent is designed to be a bridge between the [OMA](https://www.omaspecworks.org/)\n[Lightweight M2M](https://www.omaspecworks.org/what-is-oma-specworks/iot/lightweight-m2m-lwm2m/) protocol and the\n[NGSI](https://swagger.lab.fiware.org/?url=https://raw.githubusercontent.com/Fiware/specifications/master/OpenAPI/ngsiv2/ngsiv2-openapi.json)\ninterface of a context broker\n\nIt is based on the [FIWARE IoT Agent Node.js Library](https://github.com/telefonicaid/iotagent-node-lib). Further\ngeneral information about the FIWARE IoT Agents framework, its architecture and the common interaction model can be\nfound in this repository.\n\nThis project is part of [FIWARE](https://www.fiware.org/). For more information check the FIWARE Catalogue entry for the\n[IoT Agents](https://github.com/Fiware/catalogue/tree/master/iot-agents).\n\n| :books: [Documentation](https://fiware-iotagent-lwm2m.readthedocs.io) | :mortar_board: [Academy](https://fiware-academy.readthedocs.io/en/latest/iot-agents/idas) | \u003cimg style=\"height:1em\" src=\"https://quay.io/static/img/quay_favicon.png\"/\u003e [quay.io](https://quay.io/repository/fiware/lightweightm2m-iotagent)| :whale: [Docker Hub](https://hub.docker.com/r/telefonicaiot/lightweightm2m-iotagent/) | :dart: [Roadmap](https://github.com/telefonicaid/lightweightm2m-iotagent/blob/master/docs/roadmap.md) |\n| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- | --- |\n\n\n## Contents\n\n-   [Background](#background)\n-   [Install](#install)\n-   [Usage](#usage)\n-   [API](#api)\n-   [Contributing](#contributing)\n-   [Testing](#testing)\n-   [Roadmap](#roadmap)\n-   [License](#license)\n\n## Background\n\n### Description\n\nAn Internet of Things Agent is a component that lets groups of devices send their data to and be managed from a FIWARE\nNGSI Context Broker using their own native protocols. This project provides the IoT Agent for the Lightweight M2M\nprotocol, i.e. the bridge between OMA Lightweight M2M enabled devices and an NGSI Context Broker.\n\nFor more information on what an IoT Agent is or how it should work, please check the documentation on the\n[IoT Agent Node.js Library](https://iotagent-node-lib.readthedocs.io/).\n\nFor more information on [OMA Lightweight M2M](https://omaspecworks.org/what-is-oma-specworks/iot/) you can check the\n[Node.js OMA Lightweight M2M library](https://github.com/telefonicaid/lwm2m-node-lib) we are using.\n\nIf you just want to start using the agent, jump to the [Quick Start Guide](docs/userGuide.md#getting-started).\n\nYou will find some more general considerations about the LWM2M Mapping we are using in the following subsections.\n\n### Type configuration\n\nIn order to assign the proper configuration for each type of device, a mechanism to assign types to new arriving devices\nshould be used. This mechanism is based on Prefixes for the registrarion URL. For each type configured in the `lwm2m`\nconfiguration section in the `config.js` config file, a URL prefix has to be defined. Whenever a registration arrives to\na URL with that prefix, the device will be assigned the corresponding type.\n\n### Mappings\n\nOne of the features to provide through the IoT Agent is the mapping between the protocol specific names of the South\nPort traffic to the application-specific names in the North Port. In the case of Lightweight M2M, this means to map two\nthings:\n\n-   OMA Registry objects and resources from their URIs (e.g.: '') to their common names (e.g.: '').\n-   Custom device objects to the names defined by the user.\n\nIn order to accomplish this task, the agent supports:\n\n-   An aditional property `lwm2mResourceMapping` that lets the user configure names for to each of the particular\n    resources exposed by a device Type\n-   Two optional configuration file, `omaRegistry.json` containing the automatic mappings that will be applied in case\n    there are no custom mappings.\n\nCustom mappings defined by the user in the config.js file or by preprovisioning devices take precedence over any other\navailable mapping.\n\n### OMA Registry mapping\n\nThe IoT Agent provides a mean to map Lightweight M2M objects supported by the client without the need to map them in the\ntype or prevoprovision information. The mapping works as follows: whenever a device registration arrives to the IoT\nAgent **if there is no configured mapping for any of the objects supported by the decive** (that should appear in the\nregistration payload), then **all the resources supported by the object in the OMA Registry** are configured **as\npassive resources** offered by the object.\n\nThe OMA Registry information is read from two files: `omaRegistry.json` and `omaInverseRegistry.json`. This two files\ncan be generated with the last information in the OMA Registry with the command `bin/downloadOmaRegistry.js`. Notice\nthat the generated files **do not** have the same name than the original ones (so the result can be double-checked\nbefore changing them). In order to use the freshly downloaded ones, just remove the former and rename the latter.\n\n### Preprovisioning\n\nFor individual provisioning of devices, LWM2M devices can be preprovisioned to the server, sending all the required\ninformation to the IoT Agent Provisioning API. Preprovisioned devices should target the standard '/rd' URL instead of a\ntype URL. The preprovision configuration will be identified by the Endpoint name sent by the device.\n\n### A note about security\n\nIoT Agent security is still in development, so no Southbound or Northbound security mechanisms are provided. The NGSI\nContext Broker can be secured with a [PEP Proxy]() anyway, so the IoT Agent should be able to deal with token based\nsecurity. This mechanism is achieved with the use of Keystone Trust Tokens. For more information on how to use them,\nplease read the Security Section in [Node IoT Agent Library](https://github.com/telefonicaid/iotagent-node-lib).\n\n## Install\n\nInformation about how to install the OMA Lightweight M2M IoT Agent can be found at the corresponding section of the\n[Installation \u0026 Administration Guide](docs/administrationGuide.md).\n\nA `Dockerfile` is also available for your use - further information can be found [here](docker/README.md)\n\n## Usage\n\nInformation about how to use the IoT Agent can be found in the [User \u0026 Programmers Manual](docs/userGuide.md).\n\nThe following features are listed as [deprecated](docs/deprecated.md)\n\n## API\n\nApiary reference for the Configuration API can be found\n[here](https://telefonicaiotiotagents.docs.apiary.io/#reference/configuration-api). More information about IoT Agents\nand their APIs can be found in the IoT Agent Library [documentation](https://iotagent-node-lib.readthedocs.io/).\n\nThe latest OMA Lightweight M2M IoT Agent documentation is also available on\n[ReadtheDocs](https://fiware-iotagent-lwm2m.readthedocs.io/en/latest)\n\n## Contributing\n\nIf you'd like to contribute, start by searching through the issues and pull requests to see whether someone else has \nraised a similar idea or question.\n\nBefore contributing, please check out [contribution guidelines](docs/contribution.md)\n\n## Testing\n\n[Mocha](https://mochajs.org/) Test Runner + [Should.js](https://shouldjs.github.io/) Assertion Library.\nThe test environment is preconfigured to run BDD testing style.\nModule mocking during testing can be done with [proxyquire](https://github.com/thlorenz/proxyquire)\nTo run tests, type\n```console\nnpm test\n```\n\n## Roadmap\n\nThe roadmap of this FIWARE GE is described [here](docs/roadmap.md)\n\n## License\n\nThe IoT Agent for Lightweight Machine 2 Machine is licensed under\n[Affero General Public License (GPL) version 3](./LICENSE).\n\n© 2023 Telefonica Investigación y Desarrollo, S.A.U\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eFurther information on the use of the AGPL open source license\u003c/strong\u003e\u003c/summary\u003e\n  \n### Are there any legal issues with AGPL 3.0? Is it safe for me to use?\n\nThere is absolutely no problem in using a product licensed under AGPL 3.0. Issues with GPL (or AGPL) licenses are mostly\nrelated with the fact that different people assign different interpretations on the meaning of the term “derivate work”\nused in these licenses. Due to this, some people believe that there is a risk in just _using_ software under GPL or AGPL\nlicenses (even without _modifying_ it).\n\nFor the avoidance of doubt, the owners of this software licensed under an AGPL-3.0 license wish to make a clarifying\npublic statement as follows:\n\n\u003e Please note that software derived as a result of modifying the source code of this software in order to fix a bug or\n\u003e incorporate enhancements is considered a derivative work of the product. Software that merely uses or aggregates (i.e.\n\u003e links to) an otherwise unmodified version of existing software is not considered a derivative work, and therefore it\n\u003e does not need to be released as under the same license, or even released as open source.\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelefonicaid%2Flightweightm2m-iotagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftelefonicaid%2Flightweightm2m-iotagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelefonicaid%2Flightweightm2m-iotagent/lists"}