Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad request when provisioning actuator #12

Closed
floufen opened this issue Jul 3, 2019 · 1 comment
Closed

Bad request when provisioning actuator #12

floufen opened this issue Jul 3, 2019 · 1 comment

Comments

@floufen
Copy link

floufen commented Jul 3, 2019

I am following the tutorial as it is without any change.

When provisioning an actuator :

curl -iX POST \
  'http://localhost:4041/iot/devices' \
  -H 'Content-Type: application/json' \
  -H 'fiware-service: openiot' \
  -H 'fiware-servicepath: /' \
  -d '{
  "devices": [
    {
      "device_id": "bell001",
      "entity_name": "urn:ngsi-ld:Bell:001",
      "entity_type": "Bell",
      "protocol": "PDI-IoTA-UltraLight",
      "transport": "MQTT",
      "commands": [
        { "name": "ring", "type": "command" }
       ],
       "static_attributes": [
         {"name":"refStore", "type": "Relationship","value": "urn:ngsi-ld:Store:001"}
      ]
    }
  ]
}
'

I get this error message:

{
    "message": "Request error connecting to the Context Broker: {\"code\":\"400\",\"reasonPhrase\":\"Bad Request\",\"details\":\"JSON Parse Error: unknown field: /contextRegistrations/contextRegistration/attributes/attribute/isDomain\"}",
    "name": "BAD_REQUEST"
}

Here is the iot-agent about json response :

docker run --network fiware_default --rm appropriate/curl -s \
 -X GET 'http://iot-agent:4041/iot/about'
{"libVersion":"2.6.0","port":"4041","baseRoot":"/","version":"1.6.0"}
@jason-fox
Copy link
Member

jason-fox commented Jul 18, 2019

This is tangentially related to #8 - the docker-compose. This tutorial does not currently use the latest version of the IoT Agent as the functionality changed. At some point a breaking change has also been added to Orion so that that needs to be pinned as well. Orion had not been pinned correctly - see 52b326d

In summary, when provisioning the devices either use:

  • Orion 2.2.0 and IoT Agent 1.9.0 and add default "resource": "/iot/d" *
  • Orion 2.0.0 and IoT Agent 1.7.0 and add "resource": ""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants