110 Commits

Author SHA1 Message Date
e60093c419 Merge pull request 'feature/base-firmware-size-optimization' (#18) from feature/base-firmware-size-optimization into main
Reviewed-on: #18
2025-11-04 12:18:31 +01:00
633957c95c feat: configurable PixelStream 2025-10-28 21:05:02 +01:00
ad879bfe7b feat: remove CpuUsage calculation 2025-10-27 10:38:56 +01:00
4559e13d7d fix: revert RAW message 2025-10-27 07:48:06 +01:00
682849650d Merge pull request 'feat: new cluster protocol, event naming' (#17) from feature/cluster-protocol-update into main
Reviewed-on: #17
2025-10-26 12:51:41 +01:00
0f003335b3 feat: new cluster protocol, event naming 2025-10-26 12:43:22 +01:00
eab10cffa5 Merge pull request 'refactoring/firmware-optimizations' (#16) from refactoring/firmware-optimizations into main
Reviewed-on: #16
2025-10-21 13:51:03 +02:00
7f40626187 feat: improve local node initalization 2025-10-21 11:19:12 +02:00
e796375a9f feat: memberlist optimization 2025-10-21 10:50:46 +02:00
daae29dd3f refactor: update local node 2025-10-20 21:35:08 +02:00
37a68e26d8 refactor: remove unused and obsolet stuff 2025-10-20 21:21:02 +02:00
7bd3e87271 Merge pull request 'feature/improved-cluster-forming' (#15) from feature/improved-cluster-forming into main
Reviewed-on: #15
2025-10-19 17:47:05 +02:00
0d09c5900c docs: update 2025-10-19 16:55:48 +02:00
407b651b82 feat: change event naming schema 2025-10-19 13:48:13 +02:00
23289d9f09 fix: latency calculation 2025-10-19 13:11:36 +02:00
b6ad479352 feat: calculate latency during heartbeat 2025-10-19 12:59:26 +02:00
3ed44cd00f feat: improve cluster forming; just use heartbeat to form the cluster 2025-10-19 12:50:43 +02:00
ce70830678 fix: neopattern example wdt reset 2025-10-18 13:49:39 +02:00
b404852fc7 feat: GET node config endpoint 2025-10-15 22:36:20 +02:00
7063b1ab16 feat: persistent custom labels 2025-10-15 22:23:00 +02:00
1a74d1fe90 Merge pull request 'feat: persistent config' (#14) from feature/persistent-config into main
Reviewed-on: #14
2025-10-15 21:56:34 +02:00
993a431310 feat: persistent config 2025-10-15 21:52:24 +02:00
7a7400422e Merge pull request 'feature/refactoring' (#13) from feature/multimatrix-example into main
Reviewed-on: #13
2025-10-14 18:17:23 +02:00
a45871625e refactor: harmonize method names 2025-10-14 18:01:37 +02:00
52f9098c1b feat: example with multiple various functionallity 2025-10-08 12:25:31 +02:00
0fcebc0459 feat: multimatrix example 2025-10-04 13:54:06 +02:00
d07c1f40de chore: move neopattern tests, add new pixelstream scripts 2025-10-03 21:45:26 +02:00
3077f8685b feat: tetris test 2025-10-03 21:41:05 +02:00
3ff5df5a6f Merge pull request 'feat: udp stream' (#12) from feature/udp-raw into main
Reviewed-on: #12
2025-10-03 21:20:31 +02:00
be1a2f1e21 feat: add snek game pixel stream example 2025-10-03 21:20:10 +02:00
1383f6d32f feat: even more matrix stream examples 2025-10-02 22:08:40 +02:00
d1fb5fc96e feat: more matrix stream examples 2025-10-02 21:46:51 +02:00
f78dd8b843 feat: matrix stream example 2025-10-02 21:36:46 +02:00
f3d99b174f feat: udp stream 2025-10-01 22:34:32 +02:00
99e7ed4809 feat: do not store each infos of each node 2025-10-01 20:45:55 +02:00
dbb3b5bfd3 Merge pull request 'feature/streaming' (#10) from feature/streaming into main
Reviewed-on: #10
2025-09-29 06:29:11 +02:00
2aa887a037 docs(streaming): add 'Things to consider' on high-frequency WS usage and throttling
Notes on heap fragmentation, UDP saturation, throttling/coalescing, buffer reuse, yielding, and payload sizing for reliable streaming/broadcast.
2025-09-28 22:10:18 +02:00
49fe0dabf4 remove node_modules 2025-09-28 22:07:07 +02:00
c0bf16fecb chore(test): remove accidentally committed test/node_modules and ignore it 2025-09-28 21:50:39 +02:00
af46b5c2f4 feat: update logging, add high performance example 2025-09-28 21:48:53 +02:00
7a37901fb2 feat(streaming): suppress WS echo via origin tagging
Inject _origin=ws:<clientId> into JSON payloads on inbound WS messages and strip it on broadcast while skipping the origin client. Documents behavior in StreamingAPI.md.
2025-09-28 21:23:05 +02:00
3cc5405292 feat(streaming): introduce WebSocket Streaming API bridging event bus
ApiServer: add AsyncWebSocket at /ws; accept JSON {event, payload} (string or object) and dispatch via ctx.fire; mirror all local events to clients using NodeContext::onAny.\nNodeContext: add onAny subscriber API.\nNeoPatternService: add api/neopattern/color event to set solid color.\nCluster: centralize cluster/broadcast sending in core; services delegate.\nAPI: add generic /api/node/event and /api/cluster/event endpoints in respective services.\nTests: add ws-color-client, ws-cluster-broadcast-color, http-cluster-broadcast-color.\nDocs: add StreamingAPI.md; update README and test/README.\nFixes: robust WS JSON parsing on ESP8266 and payload handling.
2025-09-28 21:10:26 +02:00
f0df84dc87 feat(api): add generic event endpoints in NodeService and ClusterService
NodeService: add POST /api/node/event to fire local events (params: event, payload).\nClusterService: add POST /api/cluster/event to broadcast events via cluster/broadcast (params: event, payload).\nApiServer: remove inline generic endpoints; services own their registrations.\nUnifies event dispatch through service layer and keeps core server lean.
2025-09-28 17:26:20 +02:00
950142bf7f docs(readme): add Cluster Broadcast section and link to detailed guide
Documents centralized cluster broadcasting flow: service fires local event, core sends UDP CLUSTER_EVENT, peers re-fire locally. Includes usage example and notes; links to docs/ClusterBroadcast.md.
2025-09-28 13:49:48 +02:00
b9b91d71b5 docs: add ClusterBroadcast guide for CLUSTER_EVENT and cluster/broadcast flow
Documents centralized cluster broadcasting: service -> ctx.fire("cluster/broadcast", eventJson) -> UDP CLUSTER_EVENT -> peer ctx.fire(event, data). Includes message format, service/core responsibilities, logging, networking notes, and troubleshooting.
2025-09-28 13:45:10 +02:00
0e6adc999f Merge pull request 'feature/cluster-message' (#9) from feature/cluster-message into main
Reviewed-on: #9
2025-09-28 13:43:53 +02:00
f4ccb1c7ef feat(cluster): centralize cluster/broadcast event for UDP CLUSTER_EVENT send
Register core handler ctx.on("cluster/broadcast") in ClusterManager to send CLUSTER_EVENT via subnet-directed UDP broadcast; services now delegate broadcasting by firing this event. Fix lambda to reference this->ctx inside handler. Update NeoPatternService to fire cluster/broadcast with event JSON instead of sending UDP directly. Improves consistency and removes duplicated UDP code in services.
2025-09-28 13:35:42 +02:00
8da9f77441 refactor(neopattern): unify control handling via event-based single path
Build control payload once from request params and apply locally through ctx.fire("api/neopattern"). If broadcast=true, send the same payload as a CLUSTER_EVENT over UDP.\n\nChanges:\n- Remove duplicated per-parameter setters in REST handler\n- Always fire local event to update state consistently\n- Broadcast reuses same payload; logs retained\n\nImpact:\n- Less duplication, clearer flow, identical behavior for local/remote updates, and simpler maintenance.
2025-09-28 13:27:02 +02:00
cabf857bbd feat(cluster, neopattern): add CLUSTER_EVENT and broadcast handling
Add CLUSTER_EVENT message type and end-to-end handling across cluster and NeoPattern example.\n\nCluster protocol / core:\n- Add ClusterProtocol::CLUSTER_EVENT_MSG\n- ClusterManager: register predicate/handler for CLUSTER_EVENT\n- Robust parsing: accept data as string or nested JSON; serialize nested data to string before firing\n- Add defensive null-termination for full UDP reads; log unknown message head if no handler matches\n- Logging: source IP, payload length, missing fields, and pre-fire event details\n\nNeoPatternService:\n- Constructor now accepts NodeContext and registers ctx.on(api/neopattern) handler\n- /api/neopattern: add optional boolean 'broadcast' flag\n- If broadcast=true: build event payload and send CLUSTER_EVENT over UDP (subnet-directed broadcast); log target and payload size; also fire locally so sender applies immediately\n- Implement applyControlParams with robust ArduinoJson is<T>() checks (replaces deprecated containsKey()) and flexible string/number parsing for color, brightness, steps, interval\n- Minor fixes: include Globals for ClusterProtocol, include ESP8266WiFi for broadcast IP calc, safer brightness clamping\n\nExample:\n- Update neopattern main to pass NodeContext into NeoPatternService\n\nResult:\n- Nodes receive and process CLUSTER_EVENT (api/neopattern) via ctx.fire/ctx.on\n- Broadcast reliably reaches peers; parsing handles both stringified and nested JSON data\n- Additional logs aid diagnosis of delivery/format issues and remove deprecation warnings
2025-09-28 13:18:25 +02:00
2bb0742850 Merge pull request 'feature/node-info-sync' (#8) from feature/node-info-sync into main
Reviewed-on: #8
2025-09-28 12:26:38 +02:00