Fix LCD Communicaiton infinite looping upon failed commands
This commit is contained in:
43
vesper/documentation/SentDevices
Normal file
43
vesper/documentation/SentDevices
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
STAMNA:
|
||||||
|
# # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
|
||||||
|
PV25L22BP01R01
|
||||||
|
Bell Plus
|
||||||
|
HW: 1.0
|
||||||
|
|
||||||
|
u6545309759@gmail.com
|
||||||
|
bellsystems2025
|
||||||
|
aCx!97IEfTiA073^#*Jj
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
XRISTIANIKH_ELPIS:
|
||||||
|
# # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
|
||||||
|
PV26B02BP01R01
|
||||||
|
Bell Plus
|
||||||
|
HW: 1.0
|
||||||
|
|
||||||
|
mail: christianikielpis@gmail.com
|
||||||
|
pass: bellsystems2025
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
GREVENA:
|
||||||
|
# # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
|
||||||
|
PA26B06AM01R01
|
||||||
|
Agnus Mini
|
||||||
|
HW: 1.0
|
||||||
|
|
||||||
|
|
||||||
|
# # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
LARISA:
|
||||||
|
# # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
|
||||||
|
PA26B06AM01R02
|
||||||
|
Agnus Mini
|
||||||
|
HW: 1.0
|
||||||
@@ -31,3 +31,12 @@ PV26A28BC01R01
|
|||||||
"action":"restart"
|
"action":"restart"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"cmd":"system_info",
|
||||||
|
"contents":
|
||||||
|
{
|
||||||
|
"action":"get_full_settings"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -77,24 +77,3 @@ ToDo Fixes:
|
|||||||
- When a new user is created, set default PINs for both Quick Settings, and Settings.
|
- When a new user is created, set default PINs for both Quick Settings, and Settings.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Stamna:
|
|
||||||
|
|
||||||
PV25L22BP01R01
|
|
||||||
Bell Plus
|
|
||||||
HW: 1.0
|
|
||||||
|
|
||||||
u6545309759@gmail.com
|
|
||||||
bellsystems2025
|
|
||||||
aCx!97IEfTiA073^#*Jj
|
|
||||||
|
|
||||||
|
|
||||||
// XRISTIANIKH_ELPIS:
|
|
||||||
|
|
||||||
PV26B02BP01R01
|
|
||||||
Bell Plus
|
|
||||||
HW: 1.0
|
|
||||||
|
|
||||||
|
|
||||||
mail: christianikielpis@gmail.com
|
|
||||||
pass: bellsystems2025
|
|
||||||
@@ -343,9 +343,29 @@ void CommunicationRouter::onWebSocketMessage(uint32_t clientId, const JsonDocume
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CommunicationRouter::onUartMessage(JsonDocument& message) {
|
void CommunicationRouter::onUartMessage(JsonDocument& message) {
|
||||||
// Extract command for logging
|
// Extract command and action for filtering
|
||||||
String cmd = message["cmd"] | "unknown";
|
String cmd = message["cmd"] | "";
|
||||||
LOG_INFO("🔌 UART message received: cmd=%s", cmd.c_str());
|
String action = message["contents"]["action"] | "";
|
||||||
|
|
||||||
|
// UART COMMAND WHITELIST: Only allow specific commands
|
||||||
|
// This prevents feedback loops between devices when bad messages occur.
|
||||||
|
// To re-enable full UART command support, remove this filter.
|
||||||
|
bool allowed = false;
|
||||||
|
|
||||||
|
if (cmd == "system_info" && action == "sync_time_to_lcd") {
|
||||||
|
allowed = true;
|
||||||
|
} else if (cmd == "playback" && (action == "play" || action == "stop")) {
|
||||||
|
allowed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!allowed) {
|
||||||
|
// Silently ignore - do NOT send error response to avoid feedback loop
|
||||||
|
LOG_DEBUG("UART: Ignoring non-whitelisted command (cmd=%s, action=%s)",
|
||||||
|
cmd.c_str(), action.c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG_INFO("🔌 UART command received: cmd=%s, action=%s", cmd.c_str(), action.c_str());
|
||||||
|
|
||||||
// Create message context for UART
|
// Create message context for UART
|
||||||
CommandHandler::MessageContext context(CommandHandler::MessageSource::UART);
|
CommandHandler::MessageContext context(CommandHandler::MessageSource::UART);
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
* 👨💻 AUTHOR: BellSystems bonamin
|
* 👨💻 AUTHOR: BellSystems bonamin
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FW_VERSION "153"
|
#define FW_VERSION "154"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user