Skip to content

Commit 22ff2d4

Browse files
committed
Update readme
1 parent 3db5c13 commit 22ff2d4

File tree

2 files changed

+19
-72
lines changed

2 files changed

+19
-72
lines changed

iot-devices/README.md

Lines changed: 18 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,30 @@
1-
# FIWARE NGSI-LD Step-by-Step Tutorials Context Provider
1+
# FIWARE NGSI-LD Step-by-Step Tutorials Dummy Devices
22

3-
[![Documentation](https://nexus.lab.fiware.org/repository/raw/public/badges/chapters/documentation.svg)](https://fiware-tutorials.rtfd.io)
4-
[![Docker](https://img.shields.io/docker/pulls/fiware/tutorials.ngsi-ld.svg)](https://hub.docker.com/r/fiware/tutorials.ngsi-ld/)
5-
[![Support badge](https://img.shields.io/badge/tag-fiware-orange.svg?logo=stackoverflow)](https://stackoverflow.com/questions/tagged/fiware)
63
[![NGSI LD](https://img.shields.io/badge/NGSI-LD-d6604d.svg)](https://cim.etsi.org/NGSI-LD/official/front-page.html)
74
[![JSON LD](https://img.shields.io/badge/JSON--LD-1.1-f06f38.svg)](https://w3c.github.io/json-ld-syntax/)
85

9-
Simple nodejs express application for use with the FIWARE Step-by-Step tutorials. Each tutorial consists of a series of
10-
exercises to demonstrate the correct use of individual FIWARE components and shows the flow of context data within a
11-
simple Smart Solution either by connecting to a series of dummy IoT devices or manipulating the context directly or
12-
programmatically.
6+
Simple nodejs express application for use with the FIWARE Step-by-Step tutorials.
137

14-
This application provides various sources of context and demonstrates various aspects of FIWARE To run the application
15-
in debug mode add `DEBUG=tutorial:*`
8+
This application provides sends information about devices on the farm.
169

17-
## Store Application
10+
### Actuators
1811

19-
- `WEB_APP_PORT=3000` # Port used by the content provider proxy and web-app for viewing
20-
- `CONTEXT_BROKER=http://orion:1026/v2` - URL of the context broker to update context
21-
- `NGSI_LD_PREFIX=` - Whether to use full URNs for devices
22-
- `SECURE_ENDPOINTS=true` - Enable Keyrock as PDP - default is `false`
12+
- POST `/iot/water:id` - Actuate the water sprinkler on/off
13+
- POST `/iot/tractor:id` - Actuate the tractor start/stop
14+
- POST `/iot/filling:id` - Actuate the filling level add/remove/fill
2315

24-
## Dummy Ultralight Devices
16+
### Fire devices
2517

26-
- `IOTA_HTTP_HOST=iot-agent` - The URL of the IoT Agent
27-
- `IOTA_HTTP_PORT=7896` - Port used by the dummy IoT devices to commuicate with the IoT Agent
28-
- `DUMMY_DEVICES_PORT=3001` - Port used by the dummy IoT devices to receive commands
29-
- `DUMMY_DEVICES_TRANSPORT=HTTP` - Default transport used by dummy IoT devices (either `HTTP` or `MQTT`)
30-
- `DUMMY_DEVICES_API_KEY=4jggokgpepnvsb2uv4s40d59ov` - Device API Key.
18+
- GET `/status` - send the status of the weather and the barn door
19+
- GET `/devices/:type` - send the status of devices of a given type
20+
- GET `/animals` - send the status of the animal collars
3121

32-
## Identity Management - Keyrock
22+
### Set device states
3323

34-
- `KEYROCK_URL=http://localhost` - URL for Keyrock IDM
35-
- `KEYROCK_IP_ADDRESS=http://172.18.1.5` - IP address for Keyrock IDM
36-
- `KEYROCK_PORT=3005` - Port that Keyrock is listening on
37-
- `KEYROCK_CLIENT_ID=tutorial-dckr-site-0000-xpresswebapp` - Client ID for the appliction within keyrock
38-
- `KEYROCK_CLIENT_SECRET=tutorial-dckr-site-0000-clientsecret` - Client secret for the appliction within keyrock
24+
- PUT `/devices/tractor` - - update the status of tractors
25+
- PUT `/devices` - initialise the cache of all devices
26+
- PUT `/barndoor` - toggle the barn door open/shut
27+
- PUT `/weather` - amend the weather - sunny/cloudy/raining
28+
- PUT `/temperature/:id` - amend the target temperature of a device
3929

40-
## Access Control - Authzforce
41-
42-
- `AUTHZFORCE_URL=http://authzforce` - URL for Authzforce
43-
- `AUTHZFORCE_PORT=8080` - Port that Authzforce is listening on
44-
45-
## How to build your own image
46-
47-
The [Dockerfile](https://github.com/fiware/tutorials.NGSI-LD/blob/master/docker/Dockerfile) associated with this image
48-
can be used to build an image in several ways:
49-
50-
- By default, the `Dockerfile` retrieves the **latest** version of the codebase direct from GitHub (the `build-arg` is
51-
optional):
52-
53-
```console
54-
docker build -t fiware/tutorials.NGSI-LD . --build-arg DOWNLOAD=latest
55-
```
56-
57-
- You can alter this to obtain the last **stable** release run this `Dockerfile` with the build argument
58-
`DOWNLOAD=stable`
59-
60-
```console
61-
docker build -t fiware/tutorials.NGSI-LD . --build-arg DOWNLOAD=stable
62-
```
63-
64-
- You can also download a specific release by running this `Dockerfile` with the build argument `DOWNLOAD=<version>`
65-
66-
```console
67-
docker build -t fiware/tutorials.NGSI-LD . --build-arg DOWNLOAD=1.7.0
68-
```
69-
70-
- To download code from your own fork of the GitHub repository add the `GITHUB_ACCOUNT` and `GITHUB_REPOSITORY`
71-
arguments to the `docker build` command.
72-
73-
```console
74-
docker build -t fiware/tutorials.NGSI-LD . --build-arg GITHUB_ACCOUNT=<your account> --build-arg GITHUB_REPOSITORY=<your repo>
75-
```
76-
77-
Alternatively, if you want to build directly from your own sources, please copy the existing `Dockerfile` into file the
78-
root of the repository and amend it to copy over your local source using :
79-
80-
```Dockerfile
81-
COPY app /usr/src/app
82-
```
83-
84-
Full instructions can be found within the `Dockerfile` itself.
30+
To run the application in debug mode add `DEBUG=devices:*`

iot-devices/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
},
1010
"scripts": {
1111
"start": "node ./bin/devices",
12+
"local": "DEBUG=devices.* npm start",
1213
"lint": "eslint . --cache --fix",
1314
"prettier": "prettier --parser flow --single-quote --write **/**/*.js **/*.js *.js"
1415
},

0 commit comments

Comments
 (0)