greenhouse1.png (777450 bytes)
greenhouse2.png (1111358 bytes)
settings.png (6591 bytes)
simuvalues.png (1111358 bytes)
targetvalues.png (777450 bytes)

Download project

Greenhouse Simulator

This example shows cloud communication with AWS Service 'AWS IoT Core' using a greenhouse simulator.

Product description

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.

More information about 'Device Shadows' can be found here: https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html

Getting started

  1. Download and install the CODESYS Package 'IIoT Libraries SL' from the CODESYS Store, see https://store.codesys.com/de/iiot-libraries-sl.html
  2. 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'.
  3. Open the example project 'Greenhouse Simulator.project'.
  4. Set your AWS IoT Core endpoint to the variable 'Main.sEndpointName'.
  5. Download and run the application.
  6. Open http://localhost:8080/webvisu.htm in a web browser.
  7. Click to switch to the configuration view.
  8. Set the target values
  9. Click 'Apply Changes' and press to switch to the observation view.
  10. Watch the simulated values for the selected greenhouse.

System requirements and restrictions

System requirements and restrictions Info
Programming System CODESYS Development System Version or higher
Runtime System CODESYS Control Version
Required Accessories -CODESYS Package 'IIoT Libraries SL', see https://store.codesys.com/de/iiot-libraries-sl.html
-AWS Account with access to 'AWS IoT Core'