# Using the Demo App

## Testing the platform using the Web Demo

This chapter will describe the steps needed to test the Open Smart Grid Platform using the Web Demo Application.

If you followed the steps from the 'Platform Setup' then you can skip the following installation steps, because the Web Demo will already be available.

### Installing the Web Demo

* Open Eclipse and import the following folder as Maven project `/home/dev/Sources/OSGP/open-smart-grid-platform/public-lighting-demo-app/`
* Add the PublicLightingDemoApp components to the Tomcat Server.
* (Re)Start the Tomcat Server.

## Creating a device

To access the Demo App go to the following URL: `https://localhost/web-demo-app/`

If you encounter an Untrusted Connection page, go to 'I Understand the Risks' -> Add Exception.. -> Confirm Security Exception ![alt text](/files/SmPrB5ttC8f9HIyL5U9q)

![alt text](/files/94iVsV27sqTdGHabO25R)

Click the Add a Device button in the Menu bar, and enter `SSLD_000-00-01` at the Device Identification field and press Submit.

![alt text](/files/deAUqtiK4qJCDhAeUeuQ)

The following screen will appear, it shows that the device has been successfully added to the Platform.

![alt text](/files/V4WVeWyAm44Tz2rHo9jX)

## Opening Device Simulator to Add a Device

In order to be able to use the SSLD-000-00-01 Device, the device needs to be simulated in the Device Simulator. To do this we have to create it. In the Firefox Browser, open the Device Simulator by going to the following URL:

```
https://localhost/web-device-simulator/devices
```

Click Add Device ![alt text](/files/v3191wBEjsahZyTRSKP1)

Fill out the fields like this:

* Device Identification: SSLD\_000-00-01
* IP Address: 127.0.0.1
* Device Type: SSLD
* Protocol: OSLP\_ELSTER

Click Create Device ![alt text](/files/fzmQ3LsNKIyavFFmSC1p)

You should return to the Devices screen and see the message "Device with identification SSLD\_000-00-01 was created."

![alt text](/files/jW3dTTlrdQTij7wfLpaT)

## Registering a Device

Now click on the newly created device and click the 'Register Device' button. After a while the message "Device identification with identification SSLD\_000-00-01 was registered at XXXXXXXX" appears. ![alt text](/files/67dgBIxkUR1xONiYQ7oA)

Then click the 'Confirm Registration' button. The message should read: "Device with identification SSLD\_000-00-01 was confirmed to be registered."

![alt text](/files/NyYwYKTdISkiA004Dt40)

## Using 'SetLight' Switch the Light On

Now that the Device is known in the platform, and simulated in the Device-Simulator, the device can be used. Let's switch on the Light. Go to the Demo App and press the List button in the Menu. A list should appear, showing the device that has just been added using the Add Device button.

![alt text](/files/mLM6Srk2wq5w0AsPOR11)

Click on the Manage button to access the Device Details.

![alt text](/files/UYBVjAkrgS0O5F7dA4GM)

Switch on the Light by setting the Light Value to 100 and by checking the 'LightOn' checkbox (as shown in the screenshot below)

![alt text](/files/N8w4jULG45PaqVuhd7Ts)

Hit submit to submit the request to the Platform. The following screen should appear:

![alt text](/files/kbxeT3SQbRIaBpRL5tDM)

In the home screen of the OSLP device simulator, the lightbulb should light up for SSLD\_000-00-01. This means that the request succeeded.

![alt text](/files/tfvYxsvyKJ74X5jXcfgX)

This step also concludes the installation manual.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://grid-exchange-fabric.gitbook.io/gxf/userguide/installationguide/request/testosgpdemoapp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
