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

Device not found #24

Open
kapsali29 opened this issue Mar 16, 2018 · 1 comment
Open

Device not found #24

kapsali29 opened this issue Mar 16, 2018 · 1 comment

Comments

@kapsali29
Copy link

kapsali29 commented Mar 16, 2018

Hi,

I am trying to send measurements to the sigfox iotagent. Firstly i register the service and the device to the agent. As you can see from bellow:

Service Provisioning

POST /iot/services/ HTTP/1.1

fiware-service: dumbMordor
fiware-servicepath: /deserts
Content-Type: application/json
{
  "services": [
    {
      "resource": "/sigfoxDev",
      "apikey": "23HJK3Y9090DSFL173209HV8801232",
      "type": "SIGFOX",
      "commands": [],
      "lazy": [],
      "active": []
    }
  ]
}

Device Provisioning

POST /iot/devices/ HTTP/1.1
fiware-service: dumbMordor
fiware-servicepath: /deserts
Content-Type: application/json

{
  "devices": [
    {
      "device_id": "sigApp2",
      "protocol": "SIGFOX",
      "entity_name": "sigApp2",
      "entity_type": "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 those steps, i try to send measures using the following GET callback

GET /update?id=sigApp3&data={theCounter: 2, theparam1: 0,param2: 0,tempDegreesCelsius: 35,voltage: 3183} HTTP/1.1

fiware-service: orion-dumbmordor
fiware-servicepath: /deserts
Cache-Control: no-cache

And the response i get is,

{
"name": "DEVICE_NOT_FOUND",
"message": "No device was found with id:sigApp3",
"code": 404
}

I checked the record in mongo, and the device id is sigApp3 also i checked the agent logs and again nothing...

@AlvaroVega
Copy link
Member

AlvaroVega commented May 7, 2018

fiware-service should be dumbMordor not orion-dumbMordor.
Did you tried again?

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