This is sample code, for non-production usage. You should work with your security and legal teams to meet your organizational security, regulatory and compliance requirements before deployment
This demo shows how to generate new digital capabilities for existing machines and process setups by connection a Pepperl+Fuchs IO-Link master to the AWS cloud. We register the data in AWS IoT Sitewise, a service build to ingest and analyze industrial data.
- Pepperl+Fuchs IO-Link master model ICE3-8IOL-G65L-V1D
- Pepperl+Fuchs IO-Link distance sensor model OMT550-R200-2EP-IO-V1
Both components are also part of the Pepperl+Fuchs 'IO-Link Starter Kit'.
Setup instructions use AWS CLI.
If you prefer to build the stack using the console, uncollaps below section:
Expand for details on manual provisioning
Click this link to get to the stack creation page in the AWS console.
You can follow these instructions using the Option "Upload template".
- If parameters contain default values, leave them as they are for this demo.
- Once created, check the outputs tab of the stack for links to required inputs.
Below command will create the stack, download the certificate and private key and output the IoT endpoint to be used.
Tip
For production scenarios, you might want to consider creating a domain name for the endpoint.
cd demo-setup
sh deploy.sh -o c # c = create, u = update, t = delete
cd -Expand for details
This addon stack takes the status messages of the device and turns it into device shadows to persist them.To provision the addon use these commands
cd device-shadow-addon
sh deploy.sh -o c # c = create, u = update, t = delete
cd -Expand for details
This addon stack sends an Email via SNS in case the device's last will message is emmitted by the broker due to an ungraceful disconenction of the device. Make sure to confirm your subscription through the email you will receive upon subscription is created.To provision the addon use these commands
cd last-will-addon
sh deploy.sh -o c -e INSERT-YOUR-EMAIL # -o: c = create, u = update, t = delete
cd --
Download IODD for the distance sensor from the iodd-finder.com website
-
Connect the master to your powersupply and network. Lookup the manuals of the cables or powersupply if you need further advise. They can be found on the Pepperl+Fuchs website.
-
Connect the distance sensor to port 1
-
Open the webinterface in your browser by entering the IP adress. The IP to use is printed on the device. In case the default IP cannot be used in your network, lookup how to change default IP in the manual of the device.
-
Enable MQTT
The required certificate and key can be found in the./demo-setup/certfolder of the project that was created as part of thedeploy.shscript run. The required IoT endpoint will also be outputed by the script.
Open the MQTT test client ion the AWS console.
Make sure you are in the proper region!
Use option 'Subscribe to a topic' and use iolinkdata/ice3/# as a topic filter.
You now will see the sensor data incoming, e.g. here a sample of the sensor measurements:
{
"port": 1,
"valid": 1,
"uint": 270859269,
"P_ProcessData0": {
"MV___Distance": 4132,
"Scale": -4,
"SSC1___Switching_Signal_1": true,
"SSC2___Switching_Signal_2": false,
"Signal_Quality_Indicator": 1
},
"raw": [
16,
36,
252,
5
]
}In the AWS IoT Sitewise console you now can see the incoming data

You can also use the Sitewise API, e.g. by running following command in AWS CLI to get data of last 5 minutes.
time_now=$(date +%s)
five_minutes_before=$((time_now - (5 * 60)))
aws iotsitewise get-asset-property-value-history \
--property-alias "iolinkdata/ice3/port/1/pdi" \
--start-date $five_minutes_before \
--end-date $time_now
The architecture can be extended in various ways:
- AWS IoT Greengrass enables data processing at the edge before transferring it to AWS Cloud or other applications
- Applications can subscribe to or receive forwarded data
- Data visualization
- Integration of language models via Bedrock Agents (checkout this repo: https://github.com/aws-samples/aws-iot-sitewise-conversational-agent)
- Use of data in other applications through the SiteWise API
- Data export to Amazon S3 for further use, e.g., through analytics applications






