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

@@ -1,10 +1,10 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PepperDash.Core;
using PepperDash.Core.Logging;
using PepperDash.Essentials.Core;
using System;
using System.Collections.Generic;
namespace PepperDash.Essentials.AppServer.Messengers
{
@@ -46,7 +46,9 @@ namespace PepperDash.Essentials.AppServer.Messengers
/// partition states.</remarks>
protected override void RegisterActions()
{
AddAction("/fullStatus", (id, content) => SendFullStatus());
AddAction("/fullStatus", (id, content) => SendFullStatus(id));
AddAction("/combinerStatus", (id, content) => SendFullStatus(id));
AddAction("/setAutoMode", (id, content) =>
{
@@ -120,7 +122,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
}
}
private void SendFullStatus()
private void SendFullStatus(string id = null)
{
try
{
@@ -141,7 +143,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
Partitions = _roomCombiner.Partitions
};
PostStatusMessage(message);
PostStatusMessage(message, id);
}
catch (Exception e)
{