mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 13:52:15 +01:00
feat!: remove the old API, ports 8081 and 8080 (step 4a)
Step 4a of docs/SECURITY_PLAN.md. Port 80 keeps the eleven HTTP routes of ADR 0006 and the socket at /ws; everything else moved to protocol 2. - Port 8081 (ApiRoutes) and the socket on 8080 (SocketEmitter) are gone. Protocol 2 owns its frame buffer and loop-task check. - Port 80 drops every route the old web UI called: reads, edits, settings, scans, reboot, /shades.cfg, /discovery. HttpRoutes.cpp holds what stays. - ModelSnapshot, SnapshotSlots and the read documents are gone. The item snapshot types stay, as ItemSnapshot, for events, MQTT and the command replies. - Model edits reply only to their protocol 2 op: requestResult goes. - The settings' toJSON writers, used only by the settings routes, go. - The _espsomfy_rts._tcp mDNS record moves to port 80, with path=/ws. - The memory event reports the loop-rate window it closes. - A deleted room no longer re-publishes its retained MQTT topics. - e2e: the heap check reads the sync's status; the sync is checked on its own instead of against /controller. - README gets an API and ports section. BREAKING CHANGE: ports 8081 and 8080 and the old HTTP routes are gone. Home Assistant needs integration 3.0.0 or newer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c91c20d444
commit
2a954aa158
53 changed files with 613 additions and 3549 deletions
|
|
@ -199,7 +199,7 @@ static void test_rssiNeedsEmit_either_direction() {
|
|||
********************************************************************/
|
||||
static RssiBroadcast broadcastOf(int rssi, int channel) {
|
||||
RssiBroadcast b;
|
||||
b.sent(true, rssi, channel);
|
||||
b.sent(rssi, channel);
|
||||
return b;
|
||||
}
|
||||
static void test_rssiBroadcast_first_status_is_due() {
|
||||
|
|
@ -208,17 +208,9 @@ static void test_rssiBroadcast_first_status_is_due() {
|
|||
RssiBroadcast b;
|
||||
TEST_ASSERT_TRUE(b.due(-60, 6, 3));
|
||||
}
|
||||
static void test_rssiBroadcast_client_emit_keeps_baseline() {
|
||||
// A new client gets the current RSSI right as it drops 5 dBm. The clients
|
||||
// already connected must still get the change.
|
||||
RssiBroadcast b = broadcastOf(-60, 6);
|
||||
b.sent(false, -65, 6);
|
||||
TEST_ASSERT_EQUAL_INT(-60, b.rssi);
|
||||
TEST_ASSERT_TRUE(b.due(-65, 6, 3));
|
||||
}
|
||||
static void test_rssiBroadcast_broadcast_moves_baseline() {
|
||||
RssiBroadcast b = broadcastOf(-60, 6);
|
||||
b.sent(true, -65, 6);
|
||||
b.sent(-65, 6);
|
||||
TEST_ASSERT_EQUAL_INT(-65, b.rssi);
|
||||
// Measured from the new baseline.
|
||||
TEST_ASSERT_FALSE(b.due(-66, 6, 3));
|
||||
|
|
@ -228,12 +220,6 @@ static void test_rssiBroadcast_channel_change_is_due() {
|
|||
RssiBroadcast b = broadcastOf(-60, 6);
|
||||
TEST_ASSERT_TRUE(b.due(-60, 11, 3));
|
||||
}
|
||||
static void test_rssiBroadcast_client_emit_on_disconnect_keeps_baseline() {
|
||||
RssiBroadcast b = broadcastOf(-60, 6);
|
||||
b.sent(false, -100, -1);
|
||||
TEST_ASSERT_EQUAL_INT(6, b.channel);
|
||||
TEST_ASSERT_FALSE(b.due(-60, 6, 3));
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* emitAllowed
|
||||
|
|
@ -434,10 +420,8 @@ int main(int argc, char **argv) {
|
|||
RUN_TEST(test_rssiNeedsEmit_real_change_emits);
|
||||
RUN_TEST(test_rssiNeedsEmit_either_direction);
|
||||
RUN_TEST(test_rssiBroadcast_first_status_is_due);
|
||||
RUN_TEST(test_rssiBroadcast_client_emit_keeps_baseline);
|
||||
RUN_TEST(test_rssiBroadcast_broadcast_moves_baseline);
|
||||
RUN_TEST(test_rssiBroadcast_channel_change_is_due);
|
||||
RUN_TEST(test_rssiBroadcast_client_emit_on_disconnect_keeps_baseline);
|
||||
RUN_TEST(test_emitAllowed_on_the_loop_task);
|
||||
RUN_TEST(test_emitAllowed_refuses_another_task);
|
||||
RUN_TEST(test_emitAllowed_before_the_owner_is_known);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue