Coder Social home page Coder Social logo

eclipse / vorto-examples Goto Github PK

View Code? Open in Web Editor NEW
19.0 13.0 14.0 124.01 MB

Contains example code leveraging Vorto information models

License: Eclipse Public License 2.0

Xtend 28.74% Java 44.70% Dockerfile 0.10% Shell 0.36% Python 1.67% JavaScript 6.59% HTML 0.66% CSS 7.36% TypeScript 2.17% SCSS 7.64%
vorto generators iot device java bosch-security-cameras vorto-connector

vorto-examples's Introduction

Vorto Examples

This repository contains example code that have been implemented using the Eclipse Vorto SDK.

Vorto Web Dashboard

Node.js/React based web dashboard, that displays device data, which are modelled with Vorto. Read more

Eclipse Vorto Semantic Middleware

The Eclipse Vorto Semantic Middleware is a small and light-weight microservice that is able to convert any device telemetry payload (binary, json, xml, ...) to semantic Vorto compliant data structures and exposes the data via AMQP or push it to AWS Kinesis. Other micro services can easily consume the data to further process it, e.g. for running analytics on the data.

The middleware provides an Integration API, where data processors can be plugged in, such as integrating the "harmonized data" with any 3rd party IoT data service.

Read more

Vorto Generator Plugins

Vorto Generators convert Vorto Models to any platform specific source code. This code can be a simple platform descriptor, device , or backend code. They are stateless in nature and can be easily developed using the Vorto Plugin SDK.

To get started, checkout the hello world generator, that is deployed as a serverless AWS Lambda function.

Checkout other Example Generators

Vorto Importer Plugins

Vorto Importers convert 3rd party platform descriptions to Vorto models. Just as Generator plugins, they are stateless and can easily be developed using the Vorto Plugin SDK.

To get started, checkout the LwM2M example, that converts LwM2M/IPSO XML descriptions to Vorto Function Block - and Mapping models. This example is deployed as a AWS Lambda service.

Using Vorto Models from your custom DSL

If you would like to use and reference Vorto Models from your own custom DSL, the following tutorial shows you how that is done.

Read tutorial

vorto-examples's People

Contributors

aedelmann avatar kolotu avatar menajrl avatar scriptkiddi avatar somesh-kumar avatar timgrossmann avatar tmtnckff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vorto-examples's Issues

Web Dashboard does not display any data

Steps taken:

  1. Created thing from octopus model
  2. Used Java Client to send data for octopus via MQTT to Things
  3. Start web dashboard
    Expected: Display of octopus thing
    Actual : Blank page with following java script error:

react-dom.production.min.js:198 TypeError: Cannot read property 'includes' of undefined
at ConnectivityStatus.jsx:7
at Array.filter ()
at t.value (ConnectivityStatus.jsx:7)
at Dn (react-dom.production.min.js:173)
at In (react-dom.production.min.js:172)
at jn (react-dom.production.min.js:180)
at Er (react-dom.production.min.js:232)
at Sr (react-dom.production.min.js:233)
at Gr (react-dom.production.min.js:249)
at Br (react-dom.production.min.js:248)
tr @ react-dom.production.min.js:198
react-dom.production.min.js:198 TypeError: Cannot convert undefined or null to object
at Function.keys ()
at t.value (ConnectivityStatus.jsx:6)
at Dn (react-dom.production.min.js:173)
at In (react-dom.production.min.js:172)
at jn (react-dom.production.min.js:180)
at Er (react-dom.production.min.js:232)
at Sr (react-dom.production.min.js:233)
at Gr (react-dom.production.min.js:249)
at Br (react-dom.production.min.js:248)
at Mr (react-dom.production.min.js:245)
tr @ react-dom.production.min.js:198
ConnectivityStatus.jsx:7 Uncaught (in promise) TypeError: Cannot read property 'includes' of undefined
at ConnectivityStatus.jsx:7
at Array.filter ()
at t.value (ConnectivityStatus.jsx:7)
at Dn (react-dom.production.min.js:173)
at In (react-dom.production.min.js:172)
at jn (react-dom.production.min.js:180)
at Er (react-dom.production.min.js:232)
at Sr (react-dom.production.min.js:233)
at Gr (react-dom.production.min.js:249)
at Br (react-dom.production.min.js:248)

Update dependencies of Dashboard

Bump up the versions of the react dependencies in order to get rid of several vulnerabilities in e.g. react-scripts. (Will not be deployed since it's used for building the project).

org.eclipse.vorto.Image Ui in dasbhoard does not render

Steps taken

  1. Send image data for org.eclipse.vorto.Image to Bosch IoT Things with the following payload

mediatype: "image/jpeg"
content:

  1. Open dashboard and see image
    Expected: Image is shown
    Actual: No image is shown

Problem what I can see is that you expect the mediaType in the form of "data:image/jpeg;base64". However we cannot assume that this is sent like that. In fact media types are only in format image/png or image/jpeg. The precessing data: and suffix :base64 are special for the html img element. To solve this, you would need to add this prefix and suffix in the UI element itself.

Fix environment variables

Since the React frontend is sent to the calling client browser, the environment variables of the server don't have any effect.

  • Change the way the environment variables are set in order to allow for configurable elements on the server side

Build failure for Example Generators

Compilation error, due to the fact webdevice.jar is removed from examples generators

[ERROR] Failed to execute goal on project generator-runner: Could not resolve dependencies for project org.eclipse.vorto.examples:generator-runner:jar:0.0.1-SNAPSHOT: Could not find artifact org.eclipse.vorto.examples:org.eclipse.vorto.codegen.webdevice:jar:0.0.1-SNAPSHOT -> [Help 1]
[ERROR] 

Vorto Middleware - Replace Settings tab with Mappings

Confirmations

  • Replace 'Settings' tab with 'Mappings'
  • Display (not yet) installed mappings (use REST - Endpoint A)
  • User is able to install a not yet installed mapping by clicking 'Install' (use REST Endpoint B)
  • User is able to uninstall an installed mapping by clicking 'Uninstall' (use REST Endpoint C)

REST Endpoint A

GET api/v1/mappings
Response: List of Mapping Objects

Mapping Object

  • installed : bool
  • modelId : ModelID

Model ID Object

  • name
  • namespace
  • version
  • prettyFormat

REST Endpoint B

PUT api/v1/mappings/{modelId#prettyFormat}/install
403: If user is not authorised to perform the action
400: If the provided model is already installed

REST Endpoint C

PUT api/v1/mappings/{modelID#prettyFormat}/uninstall
403: If user is not authorised to perform the action
400: If the provided model is already uninstalled

BUG: Traci Simulator connection fails

The Traci simulator has problems connecting to Bosch IoT Hub leading to unpredictable simulation of trucks in Vorto dashboard.

Expected: The connections should be established for each truck before data is pushed to Hub.

Building of Docker Images for example-generators fail

This happens due to the fact while installing Python, where the jessie-updates were not able to locate.
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease Unable to find expected entry 'main/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)

AMQP Handler for Vorto Normalizer

This handler can be configured for an AMQP server, such as Amazon MQ. Any incoming Hono telemetry data, will then be published as normalised/mapped Vorto compliant payload and exposed as an AMQP topic.

The following APIs / topics shall be supported :

Topic name: vorto-ditto
Topic name: vorto-native

The Eclipse Ditto (e.g. Bosch IoT Things) can be configured with an AMQP (southbound) connection, pointing to the topic "vorto-ditto", in order to receive Vorto normalised device payload.

Example generators are not able generate code for any models

Env:

local setup of EclipseVorto and Vorto-examples

Steps to reproduce:

  • browse and select any model
  • in the models details page select any 'experimental' generator
  • in the generator template - click generate

Actual outcome:

  • not able to generate code
  • shows white label error

Expected outcome:

  • show deliver the zip file for the generated code.

Run Example Generators as Lambda Function on AWS

Instead of running the 3rd party example generators as EC2 instance, it would be better to run them stateless as a AWS Lambda Function. Generators are anyway not invoked very frequently which would decrease infra costs.

Show details of selected topology item

Selected item is a root topology item
Show main / cockpit page , with map and KPI/metrics

** Selected item is a topology item/referancable**
Show map containing only assets/devices for the selected topology item (without KPIs)

Selected item is a device/asset with a Vorto Information Model
Show Details UI, Same as in Vorto Dashboard V1

Checkbox for Deactivate Automatic Refresh

In order to allow the user more control over if the things should be automatically updated every x seconds, we should add a checkbox for automatic updating that can be unchecked to stop automated updates.

Remove package_for_deployment.json and do it in Travis

Right now the deployment on AWS requires the project to have a package_for_deployment.json file which contains the content of the actual package.json file in a cut down manner (no devDependencies and less scripts).

  • Remove the package_for_deployment.json
  • Create an automated build step in Travis that "creates" that special package.json

Introduce Testing of core functionality

In order to prevent future changes and refactors to break the deploys, we should introduce testing for the core components such as the authentication, token renewal, Simulator etc.

Jest is one of the go-to choices for React applications.
https://jestjs.io/

Trying to use vorto-dashboard with Bosch IoT platform

Hi,

I´ve tried to use the vorto-dashboard with Bosch IoT. For some reason it fails during fetching the devices from my account. It looks like it´s missing the 'definition' property for displaying the devices on the website and fails with a blank/black screen.

That´s the error message on the Javascript Console

react-dom.production.min.js:4636 TypeError: Cannot read property 'some' of undefined
    at KpiCardTwoCol.jsx:67
    at Array.some (<anonymous>)
    at KpiCardTwoCol.jsx:66
    at Array.filter (<anonymous>)
    at t.value (KpiCardTwoCol.jsx:65)
    at Jo (react-dom.production.min.js:4241)
    at Xo (react-dom.production.min.js:4232)
    at Rs (react-dom.production.min.js:6671)
    at Al (react-dom.production.min.js:5648)
    at Nl (react-dom.production.min.js:5637)

I´ve just installed version

info "[email protected]" has binaries:
   - vorto-dashboard

Hope someone can help.

Build and Deploy to AWS Development Environment

Confirmations:

  • build and upload the artifact to S3 bucket
  • use Beanstalk to version the artifact
  • deploy the artifact to example-generators environment
  • use TravisCI to achieve the above tasks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.