Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
Description
Created question in FIWARE Q/A platform on 05-11-2020 at 00:11
Please, ANSWER this question AT https://stackoverflow.com/questions/64689177/fiware-actuator-sensor-on-off-pattern-with-status
Question:
Fiware Actuator/Sensor On Off pattern with status
Description:
My configuration includes orion, IoT Agent JSON, and mongoDB.
I want to build a Fiware Lamp actuator and I want to have is on/off status (as sensor) as well.
At the moment I use a PATCH request with body (form ORION) :
At First with on command:
{
"on":
}
And then with off command:
{
"off":
}
When I receive anything from the above, I respond from the dummy device with 200 OK.
The above in my configuration makes both the on and off tags as pending:
{
"id": "urn:ngsi-ld:Lamp:001",
"type": "Lamp",
"TimeInstant": "2020-11-04T22:42:37.00Z",
"category": [
"actuator",
"sensor"
],
"controlledProperty": "lamp",
"function": [
"onOff",
"sensing"
],
"off_info": " ",
"off_status": "PENDING",
"on_info": " ",
"on_status": "PENDING",
"refStore": "urn:ngsi-ld:Store:001",
"state": " ",
"supportedProtocol": [
"JSON"
],
"supportedUnits": "My Unit 2",
"on": "",
"off": ""
}
I guess that I miss something in the way, so is there any response that I have to sent back to IoT Agent json to to make one of the two tags to stop be pending? Must I Update State or Info along the way?
P.S I expected to have a reply like this:
{
"id": "urn:ngsi-ld:Lamp:001",
"type": "Lamp",
"TimeInstant": "2020-11-04T22:42:37.00Z",
"category": [
"actuator",
"sensor"
],
"controlledProperty": "lamp",
"function": [
"onOff",
"sensing"
],
"off_info": " ",
"off_status": "PENDING",
"on_info": " ",
"on_status": "OFF",
"refStore": "urn:ngsi-ld:Store:001",
"state": " ",
"supportedProtocol": [
"JSON"
],
"supportedUnits": "My Unit 2",
"on": "",
"off": ""
}
Activity
- All
- Comments
- History
- Activity
- Transitions
2020-11-11 12:51|CREATED monitor | # answers= 1, accepted answer= True