Menu

2_Configuration

Tobias W.

Device Configuration

To reach the configuration Page, just click "configure me" on the default page.
If the device is not configured yet, the configuration page will open automatically.

You'll find the following configuration items:

Station data

-Station Name
Name of the device as it appears on the website. Will also be used for mDNS and as client-id for mqtt. Mandatory field.

-Propagate via mDNS
Propagate the station name via mDNS in the format stationname.local, e.g. toiswitch.local

-Station Password
Password for accessing the device. Mandatory field.

-Use password to authorize actions
If you set this to yes, you will be always prompted for a password before accepting any changes made via web-interface.

-Timezone string
Set appropriate timezone string for your location.
List can be found at https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv
Default points to Europe/Berlin.

-Power on profile
Profile to be executed when device is powered on. If set to "none" the last state will be restored.
If a profile is set here, and MQTT is used, activating the power on profile will be published via MQTT as command in publisher mode or as info on response channel in subscriber mode.
Useful i.e. for lamps, which can be externally powered on/off to tell other devices if the lamp is switched on.

Sunrise/set calculation

Calibration values for sunrise and sunset calculation are given here.

Four values are needed:

Sunrise at 23th of june, sunset at 23th of june, sunrise at 23th of december and sunset for 23th of december.
Lookup these values for your location for example using https://www.sunrise-and-sunset.com or https://gml.noaa.gov/grad/solcalc/
and enter them within the corresponding fields.
Defaults are for Frankfurt(Main) / Germany.

Low power limit

Only available on devices using a supported power measurement circuit. See power measurement page for details.

High power limit

Only available on devices using a supported power measurement circuit. See power measurement page for details.

Power measurement

Only available on devices using a supported power measurement circuit. See power measurement page for details.

Control

Mode has three options:

-local: Control the device only via local web interface

-mqtt full: Device can be controlled via local web interface or MQTT.
Commands given via local web interface are executed and send to other devices via MQTT.
This makes it easy to control multiple devices using a single web interface.
Commands include: Port status changes, activate/add/del profiles, add/del/edit planned actions.
There are a few restrictions:
--Port-related commands will be only executed on other devices if they have a port with the same name available.
--When editing a profile, this profile will be fully edited only locally. On other devices this profile will be re-written with the actual port status of these devices.
So its best practice to set all ports on all devices in the correct status and then edit the profile.
--When editing or adding a planned action, this planned action will only be activated on other devices if they have the target (port or profile) available.

-mqtt subscribe: Device can be controlled via local web interface or MQTT. Commands given via local web interface are only executed locally but will be acknowledged via MQTT response topic.

This section needs to be filled only if you'd like to use MQTT. Otherwise you can leave the fields empty.

-MQTT broker URL:
Enter the complete publisher address incl. port, e.q. mqtts://flespi.io:8883 here. MQTT and MQTTs are supported. Mandatory field for MQTT.

-MQTT username/password
Enter credentials here, if they are neccessary for your MQTT broker.

-MQTT topic
Enter the topic for receiving and publishing commands here. Mandatory field for MQTT.

-MQTT response topic
Enter the topic for acknowledging commands here.

-MQTT last will profile
If you configure a profile here, this profile will be activated if the device disconnects ungracefully but remains active.
The activation of this profile will be published via MQTT as command in publisher mode or as info on response channel in subscriber mode
by the MQTT broker via last-will message mechanism.
Useful i.e. for lamps, which can be externally powered on/off to tell other devices if the lamp is switched off.
Depending on your MQTT broker's configuration it can take some time from the ungraceful disconnect until this message is published.

Wlan data

-SSID
Enter the name of your wlan here. Mandatory field.

-Password
Enter the password of your wlan here. Leave empty if your WLAN is unencrypted. Encryption is supported using WPA/WPA2 only.
Currently WPA3 is not supported.

If the device cannot connect to the wlan within 30 seconds it will connect to the wlan it was connected before or will re-open the access point for initial setup again.

Network data

-Obtain IP config via
Set to DHCP if your network parameters are propageted via DHCP.
If you dont use DHCP set to STATIC and fill in the fields for
IP, Subnet, Gateway and DNS manually.
All fields except of DNS2 are mandatory.

Firmware settings

-Do firmware update
If set to yes, the device will start a firmware update. The ports will keep their state during the update.
After the update you'll find a notice within the footer if the update was successful or not.
Beginning in V1.20 there's also the option to revert an update in case of problems.
When choosing this option the software reverts the update and restores the configuration and the Firmware
to the state
before the last update.
This only will only be displayed if both the old and the new version are minimum v1.20.

-Update URL
URL used for Over-the-air update. Should be left on default unless you prefer to use your own OTA server.
OTA is supported ONLY using secure HTTP (https) with TLSV1.2 and modern ciphers.

-Station type
Type of device.
This field can be only set on a fresh installation or after a factory reset. Be sure to use the correct device here.
Doing a wrong setting can damage your device!
Own devices can be created within init.c, after that you need to re-compile and re-install.

-Restart device without config save
If you set this to yes, the device will reboot without saving changes in the configuration.

After finishing configuration click "SAVE" button.
The devices saves the new configuration and may restarts.
During restart the port status is kept.
If you click "GO BACK" the config changes will be discarded.

If the configuration is invalid, you'll be redirected to the config page again and the problematic fields are marked red.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.