Open mohitNEC opened 1 year ago
Maybe @jason-fox could provide feedback on this.
The provisioning of the device is incorrect. On provisioning you stated:
"device_id": "sigApp1",
"entity_name": "urn:ngsi-ld:Device:sigApp1",
BUT
curl --location -g --request GET 'http://<Sigfox-IP>:17428/update?id=urn:ngsi-ld:Device:sigApp1&data={theCounter: 2, theparam1: 0,param2: 0,tempDegreesCelsius: 35,voltage: 3183}' \
--header 'fiware-service: dumbMordor' \
--header 'fiware-servicepath: /deserts' \
--header 'Content-Type: application/json' \
--data-raw ''
It looks like the IoT Agent is expecting to map device id=sigApp1
in the real world to URN urn:ngsi-ld:Device:sigApp
within the context broker. You are then sending a SigFox request with id=urn:ngsi-ld:Device:sigApp
which hasn't got a mapping key.
I assume:
curl --location -g --request GET 'http://<Sigfox-IP>:17428/update?id=sigApp1&data={theCounter: 2, theparam1: 0,param2: 0,tempDegreesCelsius: 35,voltage: 3183}' \
--header 'fiware-service: dumbMordor' \
--header 'fiware-servicepath: /deserts' \
--header 'Content-Type: application/json' \
--data-raw ''
Would work for you.
Hi @jason-fox ,
Thank You for the continuous support.
I have followed the same steps to provision device in Sigfox IoT Agent with entity_name same as device_id, like as:
curl --location --request POST 'http://<Sigfox-IoTAgent>:4041/iot/devices' \
--header 'fiware-service: dumbMordor' \
--header 'fiware-servicepath: /deserts' \
--header 'Content-Type: application/json' \
--data-raw '{
"devices": [
{
"device_id": "sigApp1",
"entity_name": "sigApp1",
"entity_type": "Device",
"protocol": "SIGFOX",
"timezone": "America/Santiago",
"attributes": [
{
"name": "time",
"type": "String"
},
{
"name": "statin",
"type": "String"
},
{
"name": "lng",
"type": "String"
},
{
"name": "lat",
"type": "String"
},
{
"name": "theCounter",
"type": "Integer"
},
{
"name": "theParam1",
"type": "Integer"
},
{
"name": "param2",
"type": "Integer"
},
{
"name": "tempDegreesCelsius",
"type": "Integer"
},
{
"name": "voltage",
"type": "Integer"
}
],
"lazy": [],
"static_attributes": [],
"commands": [],
"internal_attributes": [
{
"mapping": "theCounter::uint:32 theParam1::uint:32 param2::uint:8 tempDegreesCelsius::uint:8 voltage::uint:16"
}
]
}
]
}'
After that, when I try to send measures using the following GET callback that you suggested:
curl --location -g --request GET 'http://<Sigfox-IoTAgent>:17428/update?id=sigApp1&data={theCounter: 2, theparam1: 0,param2: 0,tempDegreesCelsius: 35,voltage: 3183}' \
--header 'fiware-service: dumbMordor' \
--header 'fiware-servicepath: /deserts' \
--header 'Content-Type: application/json'
Still I'm getting the same error as :
{
"name": "DEVICE_NOT_FOUND",
"message": "No device was found with id:sigApp1",
"code": 404
}
I think
"device_id": "sigApp1",
"entity_name": "urn:ngsi-ld:Device:sigApp1",
With http://<Sigfox-IoTAgent>:17428/update?id=sigApp1&data={theCounter: 2, theparam1: 0,param2: 0,tempDegreesCelsius: 35,voltage: 3183}
is more likely to work -- entities within Scorpio should be urns.
Hi, Still getting the same error.
Hi, Any update regarding this issue. We are still getting the same issue.
BR, Mohit Chauhan
Hi, Is there any update regarding this issue?
Best Regards, Mohit Chauhan
Hi, Is there any update regarding this issue?
Hi, Is there any update regarding this issue. We are still getting the same error.
Maybe @jason-fox could provide some feedback on this?
I'm not actively working with the SigFox protocol.
Hi,
I'm trying to integrate Scorpio Broker with FIWARE IoT Agent for Sigfox Protocol. In the device provisioning the NGSI-LD entity is created successfully. But when I am trying to send measurements to the Sigfox IoT Agent it is showing error. Firstly, I register the service and the device to the agent. As you can see from below:
Service Provisioning:
Device Provisioning:
After that, the NGSI-LD entity in Scorpio Broker is:
After follow these steps, when I try to send measures using the following GET callback:
RESPONSE:
Sigfox IoT Agent Logs:
Same issue has been raised before with Orion-v2. Can anyone help me sending measure to the IoT Agent Sigfox?
Thanks.