-
Notifications
You must be signed in to change notification settings - Fork 1
socket.io module
doomke edited this page Aug 24, 2023
·
10 revisions
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.
| 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. Default: /socket.io/?EIO=4
|
| 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 |
This module is passive and does not accept commands, only reacts to internal events.
This module provides no status information.
-
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 anAuthevent