{"id":22868516,"url":"https://github.com/datavenueliveobjects/fifo_sdk_liveobjects","last_synced_at":"2025-08-27T04:03:38.340Z","repository":{"id":50879266,"uuid":"306646934","full_name":"DatavenueLiveObjects/FIFO_SDK_LiveObjects","owner":"DatavenueLiveObjects","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-06T18:08:51.000Z","size":151,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T19:21:06.223Z","etag":null,"topics":["iot","liveobjects","mqtt","orange"],"latest_commit_sha":null,"homepage":"https://liveobjects.orange-business.com/","language":"Java","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/DatavenueLiveObjects.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":"2020-10-23T13:34:35.000Z","updated_at":"2025-06-06T18:08:52.000Z","dependencies_parsed_at":"2024-03-07T07:39:46.938Z","dependency_job_id":null,"html_url":"https://github.com/DatavenueLiveObjects/FIFO_SDK_LiveObjects","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/DatavenueLiveObjects/FIFO_SDK_LiveObjects","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DatavenueLiveObjects%2FFIFO_SDK_LiveObjects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DatavenueLiveObjects%2FFIFO_SDK_LiveObjects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DatavenueLiveObjects%2FFIFO_SDK_LiveObjects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DatavenueLiveObjects%2FFIFO_SDK_LiveObjects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DatavenueLiveObjects","download_url":"https://codeload.github.com/DatavenueLiveObjects/FIFO_SDK_LiveObjects/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DatavenueLiveObjects%2FFIFO_SDK_LiveObjects/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272288869,"owners_count":24907762,"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","status":"online","status_checked_at":"2025-08-27T02:00:09.397Z","response_time":76,"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":["iot","liveobjects","mqtt","orange"],"created_at":"2024-12-13T12:35:38.203Z","updated_at":"2025-08-27T04:03:38.251Z","avatar_url":"https://github.com/DatavenueLiveObjects.png","language":"Java","readme":"## Table of contents\n* [General info](#general-info)\n* [Technologies](#technologies)\n* [Requirements](#requirements)\n* [Build](#build)\n* [Examples](#examples)\n\n## General info\nThis repository contains everything you need to create a connection between your application and Live Objects. This project is intended for Live Objects users who want to explore integration patterns of device and message data synchronization. When you want to download device data and messages from Live Objects to your application, you can use this library.\n\nMain features are:\n* retrieving data about devices\n* retrieving data about groups\n* subscribe and retrieving data from FIFO queues\n\n## Technologies and libraries\n* Java 21\n* Spring Web 6.1.4\n* Eclipse Paho Client Mqttv3 1.2.5\n* Jackson Databind 2.16.1\n* Apache HttpClient 5.3.1\n* SLF4J API Module 2.0.12\n\n## Requirements\nIn order to use the x-connector-library you need to have:\n* **Live Objects account with API key** (API key generation is described in the [user guide](https://liveobjects.orange-business.com/cms/app/uploads/EN_User-guide-Live-Objects-4.pdf#%5B%7B%22num%22%3A190%2C%22gen%22%3A0%7D%2C%7B%22name%22%3A%22XYZ%22%7D%2C68%2C574%2C0%5D)),\n* **Java SE Development Kit 21 installed**\n* **Apache Maven installed**\n\n## Build\nIf you want to build library, please first clone this repository, then:  \n```\nmvn clean package\n```\nThe jar file built in this way should be attached to the project as a library. \n\n## Examples\n\n#### Creating an LOApiClient\nTo create an `LOApiClient` instance and create a connection to Live Objects, you must create an `LOApiClientParameters` instance and pass it to `LOApiClient` constructor:\n```java\nLOApiClientParameters parameters = LOApiClientParameters.builder()\n        .apiKey(\"abcDEfgH123I\")\n        .build();\nLOApiClient client = new LOApiClient(parameters);\n```\nNote that an API key is required. If you do not set the hostname, the default one will be used (liveobjects.orange-business.com).\n\n#### Retrieving data about devices\n`LOApiClient` allows retrieve data about a single device or list of devices. To retrieve the data about devices from Live Objects, you can use the sample code:\n\nGetting device inventory client:\n```java\nDeviceManagement deviceManagement = client.getDeviceManagement();\nInventory inventory = deviceManagement.getInventory();\n```\nRetrieving data of a single device:\n```java\nDevice device = inventory.getDevice(\"urn:lo:nsid:mqtt:device-id\");\n```\nRetrieving data about the list of devices:\n```java\nGetDevicesFilter getDevicesFilter = new GetDevicesFilter().withOffset(0)\n        .withLimit(10);\nList\u003cDevice\u003e devices = inventory.getDevices(getDevicesFilter)\n```\n\n#### Retrieving data about groups\n`LOApiClient` allows retrieve data about a single group or list of group. To retrieve the data about groups from Live Objects, you can use the sample code:\n\nGetting groups client:\n```java\nDeviceManagement deviceManagement = client.getDeviceManagement();\nGroups groups = deviceManagement.getGroups();\n```\nRetrieving data of a single group:\n```java\nGroup root = groups.getGroup(\"root\");\n```\nRetrieving data about the list of groups:\n```java\nGetGroupsFilter getGroupsFilter = new GetGroupsFilter().withOffset(0)\n        .withLimit(10);\nList\u003cGroup\u003e groupsList = groups.getGroups(getGroupsFilter);\n```\n\n#### Retrieving data about commands\n`LOApiClient` allows retrieve data about a single command or list of commands. To retrieve the data about commands from Live Objects, you can use the sample code:\n\nGetting commands client:\n```java\nDeviceManagement deviceManagement = client.getDeviceManagement();\nCommands commands = deviceManagement.getCommands();\n```\nRetrieving data of a single command:\n```java\nCommand command = commands.getCommand(\"commandId\");\n```\nRetrieving data about the list of commands:\n```java\nGetCommandsFilter getCommandsFilter = new GetCommandsFilter().withOffset(0)\n        .withLimit(20);\nList\u003cCommand\u003e commands = commands.getCommands(\"deviceId\", getCommandsFilter);\n```\n\n#### Subscribing and retrieving data from FIFO queues\n`LOApiClient` allows retrieve data from fifo queues.\n\nIn order to receive all messages from your queue, you should implement your own message handling class implementing `DataManagementMqttCallback`:\n```java\npublic class MyDataManagementFifoCallback implements DataManagementFifoCallback {\n    @Override\n    public void onMessage(String message) {\n\n    }\n}\n```\nThen in the configuration you should set the list of queues and use the `DataManagementMqttCallback` implementation:\n```java\nList\u003cString\u003e queuesList = Arrays.asList(\"queue-1\", \"queue-2\", \"queue-n\");\nLOApiClientParameters parameters = LOApiClientParameters.builder()\n        .apiKey(\"abcDEfgH123I\")\n        .topics(queuesList)\n        .dataManagementFifoCallback(new MyDataManagementFifoCallback())\n        .build();\nLOApiClient client = new LOApiClient(parameters);\n```\nTo start retrieving message, you should use subscribe method:\n```java\nDataManagementFifo dataManagementFifo = client.getDataManagementFifo);\ndataManagementFifo.connectAndSubscribe();\n```\n\nTo stop retrieving messages, you should use disconnect method:\n```java\ndataManagementFifo.disconnect();\n```\n\n#### External connector mode connection\n`LOApiClient` allows to create the external connector mode connection with Live Objects.\n\nYou can use the sample code to open the connection:\n```java\nDataManagementExtConnector dataManagementExtConnector = client.getDataManagementExtConnector();\ndataManagementExtConnector.connect();\n```\n\nNodeStatus publication allows to set the ONLINE/OFFLINE status of the device and its capacity to receive or not command requests. To send the NodeStatus to Live Objects, you can use the sample code:\n```\nNodeStatus nodeStatus = new NodeStatus();\nnodeStatus.setStatus(Status.ONLINE);\nnodeStatus.setCapabilities(new NodeStatus.Capabilities(true));\ndataManagementExtConnector.sendStatus(exConnectorNodeId, nodeStatus);\n```\n\nDataMessage publication allows to send a DataMessage on behalf of a specific device. To send DataMessage to Live Objects, you can use the sample code:\n```\nValue payload = new Value(\"payload value\");\nDataMessage dataMessage = new DataMessage();\ndataMessage.setValue(payload);\ndataManagementExtConnector.sendMessage(exConnectorNodeId, dataMessage);\n```\nThe data messages sent to the Live Objects platform can be encoded in a customer specific format. For instance, the payload may be a string containing an hexadecimal value or a csv value. In order to use the decoding capability of LiveObjects, a DataMessage must contains additional `value.payload` and `metadata.encoding` fields. To send encoded DataMessage to Live Objects, you can use the sample code:\n```\nValue value = new Value(\"15;25\");\nMetadata metadata = new Metadata(\"test_csv\");\nDataMessage dataMessage = new DataMessage();\ndataMessage.setValue(value);\ndataMessage.setMetadata(metadata);\ndataManagementExtConnector.sendMessage(exConnectorNodeId, dataMessage);\n```\nFor more information on decoding, see the [user guide](https://liveobjects.orange-business.com/doc/html/lo_manual_v2.html#DEC).\n\nIn order to receive all command requests targeting your devices, you should implement your own message handling class implementing `DataManagementExtConnectorCommandCallback`:\n```\npublic class MyDataManagementExtConnectorCommandCallback implements DataManagementExtConnectorCommandCallback {\n    @Override\n    public Object onCommandRequest(CommandRequest commandRequest) {\n        return null;\n    }\n}\n```\nIf acknowledgement mode isn't set to `NONE`, the object returned by `onMessage` method will be used as value of response field inside command response. In this case the command response will be published automatically. If you do not wish to publish the response here, return `null` and the response will not be published.  \nIf you want to publish the command response yourself, you can use the following code:\n\n```\nCommandResponse commandResponse = new CommandResponse(commandRequest.getId(), commandRequest.getNodeId());\ncommandResponse.setResponse(yourResponse);\ndataManagementExtConnector.sendCommandResponse(commandResponse);\n```\n\nUse that prepared `DataManagementExtConnectorCommandCallback` to create an `LOApiClient`:\n```\nLOApiClientParameters parameters = LOApiClientParameters.builder()\n        .apiKey(\"abcDEfgH123I\")\n        .dataManagementExtConnectorCommandCallback(new MyDataManagementExtConnectorCommandCallback())\n        .build();\nLOApiClient client = new LOApiClient(parameters);\n```\n\nTo close the connection, you should use disconnect method:\n```\ndataManagementExtConnector.disconnect();\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatavenueliveobjects%2Ffifo_sdk_liveobjects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatavenueliveobjects%2Ffifo_sdk_liveobjects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatavenueliveobjects%2Ffifo_sdk_liveobjects/lists"}