Skip to content

socket.io module

doomke edited this page Aug 24, 2023 · 10 revisions

Description

Aims to establish and maintain a connection to a specified socket.io server, tries to recover if a connection attempt is unsuccessful. Handles further steps needed for the socket.io connection, including time synchronization and creation of JWT tokens.

Settings

setting type default range description
ip String "192.168.178.1" IP address of the socket.io server the module will try to connect to
port integer 3000 > 0 port of the socket.io server
url String "/socket.io/?EIO=4" URL to establish the socket connection, may contain further parameters
key String "key" shared secret between the socket server and the client, used to authenticate connection
component String "XRTL_ESP32" ID to identify the hardware, will be used as hostname for the WiFi
useSSL boolean false will try to establish an SSL connection if true, no encryption if false

Command Keys

This module is passive and does not accept commands, only reacts to internal events.

Status

This module provides no status information.

Events

  • socket disconnected – occurs when the socket was disconnected or a connection could not be established within the timeout window (5 s)
  • socket connected – occurs when a connection to the socket server was established successfully
  • time synced – occurs when the time has been synced to an NTP or socket server
  • socket authed – occurs when the client was successfully authenticated by the server as acknowledged by an Auth event

General

Guides

Principle of Operation

Modules

Software Hardware
camera camera
infoLED infoLED
input input
macro macro
output output
servo servo
socket socket
stepper stepper
WiFi wifi

Clone this wiki locally