ayatec logo
Home Store Blog Contact
unicontrol user guide by ayatec
Home Store Blog Contact

Topics

  1. Welcome
  2. Getting started
    1. What is unicontrol
    2. How it works
    3. Connectivity
    4. Integration options
    5. Basic I/O
    6. Special I/O
    7. Special inputs - Digital sensors
    8. Special outputs - RGB driver
    9. Special outputs - Audio driver
    10. Network API - HTTP
    11. Network API - MQTT
    12. Network security
    13. Downloads
  3. Web Interface
    1. Processes
      1. Process
      2. Name
      3. Main state
      4. Initial state
      5. Display
      6. Constraints
        1. Process timer
        2. Variable contraints
        3. Force output
      7. Input
        1. Input source
        2. Channel
        3. Control period
        4. Value
        5. Publish
        6. Frequency
        7. Subtopic
      8. Events
        1. On/Off event
        2. Condition
        3. Idle/running time
        4. Delay on/off
        5. Fade in/out
        6. High/low input
        7. Mid point/Tolerance
        8. Out on when
      9. Output
        1. Primary output
        2. Action
        3. Type
        4. Invert
        5. Duty cycle
        6. Mem value
        7. High/low output
        8. Folder/Track
        9. RGB mode
        10. RGB color
        11. RGB brightness
        12. RGB speed
        13. Publish
        14. Subtopic
        15. Secondary outputs
      10. Cycle
        1. Cycles
        2. High/Low phase
      11. On/Off button
    2. Peripheral
      1. Hardware
      2. Type
      3. Calibration
      4. Mapping (edit)
      5. IR remote (edit)
      6. Impulse_counter (edit)
      7. RGB driver (edit)
      8. DS18B20 (edit)
    3. Device
    4. Network
    5. System
    6. License
  4. Tutorials
    1. First boot
    2. First process
    3. Connect to MQTT
    4. Process sequencing

    5. DIY Project: Bath Fan

In this article

  • Introduction
advert
unicontrol > Getting Started > Connectivity

Connectivity

Accessing a bare ESP8266ESP32-S3 can be challenging as they lack physical interfaces, such as a touch display or keyboard. To make up for this deficiency, there are multiple distinct ways the unicontrol device can be accessed, each with varying capabilities. First, there are basic or emergency methods for accessing a new or otherwise inaccessible device:

  • Wi-Fi AP mode allows for wireless connection to the ESP8266ESP32-S3 using a computer or mobile device.
  • Serial port takes advantage of a USB cable connection to a computer.

Once an Ethernet or a stable wireless STA connection to the network is established, there are three main protocols available for communicating with the device:

  • Web interface is the main, user-friendly option for the complete device setup during installation or maintenance.
  • HTTP API provides complete control over all aspects of the device using an exhaustive set of HTTP requests, ideal for integrating the device with third-party overarching systems.
  • MQTT API enables access to basic telemetry, parameters, and commands over the network or the internet, making it ideal for daily use.
Both HTTP and MQTT APIs are fully capable of integrating the unicontrol into third-party tools like the popular Node-RED or Home Assistant.

Ethernet

The unicontrol's Ethernet connection is specifically designed to allow reliable communication with the device via the Web interface, HTTP API, or MQTT API using cable and with no compulsory prior network set-up. This mode is particularly useful when the device is fitted with the compatible W5500 mini module and the cable connection is available.

Same functionality can be achieved with any ESP32-S3-based device or kit by connecting the W5500 to the MCUs GPIO pins according to the following schematic.
Wiring scheme for the W5500 module.
W5500 wiring
Please note that the wiring between W5500 and ESP32-S3 is fixed in unicontrol and cannot be modified.

Whenever the W5500 module is available and it is connected to the network via an Ethernet cable, the unicontrol will automatically maintain connection to the network. The IP address assigned to the device can then be found either via Serial interface, Display, or the router's client list.

Wi-Fi Station mode

The Wi-Fi STA mode is the standard operation mode of the unicontrol device, which is the device's primary operating mode. In this mode, the device connects to a wireless network and becomes accessible wirelessly within the local network via the Web interface, HTTP API, or MQTT API.

By default, the device will notify its user of an active connection to one of the saved wireless networks by shortly flashing its on-board LED two or three times every 10 seconds. If the System LED flashes only once in its 10-second cycle, the connection is missing, and user intervention may be needed.

It is worth mentioning that once fully configured and (optionally) activated, a connection to the local wireless network or the internet is not necessary for normal operation, as long as the wireless access is not required by the user. The device's Wi-Fi module can even be switched OFF by default, arbitrarily changeable with the System Button during runtime, always reverting to the default state after reboot.

Wi-Fi Access Point mode

The unicontrol Wi-Fi AP mode is specifically designed to allow access to the device via standard channels, such as the Web interface or HTTP API without relying on any network infrastructure. This mode is particularly useful when the device is newly Flashed with unicontrol software, reset to factory defaults, or when the Wi-Fi STA connection has been lost for any unforeseen reason. In AP mode, the device behaves as an independent Wi-Fi Access point, making itself easily accessible without depending on established networks. There are two options for activating this mode:

  • Short-press the System Button (exited by pressing the same button two more times).
  • Briefly pressing the System Button cycles between Wi-Fi's STA, AP, and OFF modes. If the display's screensaver mode is active, the first brief press deactivates the screensaver before the cycle can proceed.
  • Send the wifi AP command via the Serial port (ended by rebooting or sending the wifi STA command).
While in AP mode, the System LED will make one long flash every 10 seconds if in use.

To connect to the device's wireless network, use the following credentials:

  • SSID: The device Name with the addition of the suffix AP (default: my_uniAP).
  • Password: The device Password (default: passw123).
Connecting to unicontrol in Wi-Fi AP mode.

Once connected, the most crucial Device, Security, and Wi-Fi settings of the unicontrol can be accessed at the address 192.168.1.1, as shown in the screenshot below.

Providing the correct SSID 1 and Password 1 followed by a reboot is usually sufficient to restore the standard STA connection.
AP mode control page.

Serial port

The Serial port interface is designed to provide a last-resort access method to the device. In addition to providing debugging information via the Serial port, the device accepts commands listed in the table below.

Separate the command and its parameter with a single space.
To access the unicontrol device via the Serial COM port, you can use any standard serial console such as PuTTY or similar software. One of the most reliable and easiest alternatives has proven to be Arduino IDE's Serial Monitor.
To change the primary Wi-Fi password to "mynewpass" you can send the following line over the device's COM port: wifissid1 mynewpass.
Command Parameter Action
wifissid1[WIFI SSID]Changes the SSID of the primary wireless network to [WIFI SSID].
wifipass1[WIFI PASSWORD]Changes the password of the primary wireless network to [WIFI PASSWORD].
wifissid2 [WIFI SSID]Changes the SSID of the secondary wireless network to [WIFI SSID].
wifipass2 [WIFI PASSWORD]Changes the password of the secondary wireless network to [WIFI PASSWORD].
eth infoReturns basic information about the current network connection via Ethernet cable.
resetReconnects to the network and MQTT broker (if applicable) via Ethernet cable.
reseteth
wifi infoReturns basic information about the current connection to the wireless network.
STAChanges the device's Wi-Fi to STA mode.
APChanges the device's Wi-Fi to AP mode.
OFFDisables Wi-Fi.
resetReconnects to the saved wireless network and MQTT broker (if applicable).
reset wifi
-Reboots the device.
factoryResets all device settings to their factory values.
© 2024 ayatec.eu • Found a mistake?  Let us know!