8000 Can’t[Provisioning a Sensor] · Issue #6 · FIWARE/tutorials.Custom-IoT-Agent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Can’t[Provisioning a Sensor] #6
Open
@hsakamoto123

Description

@hsakamoto123

Provisioning a Sensor
3️⃣ Request:
will result in the following error:
Please tell me how to avoid it.

$ curl -iX POST \
>   'http://localhost:4041/iot/devices' \
>   -H 'Content-Type: application/json' \
>   -H 'fiware-service: openiot' \
>   -H 'fiware-servicepath: /' \
>   -d '{
>  "devices": [
>    {
>      "device_id":   "motion001",
>      "entity_name": "urn:ngsi-ld:Motion:001",
>      "entity_type": "Motion",
>      "timezone":    "Europe/Berlin",
>      "attributes": [
>        { "object_id": "c", "name": "count", "type": "Integer" }
>      ],
>      "static_attributes": [
>        { "name":"refStore", "type": "Relationship", "value": "urn:ngsi-ld:Store:001"}
>      ]
>    }
>  ]
> }
> '
HTTP/1.1 500 Internal Server Error
X-Powered-By: Express
Fiware-Correlator: 463d0a57-1870-48c2-b709-d14766ea674f
Content-Type: application/json; charset=utf-8
Content-Length: 83
ETag: W/"53-yJOco57zUHHICXOIMQuA66DVpBQ"
Date: Thu, 12 Jan 2023 15:35:41 GMT
Connection: keep-alive
Keep-Alive: timeout=5

{"name":"TypeError","message":"Cannot read properties of undefined (reading 'id')"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0