Details
-
Type:
Monitor
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: FIWARE-TECH-HELP
-
Labels:
Description
Created question in FIWARE Q/A platform on 12-03-2019 at 15:03
Please, ANSWER this question AT https://stackoverflow.com/questions/55124106/actives-do-it-perfectly-but-can%c2%b4t-interact-with-lazies-and-commands-from-the-bro
Question:
Actives do it perfectly but can´t interact with Lazies and Commands from the Broker
Description:
As for what I think "not answered question " in Fiware IotAgent: can't send command to a device, I tried to implement the example in https://fiware-iotagent-lwm2m.readthedocs.io/en/latest/deviceProvisioning/index.html but, I am not being able to interact with both Lazy and Command attributes from the Broker. I tried with Orion V1 and V2 querying both from Postman and .sh files and the error code below remains.
{
"errorCode":
}
The readings work just perfectly. Hence, I can see the updated active attributes values in Broker when running a series of SET > in the LwM2M client.js.
Both Fiware GEs (Agent and Broker) are running in the same VMWare Workstation/Fiware Instance.
Following I have the main configurations I am using and can share more details if needed. Any help will be more than welcome!
*1) docker-compose.yml *
version: '2'
services:
mongodb:
image: fiware/tutorials.tourguide-app.restaurant-data:20161011
hostname: mongodb
container_name: mongodb
ports:
- "27017:27017"
expose: - '27017'
command: --smallfiles
logging:
options:
max-size: 50m
orionunified:
image: fiware/orion:2.1.0
hostname: orionunified
container_name: orionunified
links: - mongodb
expose: - '1026'
ports: - 9014:1026
command: -dbhost mongodb
logging:
options:
max-size: 50m
idaslwm2m:
image: telefonicaiot/lightweightm2m-iotagent:latest
hostname: idaslwm2m
container_name: idaslwm2m
restart: on-failure
links: - orionunified
- mongodb:mongo
expose: - '5684'
- '4041'
ports: - 9008:4041
- 9009:5684
volumes: - ./configurations/IdasLWM2M/config.js:/opt/iota-lwm2m/config.js
logging:
options:
max-size: 50m
2) ./configurations/IdasLWM2M/config.js:/opt/iota-lwm2m/config.js EQUALS to lightweightm2m-iotagent/config.js
var config = {};
config.lwm2m = {
logLevel: 'DEBUG',
port: 5684,
defaultType: 'Robot',
ipProtocol: 'udp4',
serverProtocol: 'udp4',
delayedObservationTimeout: 50,
formats: [
,
,
,
{ name: 'application-vnd-oma-lwm2m/opaque', value: 1544 } ],
writeFormat: 'application-vnd-oma-lwm2m/text',
types: [ ]
};
config.ngsi = {
logLevel: 'DEBUG',
contextBroker:
,
server:
,
deviceRegistry:
,
mongodb:
,
types: { },
service: 'factory',
subservice: '/robots',
providerUrl: 'http://idaslwm2m:4041',
deviceRegistrationDuration: 'P1Y',
defaultType: 'Robot'
};
module.exports = config;
*3) Device created in Agent *
{
"count": 1,
"devices": [
{
"device_id": "robot1",
"service": "factory",
"service_path": "/robots",
"entity_name": "Robot:robot1",
"entity_type": "Robot",
"attributes": [
],
"lazy": [
],
"commands": [
],
"static_attributes": [],
"internal_attributes": {
"lwm2mResourceMapping": {
"Battery":
,
"Message":
,
"Position":
}
}
}
]
}
*4) Entity created in the Broker, with an updated Active attribute reading *
{
"contextResponses": [
{
"contextElement": {
"type": "Robot",
"isPattern": "false",
"id": "Robot:robot1",
"attributes": [
,
,
{ "name": "Position_status", "type": "commandStatus", "value": "UNKNOWN" } ]
},
"statusCode":
}
]
}
Activity
- All
- Comments
- History
- Activity
- Transitions
2019-03-12 18:05|CREATED monitor | # answers= 0, accepted answer= False