├── .github └── workflows │ └── ci.yml ├── .gitignore ├── LICENSE ├── README.md └── services /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | 2 | name: "CI" 3 | on: 4 | push: 5 | branches: 6 | - master 7 | - NGSI-v2 8 | - NGSI-LD 9 | pull_request: 10 | branches: 11 | - master 12 | - NGSI-v2 13 | - NGSI-LD 14 | workflow_dispatch: 15 | 16 | jobs: 17 | test-modules: 18 | name: Test Script 19 | runs-on: ubuntu-latest 20 | timeout-minutes: 10 21 | steps: 22 | - uses: actions/checkout@master 23 | with: 24 | persist-credentials: false 25 | fetch-depth: 0 26 | submodules: recursive 27 | - name: Build Images 28 | run: | 29 | ./services create || true 30 | - name: Run Script 31 | run: | 32 | ./services start test && ./services stop test -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | .fuse_hidden* 3 | .directory 4 | .Trash-* 5 | .nfs* 6 | *.DS_Store 7 | .AppleDouble 8 | .LSOverride 9 | Icon 10 | ._* 11 | .DocumentRevisions-V100 12 | .fseventsd 13 | .Spotlight-V100 14 | .TemporaryItems 15 | .Trashes 16 | .VolumeIcon.icns 17 | .com.apple.timemachine.donotpresent 18 | .AppleDB 19 | .AppleDesktop 20 | Network Trash Folder 21 | Temporary Items 22 | .apdisk 23 | logs 24 | *.log 25 | npm-debug.log* 26 | yarn-debug.log* 27 | yarn-error.log* 28 | pids 29 | *.pid 30 | *.seed 31 | *.pid.lock 32 | node_modules/ 33 | jspm_packages/ 34 | .npm 35 | .eslintcache 36 | *.tgz 37 | .next -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018-2023 FIWARE Foundation e.V. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![FIWARE Banner](https://fiware.github.io/tutorials.IoT-over-MQTT/img/fiware.png)](https://www.fiware.org/developers) 2 | 3 | [![FIWARE IoT Agents](https://nexus.lab.fiware.org/repository/raw/public/badges/chapters/iot-agents.svg)](https://github.com/FIWARE/catalogue/blob/master/iot-agents/README.md) 4 | [![License: MIT](https://img.shields.io/github/license/fiware/tutorials.IoT-over-MQTT.svg)](https://opensource.org/licenses/MIT) 5 | [![Support badge](https://img.shields.io/badge/tag-fiware-orange.svg?logo=stackoverflow)](https://stackoverflow.com/questions/tagged/fiware) 6 | [![UltraLight 2.0](https://img.shields.io/badge/Payload-Ultralight-27ae60.svg)](https://fiware-iotagent-ul.readthedocs.io/en/latest/usermanual/index.html#user-programmers-manual) 7 | 8 | This tutorial uses introduces the use of the MQTT protocol across IoT devices connecting to FIWARE. The 9 | [UltraLight 2.0](https://fiware-iotagent-ul.readthedocs.io/en/latest/usermanual/index.html#user-programmers-manual) IoT 10 | Agent created in the [previous tutorial](https://github.com/FIWARE/tutorials.IoT-Agent) is reconfigured to communicate 11 | with a set of dummy IoT devices using MQTT via a [Mosquitto](https://mosquitto.org/) message broker 12 | 13 | The tutorial uses [cUrl](https://ec.haxx.se/) commands throughout, but is also available as 14 | [Postman documentation](https://www.postman.com/downloads/). 15 | 16 | # Start-Up 17 | 18 | ## NGSI-v2 Smart Supermarket 19 | 20 | **NGSI-v2** offers JSON based interoperability used in individual Smart Systems. To run this tutorial with **NGSI-v2**, use the `NGSI-v2` branch. 21 | 22 | ```console 23 | git clone https://github.com/FIWARE/tutorials.IoT-over-MQTT.git 24 | cd tutorials.IoT-over-MQTT 25 | git checkout NGSI-v2 26 | 27 | ./services create 28 | ./services start 29 | ``` 30 | 31 | | [![NGSI v2](https://img.shields.io/badge/NGSI-v2-5dc0cf.svg)](https://fiware-ges.github.io/orion/api/v2/stable/) | :books: [Documentation](https://github.com/FIWARE/tutorials.IoT-over-MQTT/tree/NGSI-v2) | [Postman Collection](https://fiware.github.io/tutorials.IoT-over-MQTT/) | ![](https://img.shields.io/github/last-commit/fiware/tutorials.IoT-over-MQTT/NGSI-v2) 32 | | --- | --- | --- | --- 33 | 34 | 35 | 53 | 54 | --- 55 | 56 | ## License 57 | 58 | [MIT](LICENSE) © 2018-2024 FIWARE Foundation e.V. 59 | 60 | -------------------------------------------------------------------------------- /services: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Command Line Interface to start all services associated with the Tutorial 4 | # 5 | 6 | set -e 7 | 8 | echo -e "Checkout the \033[1;36mNGSI-v2\033[0m branch of this repository to run the Smart Supermarket tutorial.\n" 9 | # echo -e "Checkout the \033[1;31mNGSI-LD\033[0m branch of this repository to run the Smart Farm tutorial.\n" 10 | --------------------------------------------------------------------------------