mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
Updatest to CotjaDdvc01RoomBridge to enable source control joins on EISC (need to update API words in dictionary to match existing interface extensions)
This commit is contained in:
@@ -92,6 +92,10 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// API class for IBasicCommunication devices
|
||||||
|
/// </summary>
|
||||||
public class IBasicCommunicationApi : DeviceApiBase
|
public class IBasicCommunicationApi : DeviceApiBase
|
||||||
{
|
{
|
||||||
public IBasicCommunication Device { get; set; }
|
public IBasicCommunication Device { get; set; }
|
||||||
|
|||||||
@@ -105,6 +105,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Audio\EssentialsVolumeLevelConfig.cs" />
|
<Compile Include="Audio\EssentialsVolumeLevelConfig.cs" />
|
||||||
|
<Compile Include="Bridges\BridgeBase.cs" />
|
||||||
|
<Compile Include="Bridges\BridgeFactory.cs" />
|
||||||
<Compile Include="Configuration ORIGINAL\Builders\TPConfig.cs" />
|
<Compile Include="Configuration ORIGINAL\Builders\TPConfig.cs" />
|
||||||
<Compile Include="Configuration ORIGINAL\Configuration.cs" />
|
<Compile Include="Configuration ORIGINAL\Configuration.cs" />
|
||||||
<Compile Include="Configuration ORIGINAL\ConfigurationHelpers.cs" />
|
<Compile Include="Configuration ORIGINAL\ConfigurationHelpers.cs" />
|
||||||
@@ -154,6 +156,7 @@
|
|||||||
<Compile Include="Room\Cotija\DeviceTypeInterfaces\IPowerExtensions.cs" />
|
<Compile Include="Room\Cotija\DeviceTypeInterfaces\IPowerExtensions.cs" />
|
||||||
<Compile Include="Room\Cotija\DeviceTypeInterfaces\ISetTopBoxControlsExtensions.cs" />
|
<Compile Include="Room\Cotija\DeviceTypeInterfaces\ISetTopBoxControlsExtensions.cs" />
|
||||||
<Compile Include="Room\Cotija\DeviceTypeInterfaces\ITransportExtensions.cs" />
|
<Compile Include="Room\Cotija\DeviceTypeInterfaces\ITransportExtensions.cs" />
|
||||||
|
<Compile Include="Room\Cotija\RoomBridges\SourceDeviceMapDictionary.cs" />
|
||||||
<Compile Include="Room\Emergency\EsentialsRoomEmergencyContactClosure.cs" />
|
<Compile Include="Room\Emergency\EsentialsRoomEmergencyContactClosure.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsHuddleVtc1Room.cs" />
|
<Compile Include="Room\Types\EssentialsHuddleVtc1Room.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsPresentationRoom.cs" />
|
<Compile Include="Room\Types\EssentialsPresentationRoom.cs" />
|
||||||
|
|||||||
@@ -82,6 +82,24 @@ namespace PepperDash.Essentials
|
|||||||
CrestronConsole.AddNewConsoleCommand(TestHttpRequest,
|
CrestronConsole.AddNewConsoleCommand(TestHttpRequest,
|
||||||
"mobilehttprequest", "Tests an HTTP get to URL given", ConsoleAccessLevelEnum.AccessOperator);
|
"mobilehttprequest", "Tests an HTTP get to URL given", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
|
|
||||||
|
CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(CrestronEnvironment_ProgramStatusEventHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sends message to server to indicate the system is shutting down
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="programEventType"></param>
|
||||||
|
void CrestronEnvironment_ProgramStatusEventHandler(eProgramStatusEventType programEventType)
|
||||||
|
{
|
||||||
|
if (programEventType == eProgramStatusEventType.Stopping && WSClient.Connected)
|
||||||
|
{
|
||||||
|
SendMessageToServer(JObject.FromObject( new
|
||||||
|
{
|
||||||
|
type = "/system/close"
|
||||||
|
}));
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -450,6 +468,11 @@ namespace PepperDash.Essentials
|
|||||||
/// <param name="content"></param>
|
/// <param name="content"></param>
|
||||||
void HandleHeartBeat(JToken content)
|
void HandleHeartBeat(JToken content)
|
||||||
{
|
{
|
||||||
|
SendMessageToServer(JObject.FromObject(new
|
||||||
|
{
|
||||||
|
type = "/system/heartbeatAck"
|
||||||
|
}));
|
||||||
|
|
||||||
var code = content["userCode"];
|
var code = content["userCode"];
|
||||||
if(code != null)
|
if(code != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -250,6 +250,18 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
EISC.PulseBool(BoolJoin.ShutdownEnd)));
|
EISC.PulseBool(BoolJoin.ShutdownEnd)));
|
||||||
Parent.AddAction(@"/room/room1/shutdownCancel", new Action(() =>
|
Parent.AddAction(@"/room/room1/shutdownCancel", new Action(() =>
|
||||||
EISC.PulseBool(BoolJoin.ShutdownCancel)));
|
EISC.PulseBool(BoolJoin.ShutdownCancel)));
|
||||||
|
|
||||||
|
|
||||||
|
// Source Device (Current Source)'
|
||||||
|
|
||||||
|
SourceDeviceMapDictionary sourceJoinMap = new SourceDeviceMapDictionary();
|
||||||
|
|
||||||
|
var prefix = @"/device/currentSource/";
|
||||||
|
|
||||||
|
foreach (var item in sourceJoinMap)
|
||||||
|
{
|
||||||
|
Parent.AddAction(prefix + item.Key, new PressAndHoldAction(b => EISC.SetBool(item.Value, b)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -324,6 +336,11 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
{
|
{
|
||||||
Debug.Console(0, this, "Adding room to config");
|
Debug.Console(0, this, "Adding room to config");
|
||||||
co.Rooms.Add(rm);
|
co.Rooms.Add(rm);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "Replacing Room[0] in config");
|
||||||
|
co.Rooms[0] = rm;
|
||||||
}
|
}
|
||||||
rm.Name = EISC.StringOutput[501].StringValue;
|
rm.Name = EISC.StringOutput[501].StringValue;
|
||||||
rm.Key = "room1";
|
rm.Key = "room1";
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Room.Cotija
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Contains all of the default joins that map to API funtions
|
||||||
|
/// </summary>
|
||||||
|
public class SourceDeviceMapDictionary : Dictionary<string, uint>
|
||||||
|
{
|
||||||
|
|
||||||
|
public SourceDeviceMapDictionary(): base()
|
||||||
|
{
|
||||||
|
var dictionary = new Dictionary<string, uint>
|
||||||
|
{
|
||||||
|
{"preset01", 101},
|
||||||
|
{"preset02", 102},
|
||||||
|
{"preset03", 103},
|
||||||
|
{"preset04", 104},
|
||||||
|
{"preset05", 105},
|
||||||
|
{"preset06", 106},
|
||||||
|
{"preset07", 107},
|
||||||
|
{"preset08", 108},
|
||||||
|
{"preset09", 109},
|
||||||
|
{"preset10", 110},
|
||||||
|
{"preset11", 111},
|
||||||
|
{"preset12", 112},
|
||||||
|
{"preset13", 113},
|
||||||
|
{"preset14", 114},
|
||||||
|
{"preset15", 115},
|
||||||
|
{"preset16", 116},
|
||||||
|
{"preset17", 117},
|
||||||
|
{"preset18", 118},
|
||||||
|
{"preset19", 119},
|
||||||
|
{"preset20", 120},
|
||||||
|
{"preset21", 121},
|
||||||
|
{"preset22", 122},
|
||||||
|
{"preset23", 123},
|
||||||
|
{"preset24", 124},
|
||||||
|
|
||||||
|
{"key0", 130},
|
||||||
|
{"key1", 131},
|
||||||
|
{"key2", 132},
|
||||||
|
{"key3", 133},
|
||||||
|
{"key4", 134},
|
||||||
|
{"key5", 135},
|
||||||
|
{"key6", 136},
|
||||||
|
{"key7", 137},
|
||||||
|
{"key8", 138},
|
||||||
|
{"key9", 139},
|
||||||
|
{"keyDash", 140},
|
||||||
|
{"keyEnter", 141},
|
||||||
|
{"channelUp", 142},
|
||||||
|
{"channelDown", 143},
|
||||||
|
{"channelLast", 144},
|
||||||
|
{"exit", 145},
|
||||||
|
{"power", 146},
|
||||||
|
{"red", 147},
|
||||||
|
{"green", 148},
|
||||||
|
{"yellow", 149},
|
||||||
|
{"blue", 150},
|
||||||
|
{"video", 151},
|
||||||
|
{"previous", 152},
|
||||||
|
{"next", 153},
|
||||||
|
{"rewind", 154},
|
||||||
|
{"ffwd", 155},
|
||||||
|
{"closedCaption", 156},
|
||||||
|
{"stop", 157},
|
||||||
|
{"pause", 158},
|
||||||
|
{"cursorUp", 159},
|
||||||
|
{"cursorDown", 160},
|
||||||
|
{"cursorLeft", 161},
|
||||||
|
{"cursorRight", 162},
|
||||||
|
{"settings", 163},
|
||||||
|
{"info", 164},
|
||||||
|
{"return", 165},
|
||||||
|
{"guide", 166},
|
||||||
|
{"reboot", 167},
|
||||||
|
|
||||||
|
{"play", 170},
|
||||||
|
{"cursorOk", 171},
|
||||||
|
{"record", 172},
|
||||||
|
{"menu", 173},
|
||||||
|
{"topMenu", 174}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user