Each starter bundle has quickstart.sh script that sets up Predix services in the cloud, builds the bundle and injects it into the pre-configured Predix Machine tar ball so that you can quickly get started sending data from Predix Machine to the cloud and visualize the data in a UI.
Follow the tutorials for Edge Starters.
- Scroll down, look for Edge Starters and choose the device you are interested in.
If you don't see an Edge Starter for a board you are interested in you can easily create one by following the example in the repo predix-machine-template-adapter.
- git clone https://github.com/PredixDev/predix-machine-template-adapter.git
- In the template project, review the quickstart.sh script. Notice the call to the predix-scripts/quickstart.sh script that handles much of the heavy lifting for you.
- quickstart.sh -smf
- Logs in to your Predix Cloud space
- Creates a UAA and a client-id and a user
- Creates a Time Series instance and add authorities to the client-id
- Creates a Predix Asset instance and add authorities to the client-id
- Creates a simple UI NodeJS app to view the data
- Downloads a Predix Machine
- apply the device specific changes - this is where you can customize the quickstart script to your devices needs
- SampleDataNode.java - You can configure the device apis to connect to sensors
- SampleMachineAdapter.java - You have to implement the readData method to read data from the sensor using your device api
- quickstart.sh -t
- Tar (zip) up the Predix Machine with the device specific behavior
- Copies the tar to the device
- Review the contents of the config folder. This is where important property files for Predix Machine are located and your script can replace those files in the downloaded Predix Machine.
- Review and change the MachineAdapter.java file to retrieve data from the Device APIs and forward that data to the Spillway.
- Contribute the Starter back to us and we can share it in the community
- Post a github Issue here and we'll take a look!
- Adapter Framework - https://github.com/PredixDev/predix-machine-template-adapter
- Adapter for Edison - https://github.com/PredixDev/predix-machine-template-adapter-edison
- Adapter for Raspberry Pi - https://github.com/PredixDev/predix-machine-template-adapter-pi