Atos-Research-and-Innovation / IoTagent-LoRaWAN

FIWARE IoT Agent for LoRaWAN protocol (with CayenneLpp and CBOR data models)
https://fiware-lorawan.readthedocs.io/en/latest/
Other
34 stars 40 forks source link

Modify Services #57

Closed abrahamSecmotic closed 5 years ago

abrahamSecmotic commented 5 years ago

Hi,

When I try to modify a service, I receive a error 500, "Could not assign a new type or service to the LoRaWAN Application". The request is:

  var options = { method: 'PUT',
  url: 'http://localhost:4044/iot/services',
  qs: { resource: '/iot/lora', apikey: 'LORA0000' },
  headers: 
   {'content-type': 'application/json',
     'fiware-servicepath': '/',
     'fiware-service': 'loratest' },
  body: 
   { attributes: [],
     commands: [ { name: 'config', type: 'string' } ],
     lazy: [],
     static_attributes: [],
     internal_attributes: 
      { lorawan: 
         { application_server: 
            { host: '*****',
              username: '******',
              password: '******',
              provider: 'TTN' },
           app_eui: '******',
           application_id: '******',
           application_key: '******',
           data_model: 'cbor' } } },
  json: true };

And the response is :

Error 500
{ "message": "Could not assign a new type or service to the LoRaWAN Application"}
dcalvoalonso commented 5 years ago

Hi @abrahamSecmotic,

Could you please check that https://github.com/Atos-Research-and-Innovation/IoTagent-LoRaWAN/pull/59 fixes your problem?

dcalvoalonso commented 5 years ago

How are you checking it?

abrahamSecmotic commented 5 years ago

Hi @dcalvoalonso, Yes, the problem is fixed. Thanks :+1:

dcalvoalonso commented 5 years ago

Great. I will merge the PR and close the issue.

Thanks for the feedback.

dcalvoalonso commented 5 years ago

Fixed with https://github.com/Atos-Research-and-Innovation/IoTagent-LoRaWAN/pull/59.