feat: unique status requests for messengers

UI Applications can now request status for specific feature sets instead of full status for a device. This will hopefully cut down on the traffic and messages required to get the data for the UI.
This commit is contained in:
Andrew Welker
2025-09-23 10:55:16 -05:00
parent cae1bbd6e6
commit 9c9eaea928
45 changed files with 619 additions and 425 deletions

View File

@@ -20,10 +20,9 @@ namespace PepperDash.Essentials.AppServer.Messengers
protected override void RegisterActions()
{
AddAction("/status", (id, content) =>
{
SendFullStatus();
});
AddAction("/status", (id, content) => SendFullStatus(id));
AddAction("/techPasswordStatus", (id, content) => SendFullStatus(id));
AddAction("/validateTechPassword", (id, content) =>
{
@@ -55,14 +54,14 @@ namespace PepperDash.Essentials.AppServer.Messengers
};
}
private void SendFullStatus()
private void SendFullStatus(string id = null)
{
var status = new ITechPasswordStateMessage
{
TechPasswordLength = _room.TechPasswordLength
};
PostStatusMessage(status);
PostStatusMessage(status, id);
}
}