Skip to content

socket.io module

doomke edited this page Jul 11, 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 range description
ip String $-$ IP address of the socket.io server the module will try to connect to
port integer > 0 port of the socket.io server
url String $-$ URL to establish the socket connection, may contain further parameters. Default: /socket.io/?EIO=4
key String $-$ shared secret between the socket server and the client, used to authentify connection
component String $-$ ID to identify the hardware, will be used as hostname for the WiFi
useSSL boolean $-$ 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 succesfully
  • 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