Closed dmabtrg closed 8 years ago
We have tried this PR four times from a clean state ( removing all containers and images) and we still get the following error:
devtourguide@devtourguide:~/workspace/fiwareulpgc/fiware-devguide-app$ ./tour-guide sensors create
Waiting for tourguide to be ready [1]... OK.
Generating sensors for restaurants...
Response code: 400
Response headers: { 'x-powered-by': 'Express',
'fiware-correlator': 'eddb9e57-f9b9-48aa-ba4f-7dfaec0ca81b',
'content-type': 'application/json; charset=utf-8',
'content-length': '118',
etag: 'W/"76-nwOyJPj8ZTs2yftSro6J6w"',
date: 'Thu, 08 Sep 2016 20:07:03 GMT',
connection: 'close' }
Response data: {"name":"MISSING_CONFIG_PARAMS","message":"The following mandatory configuration parameters were missing: [\"type\"]"}
{"name":"MISSING_CONFIG_PARAMS","message":"The following mandatory configuration parameters were missing: [\"type\"]"}
In order to test this PR we are following this steps:
git checkout develop
git fetch --all
git merge upstream/develop
git checkout -b test_branch
git merge dmabtrg/feature/cli-sensors
./tour-guide start
wait until tourguide started
./tour-guide sensors create
I'll check it out!
The issue here was the same as with the Keyrock
image. Until the image is build with the new changes, the changes are not in the image so, the cli scripts for the sensors are not inside the container. To test it, you can modify the docker-compose.yml
to have the scripts available inside the container adding a volume in Tourguide:
tourguide:
image: fiware/tutorials.tourguide-app:latest
hostname: tourguide
container_name: tourguide
links:
- orion
- keyrock
- idas
- cygnus
environment:
- ORION_HOSTNAME=orion
- ORION_NO_PROXY_HOSTNAME=orion
- ORION_PORT=1026
- ORION_PEP_ENABLED=false
- IDAS_PORT=7896
- IDAS_ADMIN_PORT=4041
- IDAS_FIWARE_SERVICE=tourguide
- IDAS_FIWARE_SERVICE_PATH=/
- IDAS_API_KEY=tourguide-devices
- IDM_HOSTNAME=keyrock
- IDM_PORT=8000
volumes_from:
- keyrock
volumes:
- ../tutorials.TourGuide-App:/home/tourguide/tutorials.TourGuide-App
Then you can start it and create the sensors:
./tour-guide start
wait until tourguide started
./tour-guide sensors create
I've tested and worked for me!
Thanks for the test instructions! We have followed them and now we can use ./tourguide sensors create but we have a problem related to simulate data. If we perform ./tour-guide sensors create and then ./tour-guide sensors simulate-data -i b4056ec69fece581ef3319aba1b72c11cc4684ba-dining-temperature -t temperature -d 5
we get the following:
If we perform ./tour-guide sensors simulate-data -i b4056ec69fece581ef3319aba1b72c11cc4684ba-dining-temperature -t temperature -d 5
without create sensors we get:
Are we using the command incorrectly?
Fixed in 2dcd7c1 . Still, I'm having some issues using send-data
and simulate-data
. By executing the command, I get the following response:
./tour-guide sensors send-data -i d0136015ae5bda329a2d3211bfbfca53705ac687-kitchen-temperature -d 't|18'
{"name":"DEVICE_GROUP_NOT_FOUND","message":"Couldn\t find device group"}
But I still don't know the reason. I guess it's something related with https://github.com/telefonicaid/iotagent-ul/issues/135#issuecomment-245243227 so I'll have a look and ping you back!
I've updated the latest commit 7edf8601a3f1e92c4aac4a9d15f30e5b1bf68be6 fixing the last issue. Could you test it? Thanks!
LGTM
This PR adds the
sensors
,sensors create
,sensors update
,sensors send-data
andsensors simulate-data
commands to the CLI. This PR depends on #127.sensors create
allows to create sensors for all the available restaurants,sensors update
allows to update all the sensors for all the available restaurants,sensors send-data
allows to send sensor measurements using UL20 for a single sensor,sensors simulate-data
allows to simulate a sensor sending data over time.This will fail until https://github.com/telefonicaid/iotagent-ul/issues/135 is fixed.