This commit is contained in:
Marcelo
2025-11-28 09:11:59 -06:00
commit b66cb97f16
34 changed files with 17756 additions and 0 deletions

14
startup_recovery_query.js Normal file
View File

@@ -0,0 +1,14 @@
// ===== STARTUP RECOVERY QUERY =====
// This function should be triggered on Node-RED startup via an inject node
// with "Inject once after 0.1 seconds"
// Query for most recent active session
msg.topic = `
SELECT * FROM session_state
WHERE is_active = 1
ORDER BY updated_at DESC
LIMIT 1;
`;
msg._mode = "startup-recovery-query";
return msg;