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

Missing required property protocol when using the RegisterDevice.py script #3

Open
dmabtrg opened this issue Aug 7, 2015 · 2 comments

Comments

@dmabtrg
Copy link

dmabtrg commented Aug 7, 2015

The RegisterDevice.py script from python-IDAS4 fails with the following error:

* Status Code: 400
* Response: 
{"reason":"The request is not well formed","details":"Missing required property: protocol [/devices[0]]"}

According to sllide 8 from http://www.slideshare.net/FI-WARE/fiware-iotidasintroul20v2, the protocol property was added on june 2015, but the script was not updated, so it fails. Adding

PAYLOAD_json["devices"][0]["protocol"]="PDI-IoTA-UltraLight"

after https://github.com/telefonicaid/fiware-figway/blob/master/python-IDAS4/Sensors_UL20/RegisterDevice.py#L68 fixes it.

Thanks.

@justb4
Copy link

justb4 commented Oct 3, 2015

Confirmed: same with me. Adding protocol=PDI-IoTA-UltraLight like in:

{
 "devices": [
    { "device_id": "DEV_ID",
      "entity_name": "ENTITY_ID",
      "entity_type": "thing",
      "protocol": "PDI-IoTA-UltraLight",
      "timezone": "Europe/Madrid",
"attributes": [
        { "object_id": "t",
          "name": "temperature",
          "type": "int"
        } ],
 "static_attributes": [
        { "name": "att_name",
          "type": "string",
          "value": "value"
        }
       ]
      }
     ]
    } 

fixed RegisterDevice.py.

@alex8224
Copy link

In fact, RegisterDevice.py also omit the "Command" property.
python SimulateCommand.py [ENTITY_ID] ‘[COMMAND]‘ will produce "command" property not found
and no "RawCommand" property error.

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

3 participants