mirror of
https://github.com/OpenMTC/OpenMTC.git
synced 2025-06-25 00:39:08 +00:00
Compare commits
13 Commits
v1.2.0
...
travis-doc
Author | SHA1 | Date | |
---|---|---|---|
969b5867d9 | |||
c3ac4f9dfb | |||
7781b15c4e | |||
b9034a916f | |||
5257a11cf0 | |||
461698b32a | |||
734a51fb73 | |||
8836af62a6 | |||
9b73c6d337 | |||
c737effe0e | |||
58560b7573 | |||
fbd7d987e8 | |||
3fc8bdb14e |
79
.travis.yml
79
.travis.yml
@ -1,36 +1,55 @@
|
||||
services:
|
||||
- docker
|
||||
- docker
|
||||
dist: xenial
|
||||
before_script:
|
||||
- sudo apt update
|
||||
- sudo apt install qemu-user-static
|
||||
- "./create-binary-docker backend"
|
||||
- "./create-binary-docker backend -a arm"
|
||||
- "./create-binary-docker gateway"
|
||||
- "./create-binary-docker gateway -a arm"
|
||||
- "./create-binary-docker orioncontextbroker"
|
||||
- "./create-binary-docker orioncontextbroker -a arm"
|
||||
- "./create-binary-docker influxdbapp"
|
||||
- "./create-binary-docker influxdbapp -a arm"
|
||||
- "./create-binary-docker cul868ipe"
|
||||
- "./create-binary-docker cul868ipe -a arm"
|
||||
- sudo apt update
|
||||
- sudo apt install qemu-user-static python3 python3-pip python3-setuptools
|
||||
- sudo pip3 install --upgrade pip
|
||||
- sudo python3 -m pip install --upgrade setuptools
|
||||
- sudo python3 -m pip install --upgrade pyresttest
|
||||
- "./create-binary-docker backend"
|
||||
- "./create-binary-docker backend -a arm"
|
||||
- "./create-binary-docker gateway"
|
||||
- "./create-binary-docker gateway -a arm"
|
||||
- "./create-binary-docker orioncontextbroker"
|
||||
- "./create-binary-docker orioncontextbroker -a arm"
|
||||
- "./create-binary-docker influxdbapp"
|
||||
- "./create-binary-docker influxdbapp -a arm"
|
||||
- "./create-binary-docker cul868ipe"
|
||||
- "./create-binary-docker cul868ipe -a arm"
|
||||
- docker run -d --name backend -p 0.0.0.0:18000:18000 -e "ONEM2M_CSE_ID=backend" -e "ONEM2M_NOTIFICATION_DISABLED=false" openmtc/backend-amd64 -v
|
||||
- docker logs backend
|
||||
- docker run -d --name gateway -p 0.0.0.0:8000:8000 -e "ONEM2M_HTTP_TRANSPORT_PORT=8000" -e "ONEM2M_CSE_ID=gateway" -e "ONEM2M_REMOTE_CSE_POA=<POA>" -e "ONEM2M_REMOTE_CSE_ID=backend" -e "ONEM2M_NOTIFICATION_DISABLED=false" -e "ONEM2M_REGISTRATION_DISABLED=false" openmtc/gateway-amd64 -v
|
||||
- docker logs gateway
|
||||
script:
|
||||
- docker tag openmtc/orioncontextbroker-amd64 openmtc/orion-context-broker-app-amd64
|
||||
- docker tag openmtc/orioncontextbroker-arm openmtc/orion-context-broker-app-arm
|
||||
- docker tag openmtc/cul868ipe-amd64 openmtc/cul868-ipe-amd64
|
||||
- docker tag openmtc/cul868ipe-arm openmtc/cul868-ipe-arm
|
||||
- docker tag openmtc/influxdbapp-amd64 openmtc/influxdb-app-amd64
|
||||
- docker tag openmtc/influxdbapp-arm openmtc/influxdb-app-arm
|
||||
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
|
||||
- docker push openmtc/backend-amd64
|
||||
- docker push openmtc/backend-arm
|
||||
- docker push openmtc/gateway-amd64
|
||||
- docker push openmtc/gateway-arm
|
||||
- docker push openmtc/orion-context-broker-app-amd64
|
||||
- docker push openmtc/orion-context-broker-app-arm
|
||||
- docker push openmtc/cul868-ipe-amd64
|
||||
- docker push openmtc/cul868-ipe-arm
|
||||
- docker push openmtc/influxdb-app-amd64
|
||||
- docker push openmtc/influxdb-app-arm
|
||||
- docker tag openmtc/orioncontextbroker-amd64 openmtc/orion-context-broker-app-amd64
|
||||
- docker tag openmtc/orioncontextbroker-arm openmtc/orion-context-broker-app-arm
|
||||
- docker tag openmtc/cul868ipe-amd64 openmtc/cul868-ipe-amd64
|
||||
- docker tag openmtc/cul868ipe-arm openmtc/cul868-ipe-arm
|
||||
- docker tag openmtc/influxdbapp-amd64 openmtc/influxdb-app-amd64
|
||||
- docker tag openmtc/influxdbapp-arm openmtc/influxdb-app-arm
|
||||
- docker logs gateway
|
||||
- docker logs backend
|
||||
after_script:
|
||||
- pyresttest http://localhost:8000 tests/interoperability/basic.yaml
|
||||
env:
|
||||
matrix:
|
||||
secure: oQe/MxxFrPPArxb6OFzOUwG2ZlA5GYekMR6qn0Y3101v82MdrIVgDILHR41iwykTtk1XpJPV9uabsRsvY4hBmbjYzihYZFOAzFf+/KU7wROtKum0fFfLjCPb8uGV41k1JTquB94FibXboVAP7rNL0Vrpl+FGUvMGatQBtwZnGvha6Ha07qTao+X9+0dJ4YvFlvcba/jfzBZBwHw7KHpRoiyKU0dPmXpHcqnZBFcNqRXhzdVrgx0auP/tghoshW5LQWkpTV11uSx/kYuby4oo8r8nB6L0rW1jYSXs9DHiTQCfCy24xlb9YJjCD9aFcjH0lIkVIqQwJYA67MzKYMK4XV684J/Jr3+jfVOoUt0bpZaTnk+r/uiFCtEsN7q0KUlvHLUAi1YNJhKs6CRrAH3GK25QByh+suzPzZoHP42F2LYP9URlzbDH+/v7CwNuw+9pHSmxEhs18LVmggwkMos3o3ArvzMLRNJ3QG1fdoxL/Ubqxhmvhy4rZi6vGQsiF64oX8PN0sRgXekTU/ma+6CTM6qhgkocMUYzT2r/6qd/9R3jmtxSZnikjkR6Iu9NLzAUY+cqnvvjohAvqYyj+tGlQfOPxAU9H4wXnbQWLBM8yn6yt2Ki+3+Jx4Owdv0oXVJpN0GWjMzIJ1nEus5odkWW+c4wcZb6m3Ak0PrzYPp2BgE=
|
||||
after_success:
|
||||
- if [ "$TRAVIS_BRANCH" == "master" ]; then
|
||||
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
|
||||
docker push openmtc/backend-amd64;
|
||||
docker push openmtc/backend-arm;
|
||||
docker push openmtc/gateway-amd64;
|
||||
docker push openmtc/gateway-arm;
|
||||
docker push openmtc/orion-context-broker-app-amd64;
|
||||
docker push openmtc/orion-context-broker-app-arm;
|
||||
docker push openmtc/cul868-ipe-amd64;
|
||||
docker push openmtc/cul868-ipe-arm;
|
||||
docker push openmtc/influxdb-app-amd64;
|
||||
docker push openmtc/influxdb-app-arm;
|
||||
fi
|
||||
after_failure:
|
||||
- docker logs backend
|
||||
- docker logs gateway
|
||||
- coveralls
|
121
README.md
121
README.md
@ -4,43 +4,102 @@
|
||||
</a>
|
||||
</p>
|
||||
|
||||
The OpenMTC SDK aims to provide developers with a convenient yet flexible tool to write oneM2M compliant applications. This includes network applications (NAs), gateway application (GAs), device applications (DAs), as well as interworking proxy entities (IPEs).
|
||||
[](https://www.fiware.org/developers/catalogue/)
|
||||
[](https://www.eclipse.org/legal/epl-v10.html)
|
||||
[](https://stackoverflow.com/questions/tagged/fiware+iot)
|
||||
<br/>
|
||||
[](http://fiware-openmtc.readthedocs.org/en/latest/?badge=latest)
|
||||

|
||||
[](https://hub.docker.com/u/openmtc)
|
||||
[](https://travis-ci.org/OpenMTC/OpenMTC)
|
||||
[](https://snyk.io/test/github/OpenMTC/OpenMTC?targetFile=openmtc-gevent%2Frequirements.txt)
|
||||
[](https://coveralls.io/github/OpenMTC/OpenMTC?branch=master)
|
||||
|
||||
# Table of Content
|
||||
The OpenMTC SDK aims to provide developers with a convenient yet flexible tool
|
||||
to write oneM2M compliant applications. This includes network applications
|
||||
(NAs), gateway application (GAs), device applications (DAs), as well as
|
||||
interworking proxy entities (IPEs).
|
||||
|
||||
- [Quick Start](doc/openmtc-get-started.md)
|
||||
- [Introduction](doc/introduction.md)
|
||||
- [Deployment](doc/deployment-guide.md)
|
||||
- [The MQTT Client](doc/onem2m-client-mqtt.md)
|
||||
- [Authentication Guide](doc/authentication.md)
|
||||
- [Installation of the OpenMTC SDK](doc/install-sdk.md)
|
||||
- [Overview REST API](doc/overview-rest-api.md)
|
||||
- [Write your first OpenMTC applications](doc/training/training-index.md)
|
||||
- [SDK - Using the Application Framework](doc/sdk-framework.md)
|
||||
- [SDK - The low-level CSE Client](doc/sdk-client.md)
|
||||
- [SDK - The Data Model](doc/sdk-datamodel.md)
|
||||
- Examples
|
||||
- [IoT Data Visualization](doc/example-apps/IoT-data-visualization.py)
|
||||
- [Data Aggregation](doc/example-apps/data-aggregation.py)
|
||||
- [Simple Decision](doc/example-apps/simple-decision.py)
|
||||
- [Simple Decision 2](doc/example-apps/simple-decision-2.py)
|
||||
- Scripts
|
||||
- [Create App Structure Script](doc/create-app-structure.md)
|
||||
- [Create binary docker images Script](doc/create-binary-docker.md)
|
||||
- [Code Repository Structure](doc/repository-structure.md)
|
||||
- [Developer FAQ](doc/developer-faq.md)
|
||||
This project is part of [FIWARE](https://www.fiware.org/). For more information
|
||||
check the FIWARE Catalogue entry for the
|
||||
[IoT Agents](https://github.com/Fiware/catalogue/tree/master/iot-agents).
|
||||
|
||||
# Content
|
||||
|
||||
- [Install](#install)
|
||||
- [Usage](#usage)
|
||||
- [API](#api)
|
||||
- [Quality Assurance](#quality-assurance)
|
||||
- [Contributing](#contributing)
|
||||
- [License](#license)
|
||||
|
||||
|
||||
# Python
|
||||
## Install
|
||||
|
||||
The OpenMTC SDK is written in and for the Python programming language. Users should therefore have at least a certain knowledge of Python and its paradigms. For this matter, the following material is recommended:
|
||||
Information about how to install the JSON IoTAgent can be found at the
|
||||
corresponding section of the
|
||||
[Installation & Administration Guide](https://fiware-openmtc.readthedocs.io/en/latest/deployment-guide).
|
||||
|
||||
- [The Python Homepage](http://www.python.org)
|
||||
- [Expert Python Programming by Tarek Ziadé](http://www.e-reading.by/bookreader.php/138816/Ziade_-_Expert_Python_programming.pdf)
|
||||
- [Code Like a Pythonista: Idiomatic Python](http://www.omahapython.org/IdiomaticPython.html)
|
||||
## Usage
|
||||
|
||||
# Feedback
|
||||
Information about how to use the IoT Agent can be found in the
|
||||
[User & Programmers Manual](https://fiware-openmtc.readthedocs.io/en/latest/introduction).
|
||||
|
||||
Please create issues for any problems and direct any comments or feedback you are having to <a href="mailto:support@openmtc.org">support@openmtc.org</a>
|
||||
## API
|
||||
|
||||
Information about the REST API can be found in the
|
||||
[API Section](https://fiware-openmtc.readthedocs.io/en/latest/overview-rest-api)
|
||||
|
||||
|
||||
## Python
|
||||
|
||||
The OpenMTC SDK is written in and for the Python programming language. Users
|
||||
should therefore have at least a certain knowledge of Python and its paradigms.
|
||||
For this matter, the following material is recommended:
|
||||
|
||||
- [The Python Homepage](http://www.python.org)
|
||||
- [Expert Python Programming by Tarek Ziadé](http://www.e-reading.by/bookreader.php/138816/Ziade_-_Expert_Python_programming.pdf)
|
||||
- [Code Like a Pythonista: Idiomatic Python](http://www.omahapython.org/IdiomaticPython.html)
|
||||
|
||||
## Feedback
|
||||
|
||||
Please create issues for any problems and direct any comments or feedback you
|
||||
are having to <a href="mailto:support@openmtc.org">support@openmtc.org</a>
|
||||
|
||||
Please let us know what you think. We are also very interested in any use case
|
||||
you are _not_ able to implement with the SDK or if you find it difficult to do
|
||||
so.
|
||||
|
||||
|
||||
## Quality Assurance
|
||||
|
||||
This project is part of [FIWARE](https://fiware.org/) and has been rated as
|
||||
follows:
|
||||
|
||||
- **Version Tested:**
|
||||

|
||||
- **Documentation:**
|
||||

|
||||

|
||||
- **Responsiveness:**
|
||||

|
||||

|
||||
- **FIWARE Testing:**
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
## Contributing
|
||||
|
||||
Contribution guidelines are detailed in the [CONTRIBUTIONS](https://github.com/OpenMTC/OpenMTC/blob/master/CONTRIBUTIONS.md) file.
|
||||
|
||||
## License
|
||||
|
||||
The OpenMTC SDK is licensed under the Eclipse Public License (EPL)
|
||||
version 1.
|
||||
|
||||
© 2018 OpenMTC
|
||||
|
||||
Please let us know what you think. We are also very interested in any use case you are *not* able to implement with the SDK or if you find it difficult to do so.
|
||||
|
@ -3,6 +3,7 @@ try:
|
||||
except ImportError:
|
||||
from urlparse import urljoin
|
||||
import logging
|
||||
from datetime import datetime
|
||||
|
||||
import requests
|
||||
|
||||
@ -92,7 +93,8 @@ class OrionAPI(LoggerMixin):
|
||||
"type": self._get_type(data_senml["v"]),
|
||||
"metadata": {
|
||||
"timestamp": {
|
||||
"value": data_senml["t"],
|
||||
"value": datetime.fromtimestamp(float(data_senml["t"])).replace(microsecond=0).isoformat()
|
||||
if data_senml["t"] != "none" else data_senml["t"],
|
||||
"type": "String"
|
||||
},
|
||||
"bn": {
|
||||
|
9
doc/index.md
Normal file
9
doc/index.md
Normal file
@ -0,0 +1,9 @@
|
||||
# Open MTC IoT Agent
|
||||
|
||||
[](https://www.fiware.org/developers/catalogue/)
|
||||
[](https://stackoverflow.com/questions/tagged/fiware+iot)
|
||||
|
||||
The OpenMTC SDK aims to provide developers with a convenient yet flexible tool
|
||||
to write oneM2M compliant applications. This includes network applications
|
||||
(NAs), gateway application (GAs), device applications (DAs), as well as
|
||||
interworking proxy entities (IPEs).
|
52
mkdocs.yml
Normal file
52
mkdocs.yml
Normal file
@ -0,0 +1,52 @@
|
||||
site_name: Open MTC
|
||||
site_url: https://github.com/OpenMTC/OpenMTC
|
||||
repo_url: https://github.com/OpenMTC/OpenMTC.git
|
||||
site_description: FIWARE Open MTC IoT Agent document site
|
||||
docs_dir: doc/
|
||||
site_dir: html
|
||||
markdown_extensions: [toc,tables, fenced_code]
|
||||
use_directory_urls: false
|
||||
theme: readthedocs
|
||||
extra_css: ["https://fiware.org/style/fiware_readthedocs.css", "https://fiware.org/style/fiware_readthedocs_iot.css"]
|
||||
pages:
|
||||
- Home: index.md
|
||||
- 'User & Programmers Manual':
|
||||
- Introduction: introduction.md
|
||||
- Quick Start: openmtc-get-started.md
|
||||
- The MQTT Client: onem2m-client-mqtt.md
|
||||
- Authentication Guide: authentication.md
|
||||
- Overview REST API: overview-rest-api.md
|
||||
- Write your first OpenMTC applications: training/training-index.md
|
||||
- Console Outputs:
|
||||
- Sensor Backend: training/console-outputs/training-sensor-backend.md
|
||||
- Sensor Gateway: training/console-outputs/training-sensor-gateway.md
|
||||
- Sensor IPE: training/console-outputs/training-sensor-ipe.md
|
||||
- Sensor GUI: training/console-outputs/training-sensor-gui.md
|
||||
- Sensor Actuator Backend: training/console-outputs/training-sensor-actuator-backend.md
|
||||
- Sensor Actuator Gateway: training/console-outputs/training-sensor-actuator-gateway.md
|
||||
- Sensor Actuator IPE: training/console-outputs/training-sensor-actuator-ipe.md
|
||||
- Sensor Actuator GUI: training/console-outputs/training-sensor-actuator-gui.md
|
||||
- Training:
|
||||
- IPE Sensors: training/training-ipe-sensors.md
|
||||
- IPE Sensors Actuators: training/training-ipe-sensors-actuators.md
|
||||
- GUI Sensors: training/training-gui-sensors.md
|
||||
- GUI Sensors Actuators: training/training-gui-sensors-actuators.md
|
||||
- SDK - Using the Application Framework: sdk-framework.md
|
||||
- SDK - The low-level CSE Client: sdk-client.md
|
||||
- SDK - The Data Model: sdk-datamodel.md
|
||||
- Examples:
|
||||
- IoT Data Visualization: example-apps/IoT-data-visualization.py
|
||||
- Data Aggregation: example-apps/data-aggregation.py
|
||||
- Simple Decision: example-apps/simple-decision.py
|
||||
- Simple Decision 2: example-apps/simple-decision-2.py
|
||||
- Scripts:
|
||||
- Create App Structure Script: create-app-structure.md
|
||||
- Create binary docker images Script: create-binary-docker.md
|
||||
- Code Repository Structure: repository-structure.md
|
||||
- Developer FAQ: developer-faq.md
|
||||
- 'Installation & Administration Manual':
|
||||
- Deployment: deployment-guide.md
|
||||
- Installation of the OpenMTC SDK: install-sdk.md
|
||||
- Appendix : various.md
|
||||
- Resource Names & Types : reference-doc/resource-names-and-types.md
|
||||
- Gateway & Backend Configuration : reference-doc/gateway-and-backend-configuration.md
|
1
openmtc-gevent/requirements.txt
Symbolic link
1
openmtc-gevent/requirements.txt
Symbolic link
@ -0,0 +1 @@
|
||||
dependencies.txt
|
Reference in New Issue
Block a user