We use proprietary and third party´s cookies to improve your experience and our services, identifying your Internet Browsing preferences on our website; develop analytic activities and display advertising based on your preferences. If you keep browsing, you accept its use. You can get more information on our Cookie Policy
Cookies Policy
Ask Your Question

lukas's profile - activity

2017-08-31 12:33:08 +0100 received badge  Famous Question (source)
2017-03-02 09:41:50 +0100 received badge  Famous Question (source)
2017-02-01 12:37:50 +0100 received badge  Student (source)
2017-02-01 12:37:46 +0100 received badge  Teacher (source)
2017-02-01 12:37:46 +0100 received badge  Self-Learner (source)
2017-02-01 09:53:50 +0100 received badge  Notable Question (source)
2017-01-27 14:00:58 +0100 received badge  Scholar (source)
2017-01-27 14:00:54 +0100 answered a question Tourguide App: problem sending data to sensor

Ok, I sorted it out finally. It is related to the "entitytype" set when registering the sensor. I thougth I had to put it to "sensor", but I should have put it to the "entityname"'s type, which is "Restaurant".

So the "tooManyResult" error I got was, as explained by jmcantera, related to different entities with same id but of different types.

But we can effectiveley request an entity to see if the sensor was added before sending any sensor data update, as described in "Register a new sensor with the IoT Agent" in this doc: http://fiwaretourguide.readthedocs.io...

2017-01-27 13:51:05 +0100 received badge  Notable Question (source)
2017-01-25 08:38:09 +0100 received badge  Popular Question (source)
2017-01-20 14:41:00 +0100 commented answer Tourguide App: problem sending data to sensor

Hello, Thanks for your answer. If I look at the second link you provide, the last request at the end of "Register a new sensor with the IoT Agent" section tells: "We can do a request to orion for the restaurant and see if the new attribute has been added". This is before sending data, same as I do.

2017-01-20 08:03:11 +0100 received badge  Popular Question (source)
2017-01-19 20:55:35 +0100 commented answer Tourguide update sensor value

Thanks for your answer. I did already try this documentation, but ran into errors. I opened another question (http://tinyurl.com/jtrn2sn) for that issue as it is not related to this one. So maybe you can help me there.

2017-01-19 09:51:36 +0100 asked a question Tourguide App: problem sending data to sensor

Hello,

In the Tourguide App documentation, I can't see the attributes of the created sensor when following Manage IoT Data section.

I just tried with a clean install of the tutorial, and this is what I get:

(if anybody can tell me how I can make the json format look nicer in markdown syntax, any hint would be welcome... I'll update the code below)

I post following request to create the IDAS service:

curl -X POST -H "Content-Type: application/json" -H "fiware-service: tourguide" -H "fiware-servicepath: /Franchise1" -H "Cache-Control: no-cache" -d '{ "services": [ { "apikey": "tourguide-devices", "cbroker": "http://orion:1026", "resource": "/iot/d", "entity_type": "Restaurant" } ] }' "http://localhost:4041/iot/services"

with header: Content-Type:application/json fiware-service:tourguide fiware-servicepath:/Franchise1

then I registered the sensor as following with the same headers

curl -X POST -H "Content-Type: application/json" -H "fiware-service: tourguide" -H "fiware-servicepath: /Franchise1" -H "Cache-Control: no-cache" -d '{ "devices": [ { "device_id": "myRestaurant-sensor-0115206c51f60b48b77e4c937835795c33bb953f", "protocol": "UL20", "entity_name": "0115206c51f60b48b77e4c937835795c33bb953f", "entity_type": "Sensor", "type" "attributes": [ { "object_id": "mt", "name": "myTemperature", "type": "number" } ] } ] }' "http://localhost:4041/iot/devices"

(both requests return 200 and 201 with {}, so it looks fine)

Then querying the entity to see if the attributes are there with:

curl -X GET -H "Accept: application/json" -H "fiware-service: tourguide" -H "fiware-servicepath: /Franchise1" -H "Cache-Control: no-cache" "http://localhost:1026/v2/entities/0115206c51f60b48b77e4c937835795c33bb953f?options=keyValues&type=Restaurant"

gives me this answer:

{ "id": "0115206c51f60b48b77e4c937835795c33bb953f", "type": "Restaurant", "address": { "streetAddress": "Cuesta de las Cabras Aldapa 2", "addressRegion": "Araba", "addressLocality": "Alegría-Dulantzi", "postalCode": "01240" }, "aggregateRating": { "reviewCount": 1, "ratingValue": 4 }, "capacity": 120, "department": "Franchise1", "description": "Restaurante de estilo sidrería ubicado en Alegria-Dulantzi. Además de su menú del día y carta, también ofrece menú de sidrería. El menú del día cuesta 9 euros. Los fines de semana la especialidad de la casa son las alubias con sacramentos. En lo que a bebidas se refiere, hay una amplia selección además de la sidra. Cabe destacar que se puede hacer txotx. La capacidad del establecimiento es de 50 personas pero la sidrería no dispone de aparcamiento.%5cn%5cnHORARIO: %5cn%5cnLunes a domingo: 9:00-17:00 y 19:00-23:00.", "location": "42.8404625, -2.5123277", "name": "Elizalde", "occupancyLevels": 0, "priceRange": 0, "telephone": "945 400 868" }

--> So no sign of the added attribute... Why is that?

If I do the request without "type=Restaurant" i get:

{ "error": "TooManyResults", "description": "More than one matching entity. Please refine your query" }

Why are there more than one result on a request specifying an entity with a unique id?

2017-01-18 22:16:50 +0100 answered a question Tourguide update sensor value

Hello,

Thanks a lot for your answer.

I did already try this documentation, but ran into errors. I opened another question for that issue as it is not related to this one. So maybe you can help me there.

I saw others members here referring to that notebook.thrive.to tourguide tutorial. Maybe they can give a hint about that?

2017-01-18 10:26:21 +0100 received badge  Organizer (source)
2017-01-18 09:42:59 +0100 received badge  Editor (source)
2017-01-18 09:31:59 +0100 asked a question Tourguide update sensor value

Hi,

I'm trying to send sensor data to the fiware notebook instance "Fiware Tour Guide for newbies" here

But I am stuck at understanding the IoT section. You can see in my tests here that I get an error when sending sensor data:

"name":"ENTITYGENERICERROR","message":"Error accesing entity data for device: thing:myKitchen-sensor-0115206c51f60b48b77e4c937835795c33bb953f of type: thing"

Thanks in advance for your help!

EDIT: Even the example on the this page has the same result if I execute it without modifying it. I get the same error: {"name":"ENTITYGENERICERROR","message":"Error accesing entity data for device: thing:restaurant-sensor-0115206c51f60b48b77e4c937835795c33bb953f of type: thing"}