Skip to content

General Setup

Hardware Setup

Choose either the experimental setup to test the functions of Genius Gateway, or the Genius Gateway PCB to put Genius Gateway into operation.

Build and Install Software

IDE und Plugins

The project is based on the PlatformIO build system. Unfortunately, PlatformIO does not support Espressif Arduino 3.x .

Fortunately, there is piorduino : a community-maintained fork of the PlatformIO IDE for Visual Studio Code that provides support for Espressif microcontrollers, especially the newer ESP32 boards and the latest Arduino Core for them.

  1. Download and install Microsoft VSCode .
  2. Install Pioarduino IDE (pioarduino) extension from within VSCode.

Clone GitHub Project

  1. Clone the project to your local environment

    git clone https://github.com/hmbacher/genius-gateway.git
    

  2. Open the project in VSCode

    cd genius-gateway
    vscode .
    

Configuration

Target board

Choose the board you are working with in platformio.ini file by (un)commenting the appropriate default_envs options:

[platformio]
description = Genius Gateway - A gateway for Hekatron Genius Plus X smoke detectors
data_dir = data
extra_configs = 
    factory_settings.ini
    features.ini
    config.ini
;default_envs = esp32-s3-devkitc-1
;default_envs = esp32-s3-devkitc-1-n8r2
default_envs = seeed-xiao-esp32s3

No PSRAM used

Since PSRAM is not necessary or not used by Genius Gateway, it is not necessary to create variants of esp32-s3-devkitc-1 (e.g., esp32-s3-devkitc-1-n8r2).

SPI bus wiring

Depending on the technical setup, the SPI bus-related signal lines may need to be adjusted. This is done via the config.ini file:

[config]
build_flags = 
  ; --- Espressif ESP32S3 DevKit-C 1 ---
  ; -D CONFIG_CSN_GPIO=45   ; blue
  ; -D CONFIG_MISO_GPIO=11  ; yellow
  ; -D CONFIG_GDO0_GPIO=47  ; gray
  ; -D CONFIG_MOSI_GPIO=13  ; brown
  ; -D CONFIG_SCK_GPIO=12   ; white
  ; -D GPIO_TEST1=21
  ; -D GPIO_TEST2=14
  ; --- XIAO ESP32S3 & Genius Gateway PCB 1.0 ---
  -D CONFIG_CSN_GPIO=5
  -D CONFIG_MISO_GPIO=8
  -D CONFIG_GDO0_GPIO=6
  -D CONFIG_MOSI_GPIO=9
  -D CONFIG_SCK_GPIO=7
  -D GPIO_TEST1=1
  -D GPIO_TEST2=2
  -D GPIO_TEST3=3
  -D GPIO_TEST4=4
  ; Common
  -D HOST_ID=1

More build options

The platformio.ini file is the main file for controlling the software build. It references three additional files whose content is evaluated by the build system: - features.ini - factory-settings.ini - config.ini

Critical

Settings can be made in the listed files that affect the build and the later functionality of the Genius Gateway.

For regular functionality, no adjustments beyond those described above need to be made.

Build

Build Software

Start the Build task for the corresponding project environment (target device):

Execute Build

Flash Software

Make sure you have properly connected the board to your computer via USB cable. A serial device must appear in the systems devices.

Start the Upload and Monitor Task and pick the right serial interface if asked:

Execute Upload and Monitor

After the device has been successfully flashed, it will restart and you will see its serial output in VSCode's terminal window.

Initial Configuration of Genius Gateway

After the first startup, the device has the settings stored in factory_settings.ini .

The device creates its own WiFi network with the SSID Genius-Gateway-XXX and the password genius-gateway. The Genius Gateway web interface can be accessed via the IP address 192.168.4.1 .

The default password for the admin account is admin.

WiFi Settings

Genius Gateway can be integrated into an existing WiFi network.

Users

By default, two users are created: an admin account with elevated privileges and a guest account with limited privileges.

Additional users can be created with their own username and password. See the Users page for details on managing user accounts.

Change JWT Secret

For security reasons, it is strongly recommended to change the default JWT (JSON Web Token) secret after initial setup. The JWT secret is used to sign authentication tokens and should be unique for your gateway.

To change the JWT token, navigate to the Security Settings section on the Users page and enter a new JWT secret value. Note that changing the JWT secret will sign out all users immediately.

How to get a secure JWT Secret

You can generate a cryptographically strong JWT secret using an online tool such as RandomKeygen . Use a Fort Knox Password (256-bit or higher) for maximum security.

MQTT

For integration into a smart home system, the local MQTT broker must be configured. See the MQTT Settings page for details on configuring the MQTT connection.