Compare commits

...

2 Commits

Author SHA1 Message Date
Andrew Welker
316bb849b4 fix: update matrix routing inputs if endpoint online status changes 2025-12-30 16:58:36 -06:00
Andrew Welker
a983e2c87f fix: save config only when values change 2025-12-30 14:34:11 -06:00
2 changed files with 16 additions and 1 deletions

View File

@@ -100,12 +100,15 @@ namespace PepperDash.Essentials.Core.Fusion
var roomConfig = reconfigurable.Config;
var updateConfig = false;
// Set the room name
if (!string.IsNullOrEmpty(roomInfo.Name) && useFusionRoomName)
{
Debug.LogDebug("Current Room Name: {currentName}. New Room Name: {fusionName}", roomConfig.Name, roomInfo.Name);
// Set the name in config
roomConfig.Name = roomInfo.Name;
updateConfig = true;
Debug.LogDebug("Room Name Successfully Changed.");
}
@@ -115,9 +118,13 @@ namespace PepperDash.Essentials.Core.Fusion
if (helpMessage != null)
{
roomConfig.Properties["helpMessage"] = helpMessage.CustomFieldValue;
updateConfig = true;
}
reconfigurable.SetConfig(roomConfig);
if (updateConfig)
{
reconfigurable.SetConfig(roomConfig);
}
}
catch (Exception e)
{

View File

@@ -62,6 +62,14 @@ namespace PepperDash.Essentials.AppServer.Messengers
inputs = matrixDevice.InputSlots.ToDictionary(kvp => kvp.Key, kvp => new RoutingInput(kvp.Value))
}));
};
inputSlot.IsOnline.OutputChange += (sender, args) =>
{
PostStatusMessage(JToken.FromObject(new
{
inputs = matrixDevice.InputSlots.ToDictionary(kvp => kvp.Key, kvp => new RoutingInput(kvp.Value))
}));
};
}
}