FIWARE - IDAS: Issue with create new a device OMA-LWM2M - iot

I am really new in IDAS field.
I want to create new device as the following instruction (http://docs.telefonicaiotiotagents.apiary.io/#reference/configuration-api/devices/create-a-device)
but i have got the error with description as follow:
{
"name": "Error",
"message": "getaddrinfo ENOTFOUND"
}
Environment: FIWARE - IDAS using OMA-LWM2M agent with Coap protocol.
I don't know what i should do in this case?

Related

How to add dynamic container in storage account [duplicate]

Using Logic Apps I am trying to copy blobs from one container into several separate dynamically created containers however there doesn't appear to be a "create container" action in Logic Apps.
I have tried using the "Create Blob" action with the desired container name specified as part of the "Blob Name" parameter however this fails with a 404 message.
{
"status": 404,
"message": "Specified container telemetery-30dfb0bd-73b0-42a3-8677-63bde2fd4b43 does not exist.\r\nclientRequestId: blahblahh-e60e-44e1-aec4-c32a21659257",
"error": {
"message": "Specified container telemetery-30dfb0bd-73b0-42a3-8677-63bde2fd4b43 does not exist."
},
"source": "blahblha-ne.azconn-ne-01.p.azurewebsites.net"
}
The original request is -
{
"method": "post",
"queries": {
"folderPath": "/",
"name": "/telemetery-30dfb0bd-73b0-42a3-8677-63bde2fd4b43/timeline,xml",
"queryParametersSingleEncoded": "True"
},
"path": "/datasets/default/files",
"host": {
"connection": {
"name": "/subscriptions/blahblah-6866-4c8c-b3f1-41039ad2b3eb/resourceGroups/RG-blahblahg/providers/Microsoft.Web/connections/azureblob"
}
},
"body": "file content"
}
IS there a way to create a blob container us Logic Apps?
According to the documentation, there's no "create container" operation:
https://learn.microsoft.com/en-us/connectors/azureblobconnector/
What you can do is write an Azure Function and chain it as part of your workflow in order to create the container:
https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-dotnet#create-a-container
For now there is no action to create blob container, you could implement it with azure function like Thiago proposed. Suppose you could use the rest api to do it. The below test use the sas token to do it you could try other authorize way.

FIWARE Metadata in IoTAgent

I try to set up a TTN based LoRaWAN Monitoring of my Gateways and devices inside a FIWARE-Environment. Therefore it would be essential to access data not in payload_field of the MQTT-Broker of TTN.
I wonder if it is possible to access field like counter, port, app_id and metadata.
I did not find a possibility yet. Does any of you face the same problem and got a solution to this challenge?
I use the following relevant FIWARE-components in a docker environment:
fiware/orion:2.2.0
fiware/iotagent-lorawan:1.2.3
mongo:3.6.8
If you need to receive metadata directly from LoRaWAN, you will have to customize the code within the LoRaWAN IoT Agent - this just passes measures by default, but the IoT Agent node lib interface is capable of receiving metadata as well.
Alternatively a recent PR Request for the IoT Agent node lib allows for additional static metadata to be added during the provisioning stage and sent as part of the requests to the context broker. You would need to use the latest development code base as the library hasn't been ported to the LoRaWAN IoT Agent yet - amend the iotagent-node-lib dependency in the package.json as shown:
"dependencies": {
...
"iotagent-node-lib": "git://github.com/telefonicaid/iotagent-node-lib.git#master",
...
},
... etc
The documentation can be found here
Attributes with metadata are provisioned with an additional parameter as shown:
"attributes": [
{"object_id": "s", "name": "state", "type":"Text"},
{"object_id": "l", "name": "luminosity", "type":"Integer",
"metadata":{
"unitCode":{"type": "Text", "value" :"CAL"}
}
}

Push own id. Confluent kafka connect elasticsearch docker

I'm using confluentinc/cp-kafka-connect docker image.
I'm trying to send JSON file to kafka, with elasticsearch id.
{"_id":10000725, "_source": {"createdByIdentity":"tu_adminn","createdBy":"Admin Testuser"}}
here is my connector
{
"name": "test-connector",
"config": {
"connector.class": "io.confluent.connect.elasticsearch.ElasticsearchSinkConnector",
"tasks.max": "1",
"topics": "andrii",
"key.ignore": "false",
"schema.ignore": "true",
"connection.url": "http://elasticsearch:9200",
"type.name": "test-type",
"name": "elasticsearch-sink"
}
}
When i'm using key.ignore = true it's generates some weird id.
How can i pass exactly my id and source?
Per the docs:
If you specify key.ignore=true then Kafka Connect will use a composite key of your message's kafka topic, partition, and offset -- this is the "weird id" that you're seeing.
If you want to use your own ID for the created Elasticsearch document, you can set key.ignore=false and Kafka Connect will use the key of the Kafka message as the ID.
If your Kafka message does not have the appropriate key for what you want to do, you will need to set it. One option is to use something like KSQL:
CREATE STREAM target AS SELECT * FROM source PARTITION BY _id
Disclaimer: I work for Confluent, the company behind the open-source KSQL project

How to send a device management request using NodeRed or any REST client

I am trying to sent a DM firmware update command from a NodeRed Flow.
Function node:
msg.payload = {"MgmtInitiationRequest": {
"action":"firmware/update",
"devices": [{
"typeId": "myType",
"deviceId": "myDevice"
}]
}}
msg.headers={"Content-Type":"application/json"}
return msg;
I send it to a http request node with a POST to
https://orgid.internetofthings.ibmcloud.com/api/v0002/mgmt/requests
Basic Authentication with api keys. I based it of Initiate a device management request
I get back a 403 which the docs have as:
One or more of the devices does not support the requested action
Anyone see what I'm missing? It works fine from the IoT Platform UI to the same devicetype/deviceid.
EDIT: Same 403 if I use a Rest client like Postman.
The swagger API documentation is a little bit misleading in that the 'body' parameter is given a name.
But, like the other POST APIs, that name isn't actually included anywhere as part of the payload.
The payload should just look like this:
{
"action": "firmware/update",
"devices": [
{
"typeId": "string",
"deviceId": "string"
}
]
}
This page in the documentation provides more detail:
https://console.ng.bluemix.net/docs/services/IoT/devices/device_mgmt/requests.html#firmware-actions-update
Has your appliance published the set of supported commands it supports when it announced itself as a managed device?
A device connects to the Watson IoT Platform and uses the managed devices operation to become a managed device.
Which looks something like this
Topic: iotdevice-1/mgmt/manage
{
...
"supports": {
"deviceActions": true,
"firmwareActions": boolean
},
...
},
...
}
https://console.ng.bluemix.net/docs/services/IoT/devices/device_mgmt/index.html

Unable to update organization properties

I've encountered a problem while trying to update organization's properties using Microsoft Graph API. I've followed these docs and tried it in graph explorer.
My request looks like this:
{ "displayName": "My Company Name" }
Whatever I do I always get the following error:
"error": {
"code": "Request_BadRequest",
"message": "Specified HTTP method is not allowed for the request target.",
"innerError": {
"request-id": "dfd9ae19-2774-4b10-8d74-f6f6cd21f712",
"date": "2016-05-16T14:48:02"
}
}
What am I doing wrong?
I have tried in my test tenant and results in the same error.
https://graph.microsoft.io/en-us/docs/api-reference/v1.0/resources/organization
In the above document it is mentioned that we can update "marketingNotificationMails" and "technicalNotificationMails" properties alone through Update API. So I think you can't update the organization display name.
It does appear as though updates are limited on the organization entity. Please file a request to Uservoice to ask for this feature.

Resources