[ https://jira.fiware.org/browse/HELP-8748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fernando Lopez deleted HELP-8748: --------------------------------- > [fiware-stackoverflow] Fiware Error 400 on sending observations from public IDAS to orion context broker > -------------------------------------------------------------------------------------------------------- > > Key: HELP-8748 > URL: https://jira.fiware.org/browse/HELP-8748 > Project: Help-Desk > Issue Type: Monitor > Reporter: Backlog Manager > Assignee: Fermín Galán > Labels: agent, fiware, global, iot > > Created question in FIWARE Q/A platform on 04-11-2016 at 18:11 > {color: red}Please, ANSWER this question AT{color} https://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 ... We used the figway scripts which lies in this link particularly https://github.com/telefonicaid/fiware-figway/tree/master/python-IDAS4/Sensors_UL20 > Here are the steps we've don explained accurately below: > Firstly we configured the Config.ini properly with the right IDAS and context broker ports as well as the api key , the service name and the other important parameters. > . > [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 at 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 at hotmail.com > Chat Conversation End > here we run sendObservation.py with providing the measurement manually > pi at 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 ]"} > Even the field of the device protocol type was missing in the code of Registerdeivce.py in github and we have updated it according to this link https://github.com/telefonicaid/fiware-figway/issues/3 > we just want to know what's causing this error although we made sure everything is set properly . So , we would be really grateful if somebody can figure out the reason behind this error. -- This message was sent by Atlassian JIRA (v6.4.1#64016)
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy