Git Product home page Git Product logo

sap-archive / cloud-platform-iot-starterkit Goto Github PK

View Code? Open in Web Editor NEW
279.0 99.0 185.0 44.07 MB

This repository provides information and code for working with SAP Cloud Platform Internet of Things. It enables users to get an end-to-end IoT solution with either real hardware or simulators up and running fast and start their own extensions and usage based on this.

License: Other

HTML 1.09% Python 23.91% Java 43.96% JavaScript 22.15% Objective-C 2.66% CSS 0.03% Makefile 0.06% Shell 3.29% C++ 2.85%
sample sample-code sap-cloud-platform iot scp-iot

cloud-platform-iot-starterkit's Introduction

Important Notice

This public repository is read-only and no longer maintained. For SAP IoT samples, refer to the SAP IoT samples repository on GitHub.com/SAP-samples.

Starter Kit for the SAP Cloud Platform Internet of Things

The documentation and source code aim to provide building blocks and complete end-to-end examples for how to use the SAP Cloud Platform Internet of Things.

Supported IoT Service versions

The programs included in this Starter Kit reference third party open source or other free download components. The third-party licensors of these components may provide additional license rights, terms and conditions and/or require certain notices. The exact dependencies for each program can be established according to the rules of its programming language and the build system used: POM files for Java/Maven, import statements for Python, etc.

How to obtain support

This project is provided "as-is": there is no guarantee that raised issues will be answered or addressed in future releases.

License

Copyright (c) 2015 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the SAP Sample Code License Agreement except as noted otherwise in the LICENSE file.

cloud-platform-iot-starterkit's People

Contributors

agraebe avatar andrepreussner avatar btbernard avatar cyclenerd avatar dependabot[bot] avatar dirkboerner avatar i333273 avatar jay-sdk avatar jhoenger avatar levinanton avatar mahnazhaj avatar mameling avatar matteoporru avatar mikebessonov avatar rac01 avatar ricoruszewski avatar suyashlakhotia avatar thomasjanke avatar yvesmartin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloud-platform-iot-starterkit's Issues

Python example iot_starterkit_push_ui.py fails to send message

When sending the response is 200 and a html code.
when entering in the website of the html code and sending the form in there, you get this:
{"msg":"Parse error. Expected [messageType] of type [string]"}
issue

Anyway your message doesn't get stored in the database table T_IOT_HTTP_PUSH (where the pushed messages are stored until the sensor device makes a pull request) for late consumption of the sensor device.

404 error

Hello,

I have the problem that I get a 404 error when I want to send messages to the device. All other functions work perfectly.
Thanks for help.

Kind regards,
William
05-09-2016 12-10-36

The path of get property is incorrect(cf java-samples)

Hello,
I have configured the sample.properties in the resources but it did not work.
after i debugger,i found get property's path is ~\iot\iot-starterkit\cf\samples\java-samples\ commons\target\sample.properties
but actualy,sample.properties is exist in ~\iot\iot-starterkit\cf\samples\java-samples\ send-command\target\classes\sample.properties after mvn install

cf/samples/java-samples/send-command project

iotrdms error 503

Hello ine the cloud platform the destination iotrdms response is code 503 service unavailable can you help me please.
image

Best regards Julien.

Error when sending message

When using the "Send message" or "Switch LED state", the application is displaying a "undefined" message.
If you look further (breakpoint in index.html in pushData function), this is due to the system being unable to log you on and requesting a SAML token.
image

This can be seen at this URL;
https://goo.gl/Yophea

Thanks in advance.

Getting java.lang.IllegalArgumentException

Hello, I am getting an java.lang.IllegalArgumentException when creating the MqttClient!

Full Stack Trace:
Exception in thread "main" java.lang.IllegalArgumentException: wss://iotmmsp19?????????????trial.hanatrial.ondemand.com/com.sap.iotservices.mms/v1/api/ws/mqtt
at org.eclipse.paho.client.mqttv3.MqttConnectOptions.validateURI(MqttConnectOptions.java:458)
at org.eclipse.paho.client.mqttv3.MqttAsyncClient.(MqttAsyncClient.java:273)
at org.eclipse.paho.client.mqttv3.MqttAsyncClient.(MqttAsyncClient.java:167)
at org.eclipse.paho.client.mqttv3.MqttClient.(MqttClient.java:224)
at websocket.websocket.main(websocket.java:39)

Thanks!

Data is not displayed

Hi,
I tried to use the java application on my HCP trial account.
After selecting a device and a message type, no values are displayed. Using the development tools in Firefox, I can see, that json files with data from the data base tables are received. Any Idea why this data is not displayed on the web site?
Thanks you very much,
Stefan

send_data.sh is invalid

Hi,

The curl example for sending data for a sensor is invalid;

  • the alternate ids are are sent as numeric literals not strings
  • the semantics for the attribute "measures" is not clear (the values passed are non-integer).

Can you confirm this example works as intended, or point to documentation that might help?

[OPC UA] sed: -e expression #1, char 27: unterminated `s' command

I'm setting up for the OPC UA protocol,
i configured the protocol-config.sh file and launched the command
. ./protocol-model.sh
I get the following error (i added spaces in the html tags)

sed: -e expression #1, char 27: unterminated `s' command
< html >
  < head >
    < title >404 Not Found< /title >
  </ head >
  < body >
    < h1 >404 Not Found< /h1 >
    < p >The requested resource has not been found. < br >
    Please check the requested URL.< /p >
  < /body >
< /html >

is it possible to have support?

looking at the documentation on iot/core/api/v1/doc/
I made the following change

URL_CAPABILITIES=https://${HOST_NAME}/iot/core/api/v1/tenants/${TENANT_ID}/capabilities
URL_SENSOR_TYPES=https://${HOST_NAME}/iot/core/api/v1/tenants/${TENANT_ID}/sensorTypes

I get the following error
{"message":"Invalid client request."}

I then tried this way and it worked

URL_CAPABILITIES=https://${HOST_NAME}/iot/core/api/v1/tenants/capabilities
URL_SENSOR_TYPES=https://${HOST_NAME}/iot/core/api/v1/tenants/sensorTypes

error by executing binary-data-commands-and-heartbeats-via-mqtt.py

Hi all,

i just tried out the above menbtioned python script.
but in this line:

client.tls_set(config_crt_4_landscape, certfile=config_credentials_crt, keyfile=config_credentials_key)

I got this result:

Traceback (most recent call last):
  File "commands_and_heartbeat.py", line 101, in <module>
    client.connect(broker, broker_port, 60)
  File "E:\python363\lib\site-packages\paho\mqtt\client.py", line 768, in connect
    return self.reconnect()
  File "E:\python363\lib\site-packages\paho\mqtt\client.py", line 927, in reconnect
    sock.do_handshake()
  File "E:\python363\lib\ssl.py", line 1068, in do_handshake
    self._sslobj.do_handshake()
  File "E:\python363\lib\ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)

If i change the line to:

client.tls_set(ca_certs=None ,certfile=config_credentials_crt, keyfile=config_credentials_key)

it works:
(0, 2)
Connected to MQTT broker with result code: 0
on_subscribe - message_id: 1 / qos: (0,)

the provided iot service cert "config_crt_4_landscape" is attached (pls change to '*.crt'):

eu10cpiotsap.txt

br,
fabian

Missing info on adding message type to index.html

Since the last update, the readme (for java app) no longer explains where you need to add your own message type, device type, ... to the index.html. This info is however key in getting the iot starter kit working.

Kind regards,
Annelies

Looking for the IoT Hardware for the Raspberry Pi example

Hello,

I write the same issues/question in the general GitHub "Issues" yesterday but that wasn't the right place. If this the wrong channel again please tell me where is the right place.

My Question: I would like reconstruct the Raspberry Pi example and i'm looking for the suitable components on the internet. Can you help me to get the right IoT hardware?

Best regards,
PitKn

Access to the requested resource is not authorized (HTTP 401).

Hello,
I'm failed to use the Code-Snippets insert.py to send a message from a real IoT-Device to the SAP HANA Cloud Plattform. I can successfully test the HTTP API in the MMS with the same device, but when i use the insert.py i get the Error message "Access to the requested resource is not authorized (HTTP 401).".

What can i do to solve this problem?

thanks & Best Regards,
Pit

Links broken at "readme.MD"

Hi all,

the links to the offical SAP Help Doku are broken (points to the old SAP Help url), i think ist heplpful to have the correct one referenced.

Runtime: CF

Thx and br,
fabian

Java Consumption app not displaying data from tables!

Hi,

I deployed Java consumption application as described in below link [1]
[1] https://github.com/SAP/iot-starterkit/tree/master/neo/apps/java/consumption

Using the Message Management Service (MMS) Cockpit I can send messages to a message management service and I can see the stored messages, using "Display stored messages" in the MMS Cockpit (for different devices and different message types).
After deploying and starting the iotstarterkit application I can access the application but I get blank for all the lists.
image

I have made below checks before posting here:

  1. "starterkit" java app is bound to the same schema ID as "iotmms". They both have a binding pointing to same schema(iotmmsschema) ID.
  2. Destinations section of "starterkit" app.
    "iotrdms" destination URL is
    https://iotrdmsiotservices-pxxxxtrial.hanatrial.ondemand.com/com.sap.iotservices.dms (with trial suffix), User is (with no trial suffix) and Password is my SAP Cloud platform login password.
  3. Destination section of "starterkit" app.
    For "iotmms" destination:
    URL is https://iotmmspxxxxtrial.hanatrial.ondemand.com/com.sap.iotservices.mms (with trial suffix), User is (with no trial suffix) and Password is my SAP Cloud platform login password.
  4. In browser on executing below link, I get following devices.
    https://iotrdmsiotservices-pXXXXtrial.hanatrial.ondemand.com/com.sap.iotservices.dms/v1/api/devices
    [{"id":"5b6b0dc6-f5b9-4232-8bfc-10add9a295cd","name":"MyGrovePI","device_type":"90b08720c75d218ef422"}]
  5. I created device types, message types and devices via the IoT Services Cockpit (see below picture).
    image

Can someone help me, what might be the problem?

Regards,
Harsha MP

User credentials

I think it would be worth mentioning that the user in encoded credentials should be [user]#[tenant]:[password]

Regards.
-Vitaliy

I don't have any API for Commands

Hi,

I try to send command from cloud to the gateway but the api for command gives me an error.(even get is not working)

I guess I don't have the command feature installed on the IoT 4.0 service... is that the case?

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.