cumulocity

setting c8y_Command result String from Java

淺唱寂寞╮ 提交于 2020-01-06 02:20:19
问题 I am trying to implement the c8y_Command (Shell) OperationType in the java-agent. I got to the point where I can run the command on the device, I can also set the OperationStatus but I did not find the way to send back the result (command output) string. http://www.cumulocity.com/guides/reference/device-management/ says: To communicate the results of a particular command, the device adds a property "result": "c8y_Command": { "text": "get uboot.sn", "result": "165711141901401" } if this is how

Connecting Raspberry Pi with cumulocity

[亡魂溺海] 提交于 2019-12-25 08:19:12
问题 I've registered my Raspberry Pi device with Cumulocity. Now I just wanted to switch on/off LED which is connected with Pi through Cumulocity. Is it possible and if so how to proceed? 回答1: I would propose to use the operation c8y_Relay (http://cumulocity.com/guides/reference/sensor-library/) because it is basically this on(off logic and there are already widgets in the UI to trigger the operation (Can be added to dashboards). On the device side you would first need to add c8y_Relay to the

Can't connect to cumulocity using trial account

二次信任 提交于 2019-12-24 07:16:13
问题 I've added 2 accounts to MQTTBox, one is a trial account the other is not. With the trial account i fail to connect to cumulocity. Here's my config: MQTTBox config I've also tried setting Username as nur.eu-latest/nuno.rodrigues@together.pt Why can't i connect with the trial account? Thank you. 回答1: The prefix in your domain (nur) is not necessarily the ID of your tenant (that depends on the Cumulocity installation and the way your tenant was generated). MQTT always requires the actual ID of

Cumulocity - CumulocityLongPollingTransport Idle

戏子无情 提交于 2019-12-24 06:36:06
问题 I'm using the 7.40.0 Cumulocity Java Client SDK to subscribe to real-time notifications. I'm able to get notifications but after leaving the client running for a while, it seems to stop listening and I'm no longer able to retrieve notifications. Has anyone encountered this scenario? WARN 2017-01-03 08:44:49,727 [CumulocityLongPollingTransport-scheduler-0] com.cumulocity.sdk.client.notification.ConnectionHeartBeatWatcher: canceling the long poll request because of inactivity DEBUG 2017-01-03

How to handle $ctrl. in AngularJS?

房东的猫 提交于 2019-12-22 08:30:15
问题 I have a Methode from an API. It returns a promise which resolves to an $ctrl(?) object. This objects should contain a measurement and will be updated whenever it receive a new data. getMeasurements.latest(filter) //only a object to filter through all measurements .then(function (latestMeasurement) { $ctrl.latestMeasurement = latestMeasurement; }); My problem is that I don't know how to work with this data or display it in my html file. How does $ctrl work? Here the documentation of the API

How to handle $ctrl. in AngularJS?

谁都会走 提交于 2019-12-22 08:29:26
问题 I have a Methode from an API. It returns a promise which resolves to an $ctrl(?) object. This objects should contain a measurement and will be updated whenever it receive a new data. getMeasurements.latest(filter) //only a object to filter through all measurements .then(function (latestMeasurement) { $ctrl.latestMeasurement = latestMeasurement; }); My problem is that I don't know how to work with this data or display it in my html file. How does $ctrl work? Here the documentation of the API

How to get supported measurements of a device in Cumulocity?

五迷三道 提交于 2019-12-13 06:36:11
问题 When using a simulated device you can get its supported measurements (i.e. fragmentTypes) from the "c8y_SupportedMeasurements" field which for example for a temperature sensor looks as follows: c8y_SupportedMeasurements: [ "c8y_TemperatureMeasurement" ] When using a real device this field is not available. I can see the possible fragmentTypes when fetching the fetching the measurements for that particular device /measurement/measurements?source=id which gives me a list of measurements for the

Is it possible to lose events when using long-polling to retrieve real time notifications?

会有一股神秘感。 提交于 2019-12-12 02:56:22
问题 When subscribing to real-time notifications, I go through the normal handshake, subscribe, connect flow. Once the connection returns with events, I reconnect and wait for the next response to return. My question is: If events are generated the first response and the next reconnect, could they be lost? As an example: A synchronous application which processes returned response data after it returns and only reconnects once the data processing has finished could cause a significant delay between

How to invoke a custom POST REST API using Zapier for Cumulocity?

荒凉一梦 提交于 2019-12-11 16:16:40
问题 I have gone through Zapier and Cumulocity's Real time messaging concepts and Smart rules etc. Though this is a mix of theoretical and little implementation but I am still bit confused before actually trying out all possible options because of a time constraint at my part . Can someone give me a complete example on how to invoke a custome webhook using Zapier when my Smart rule is triggered as mentioned here ? 来源: https://stackoverflow.com/questions/48876012/how-to-invoke-a-custom-post-rest

Subcribe a channel / real-time notification

▼魔方 西西 提交于 2019-12-11 11:57:39
问题 Question about real-time notification.. Post: https://xxxiot.cumulocity.com/cep/realtime Body: [ { "channel": "/meta/handshake", "version": "1.0", "mininumVersion": "1.0beta", "supportedConnectionTypes": ["long-polling","callback-polling"], "advice":{"timeout":120000,"interval":30000} } ] My Response: [ { "minimumVersion": "1.0", "supportedConnectionTypes": [ "smartrest-long-polling", "long-polling" ], "successful": true, "channel": "/meta/handshake", "ext": { "ack": true }, "clientId":