A simple and extensible framework for ESP32 based IoT projects with a feature-rich, beautiful, and responsive front-end build with Sveltekit, Tailwind CSS and DaisyUI. This is a project template to get you started in no time with a fully integrated build chain.
Closes #29 that states that the current setup requires up to 3 concurrent connections to the server per user, which limits the number of total users. This pr replaces NotificationEvents with EventSocketwhich can
Broadcasts arbitrary data to all connected clients
Emits events with payload
Pushs toast notifications (like in the old EventNotifications.h) to all clients
Accepts event data from the client and call the callback of the concerning stateful service
Handles both websocket and SSE
This make it possible for a client to subscribe to a number of events/topics that is of interest. This can be done in +layout.ts or as per route. This saves bandwith as only relevant data is sent to the client
Overall changes:
Adds Socket.ts - New Websocket event emitter client
Adds EventSocket - New Websocket event emitter server
Removes NotificationEvents
Updates WebSocketServer - Use new EventSocket
Updates AnalyticsService - Use new EventSocket
Updates BatteryService - Use new EventSocket
Updates DownloadFirmwareService - Use new EventSocket
Updates WifiSetttingsService - Use new EventSocket
Purpose
Closes #29 that states that the current setup requires up to 3 concurrent connections to the server per user, which limits the number of total users. This pr replaces
NotificationEvents
withEventSocket
which canThis make it possible for a client to subscribe to a number of events/topics that is of interest. This can be done in
+layout.ts
or as per route. This saves bandwith as only relevant data is sent to the clientOverall changes:
Socket.ts
- New Websocket event emitter clientEventSocket
- New Websocket event emitter serverNotificationEvents
WebSocketServer
- Use newEventSocket
AnalyticsService
- Use newEventSocket
BatteryService
- Use newEventSocket
DownloadFirmwareService
- Use newEventSocket
WifiSetttingsService
- Use newEventSocket
LightStateService
- Use newEventSocket