This example shows cloud communication with AWS Service 'AWS IoT Core' using a greenhouse simulator.
The example uses a greenhouse simulation to demonstrate the communication with the AWS Service 'AWS IoT Core' via the library 'AWS IoT Core Client SL' which is part of the product 'IIoT Libraries SL'. The program simulates two greenhouses reading the target values from the cloud and sending the actual values to the cloud. The visualization of the 'Observation and control unit' (OCU) can be used to monitor actual values of the greenhouses and write target values to the greenhouses.
The program needs three devices on 'AWS IoT Core', two for the simulated greenhouses and one for the control unit. The simulators and the control unit are implemented via function blocks and can be operated independently of each other. In the example, the function blocks are called via a single program. The control unit (OCU) has a visualization to set target values (Configuration view) and monitor actual values (Observation view). The values are stored in 'AWS IoT Core' via 'Device Shadows'. A "Device Shadow" is a JSON file with the actual and the target values.
The first thing to do with 'AWS IoT Core' is to create three devices with classic device shadows ('Greenhouse1', 'Greenhouse2' and 'GreenhouseControlUnit') and set up the certificates. A detailed description how to use certificates can be found in the product data sheet of the library 'AWS IoT Core Client SL' of the product 'IIoT Libraries SL'.
Open the example project 'Greenhouse Simulator.project'.
Set your AWS IoT Core endpoint to the variable 'Main.sEndpointName'.