This package can be used to deploy an IoT device simulator on your local machine. Can be used in conjunction with SDS to build demo's and prototypes.
-
First of all install nodejs from the following location: Node.js
Download the stable version (recommended for most users). Follow the Wizard.
To test if everything is working, open a command prompt and type (if you already had a prompt open, close it first):
$ node --version
If you get an error, uninstall and install again.
-
Download Git from following location: Git
Follow the wizard (When asked if you want to add to your path, click yes).
To test if everything is working, open a command prompt and type (if you already had a prompt open, close it first):
$ git --version
If you get an error, uninstall and install again.
-
Download and install mongodb from the following location (only needed of you want to stream to other things outside SDS):
- for Mac: with homebrew or installer
- for Windows: mongodb for windows
Check to see if you can run mongod from the command prompt.
-
Navigate to a folder on your local machine where you want to store the application.
-
Open a command prompt and navigate to that specific folder (to get the path, just copy paste it from the finder window):
$ cd <path/to/folder> // omit the <>
-
Clone the project into the folder iot-device-simulator and move into the folder on the command Prompt:
$ git clone https://github.com/Temmermans/iot-device-simulator.git iot-device-simulator && cd iot-device-simulator
-
Install all the necessary libs via the following command:
$ npm install
-
Start the local server with the following command:
$ npm run dev
-
Navigate to the following url on the localhost: localhost
If you an access-Control-Allow-Origin error install following chrome extension: Allow-Control-Allow-Origin and enable it, make sure the icon is green and then try again. If using other sites, makes sure to turn it off again.
For SDS projects, provide the necessary details in the SDS panel. With the correct credentials, you should see data coming in in the windows of yout SDS project.
If you skip the SDS project, the app will start streaming data to the following endpoint: '/simulator/data' as JSON. This can then be consumed by a front end tool capable of doing REST requests. Keep in mind that to use this, you will need to install mongodb on your local machine. (see above).
Every time you press the stop streaming button, the db will be flushed, to avoid taking up to much space when streaming regularly.
- Add support for more than SAP SDS
- Form Validation
- Document Walkthrough
- If no pictures are selected, give default
- ...