ruuvi / ruuvi.gwui.html

Ruuvi Gateway web UI
BSD 3-Clause "New" or "Revised" License
5 stars 9 forks source link

ruuvi.gwui.html

Ruuvi Gateway web UI

This repository contains files related to the web interface of the Gateway configurator.

Pre-requisites:

Gateway simulator

For the UI testing, a Gateway simulator can be used.

Pre-requisites:

Setup venv

Run simulator

To test UI, open in web-browser: http://127.0.0.1:8001 Use default password to access the UI: 00:11:22:33:44:55:66:77

On the 'Wi-Fi Networks' page you can simulate connection to Wi-Fi network. Choose Wi-Fi 'Pantum-AP-A6D49F' with password 12345678.

On the 'Custom Server' page use URL 'https://network2.ruuvi.com/record' to simulate connection with a custom HTTP server. To check authentication use URL 'https://network.ruuvi.com/record1' with username 'user1' and password 'pass1'.

On the 'Software Update' page under 'Advanced settings' you can use one of the following URLs to simulate checking for firmware updates: 'https://network.ruuvi.com/firmwareupdate', 'https://network2.ruuvi.com/firmwareupdate'.

On the 'Automatic Configuration Download' page you can use one of the following URLs to simulate downloading configuration from the remote server:

======================================

Testing HTTP requests from the Gateway

To test connection from the Gateway to HTTP server you need to run an HTTP server on your PC.

You can use http_server_auth.py script to run HTTP server.

Pre-requisites:

Examples of running HTTP server

To test connection from the Gateway to HTTP server, use http_server_auth.py

Configuring Domain Name (if you don't have a registered domain)

If you don't have a registered domain name and you want to simulate a domain locally, you can achieve this by using mDNS in your local network.

Here's how you can install and configure mDNS using Avahi on Ubuntu:

To generate a certificate and a private key for HTTPS server (2048-bit RSA key) (server_cert.pem and server_key.pem):

To generate a certificate and a private key for the client (2048-bit RSA key) (client_cert.pem and client_key.pem):

Example of testing a gateway configured to transfer data via HTTP

Example of testing a gateway configured to transfer data via HTTPS