We provide a web based UI to simulate incoming traffic for the IoT Connector. This practical for:
Test, demonstrate and use the IoT Connector features even without real EnOcean devices. e.g. test egress connectivity, simulate traffic.
Debugging connections / deployments
The main uses cases for the simulation are:
- Add EnOcean devices to the IoTC device list.
- Simulate traffic from the added EnOcean devices via simulated ingress gateways.
The IoT Connector will process the simulated traffic and provide the results on the egress interface. The results are identical to a real-world scenario traffic. This EnOcean devices can be simulated:
The simulation UI is provide in two containers. The demo container and its backend. The demo containers are deployed separate and can be removed anytime. We do not recommend to have the containers running at real deployments. The demo containers will connect to your IoT Connector containers and simulate the traffic.
The demo containers need to deployed after the IoT Connector has been already deployed. Deploy the IoT Connector first.
Deploy the Simulation UI¶
- If not yet done, clone this repository
git clone https://bitbucket.org/enocean-cloud/iotconnector-docs.gitor download the repository files. This should be downloaded to a directory in which you have edit and execute files rights.
The the demo containers can be theretically deplyed anywhere, given that the IoT Connector is reacheable from that location. For simplicity we recommed you deploy the demo containers in the same docker enviromenth as the IoTC.
To delopy the demo constainers follow this steps:
- Go to the
docker-compose.ymlfile and add the following environment variables:
Enter the credentials you have used during the IoTC deployment into the
demo_apicontainer. Use the:
demo_api: image: enocean/iotconnector_demo_api environment: - IOT_ENDPOINT_USERNAME=user1 # IoTC gateway username - IOT_ENDPOINT_PASSWORD=pass# # IoTC gateway password - IOT_API_USERNAME=user1 # IoTC api username - IOT_API_PASSWORD=pass # IoTC api password
[optional] If you deploy the the demo containers into a docker envirometnh different to the IoTC one. You have to change also the
demo_api: image: enocean/iotconnector_demo_api environment: # Use ´host.docker.internal´ when connecting to another docker container - IOT_AUTH_URL=https://host.docker.internal:8080/auth/aruba - IOT_API_URL=https://host.docker.internal/api.beta/v1/devices
IOT_AUTH_URLis the same as specified in the Aruba Setup as
authentificationURLor as specified in IoTC deployment for the paramter
https & /auth/arubae.g.
IOT_API_URLis the URL for the device API interface. The URL is
https://<hostname of the container group or IP address>/api.beta/v1/devicese.g.
Save the changes to the file.
- Now deploy the containers with the
docker composecommand. For local deployments use
docker-compose up -dfor cloud deployments check the IoTC deployment steps for reference.
- Open the demo web UI in the browser. If you have not changed the docker compose file it will be available at the URL
http://<IP address or hostname>:3000e.g.
- After you are done using the simulation we recommend to remove the demo containers by calling
Use the Simulation UI¶
Once you deployed and opened the web UI in your browser you should the starting page. During the process of simulation you can track the behaviour for reference on the logs and also get data from the management API web UI. The simulated traffic will be available on the specified egress interface in JSON.
Reloading the web UI page will restart the simulation and all steps needs to be repeated.
To simulate device and their traffic follow these steps:
Add devicein the top bar or click on the
When you press on Configuration you can see the devices IoTC configuration. You can change the devices
When done press
Add Deviceon one or both devices. By doing so he demo containers will try to communicate with you IoTC.
You should see the infromation about this communication in the
The added devices via the demo will be listed as onboarded devices inside the IoTC. You can check by using the API web UI and call e.g
GET backup. The added devices should be listed there. If not check the container logs for possible error reports.
By scroling down or clicling on
SIMULATEyou can now triggert simulated device data reports.
You can change the reported paramters value of the STM 550. By clicking on
REPORTdata transmission will be simulated.
By clicking on a switch nibble possition e.g.
A0and press and release telegrams will be simulated.
The devicess are reported by two different simulated gateways. You can see the details of the gateways below the product name. e.g.
NAME: EnOcean Demo Gateway
MAC: 8785d7f776a5. The gateways are known to the IoTC. You can check by using the API web UI and call e.g
GET gateways. The used gateways should be listed there. If not check the container logs for possible error reports. The gateways will not provide any Health messages updates.