Details
-
Type:
Monitor
-
Status: Closed
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
HD-Chapter:IoT
-
HD-Enabler:IDAS
-
HD-Node:Unknown
Description
Created question in FIWARE Q/A platform on 04-11-2016 at 18:11
Please, ANSWER this question AT http://stackoverflow.com/questions/40428336/fiware-error-400-on-sending-observations-from-public-idas-to-orion-context-broke
Question:
Fiware Error 400 on sending observations from public IDAS to orion context broker
Description:
we have used the figway to register devices in the global IDAS instance and we wanted to send observations which should be recieved by the IDAS and then sent to the context broker.
Actually we faced a problem on the step of sending observations as we have firstly registered a device on the IDAS by executing RegisterDevice.py script and it was registered successfully But when we started executing sendObservation.py and provided it with the right parameter we received 400 error code for no reason . Here are the steps we've don explained accurately below:
1- Firstly we configured the Config.ini properly this way
[user]
"#Please, configure here your username at FIWARE Cloud and a valid Oauth2.0 TOKEN for your user (you can use get_token.py to obtain a valid TOKE$"
username=mostafa.h_2014@hotmail.com
token=gsMVRbQP8oDnZLXCqPp5Xiv9zrc8l
"#f7mk8B018wIWoFSpdyYsAX7gcbAHtj"
[contextbroker]
host=147.27.60.58
port=1026
OAuth=no
"# Here you need to specify the ContextBroker database you are querying."
"# Leave it blank if you want the general database or the IDAS service if you are looking for IoT devices connected by you."
fiware_service=bus_auto
fiware-service-path=/
[idas]
host=130.206.80.43
adminport=4061
ul20port=7896
OAuth=no
"# Here you need to configure the IDAS service your devices will be sending data to."
"# By default the OpenIoT service is provided."
"#fiware-service=OpenIoT"
fiware-service=openiot
fiware-service-path=/
"#apikey=4jggokgpepnvsb2uv4s40d59ov"
apikey=4jggokgpepnvsb2uv4s40d59ov
[local]
"#Choose here your System type. Examples: RaspberryPI, MACOSX, Linux, ..."
host_type=RasspberryPI
"# Here please add a unique identifier for you. Suggestion: the 3 lower hexa
bytes of your Ethernet MAC. E.g. 79:ed:af"
"# Also you may use your e-mail address."
host_id=mostafa.h_2014@hotmail.com
Chat Conversation End
here we run sendObservation.py with providing the measurement manually
pi@raspberrypi:~/fiware-figway/python-IDAS4/Sensors_UL20 $ python
SendObservation.py NexusPro103 'temp|17'
- Asking to http://130.206.80.43:7896/iot/d?k=4jggokgpepnvsb2uv4s40d59ov&i=NexusPro103
- Headers: {'Fiware-Service': 'openiot', 'content-type': 'application/json', 'Fiware-ServicePath': '/', 'X-Auth-Token': 'NULL'}
- Sending PAYLOAD:
temp|17
...
and this is the response we get
- Status Code: 400
- Response: {"name":"UNSUPPORTED_TYPE","message":"The request content didn't have the expected type [text/plain ]"}
Activity
Field | Original Value | New Value |
---|---|---|
Component/s | FIWARE-TECH-HELP [ 10278 ] |
HD-Node | Unknown [ 10852 ] | |
HD-Enabler | Unknown [ 10910 ] | |
HD-Chapter | Unknown [ 10845 ] |
HD-Enabler | Unknown [ 10910 ] | IDAS [ 10884 ] |
HD-Chapter | Unknown [ 10845 ] | IoT [ 10839 ] |
Assignee | Carlos Ralli Ucendo [ ralli ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Answered [ 10104 ] |
Resolution | Done [ 10000 ] | |
Status | Answered [ 10104 ] | Closed [ 6 ] |
Fix Version/s | 2021 [ 12600 ] |