mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-17 13:45:01 +00:00
Compare commits
20 Commits
v1.16.3-ma
...
v1.17.1-ho
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a673122e00 | ||
|
|
4854018d7b | ||
|
|
078f35a91d | ||
|
|
dba07dced8 | ||
|
|
5ad232135c | ||
|
|
3f8e72f366 | ||
|
|
307b2f54a7 | ||
|
|
f73482e8ed | ||
|
|
e5a7641564 | ||
|
|
2b845ce4cb | ||
|
|
1f095e2fb3 | ||
|
|
2a7f491f62 | ||
|
|
2af603013d | ||
|
|
9aa890d404 | ||
|
|
de714f998b | ||
|
|
bcc07fb4cf | ||
|
|
a3651eac76 | ||
|
|
645d9d7098 | ||
|
|
b731f51c5a | ||
|
|
02c2dceedc |
@@ -10,8 +10,7 @@ jobs:
|
|||||||
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-getversion.yml@main
|
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-getversion.yml@main
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
build-3Series:
|
build-3Series:
|
||||||
# uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-3Series-builds.yml@main
|
uses: PepperDash/workflow-templates/.github/workflows/essentials-3Series-builds.yml@main
|
||||||
uses: PepperDash/workflow-templates/.github/workflows/essentials-3Series-builds.yml@plugins-build-workflows
|
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
needs: getVersion
|
needs: getVersion
|
||||||
if: needs.getVersion.outputs.newVersion == 'true'
|
if: needs.getVersion.outputs.newVersion == 'true'
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="PepperDashCore" version="1.3.3-hotfix-390" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
|
<package id="PepperDashCore" version="1.4.2" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
|
||||||
</packages>
|
</packages>
|
||||||
|
|||||||
@@ -819,6 +819,20 @@ namespace PepperDash_Essentials_Core.Bridges.JoinMaps
|
|||||||
JoinType = eJoinType.Digital
|
JoinType = eJoinType.Digital
|
||||||
});
|
});
|
||||||
|
|
||||||
|
[JoinName("EJECT")]
|
||||||
|
public JoinDataComplete Eject = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 69,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "EJECT",
|
||||||
|
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
public GenericIrControllerJoinMap(uint joinStart)
|
public GenericIrControllerJoinMap(uint joinStart)
|
||||||
: base(joinStart, typeof(GenericIrControllerJoinMap))
|
: base(joinStart, typeof(GenericIrControllerJoinMap))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,117 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Crestron.SimplSharp.CrestronSockets;
|
||||||
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Essentials.Core.Bridges;
|
||||||
|
using PepperDash.Essentials.Core.Devices;
|
||||||
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Implements IBasicCommunication and sends all communication through an EISC
|
||||||
|
/// </summary>
|
||||||
|
[Description("Generic communication wrapper class for any IBasicCommunication type")]
|
||||||
|
public class CommBridge : EssentialsBridgeableDevice, IBasicCommunication
|
||||||
|
{
|
||||||
|
private EiscApiAdvanced eisc;
|
||||||
|
|
||||||
|
private IBasicCommunicationJoinMap joinMap;
|
||||||
|
|
||||||
|
public event EventHandler<GenericCommMethodReceiveTextArgs> TextReceived;
|
||||||
|
|
||||||
|
public event EventHandler<GenericCommMethodReceiveBytesArgs> BytesReceived;
|
||||||
|
|
||||||
|
public bool IsConnected { get; private set; }
|
||||||
|
|
||||||
|
public CommBridge(string key, string name)
|
||||||
|
: base(key, name)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SendBytes(byte[] bytes)
|
||||||
|
{
|
||||||
|
if (eisc == null)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "EISC not linked. Call LinkToApi before sending bytes.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
eisc.Eisc.SetString(joinMap.SendText.JoinNumber, Encoding.ASCII.GetString(bytes, 0, bytes.Length));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SendText(string text)
|
||||||
|
{
|
||||||
|
if (eisc == null)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "EISC not linked. Call LinkToApi before sending text.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
eisc.Eisc.SetString(joinMap.SendText.JoinNumber, text);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Connect() {
|
||||||
|
if (eisc == null)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "EISC not linked. Call LinkToApi before connecting.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
eisc.Eisc.SetBool(joinMap.Connect.JoinNumber, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Disconnect() {
|
||||||
|
if (eisc == null)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "EISC not linked. Call LinkToApi before disconnecting.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
eisc.Eisc.SetBool(joinMap.Connect.JoinNumber, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
|
{
|
||||||
|
joinMap = new IBasicCommunicationJoinMap(joinStart);
|
||||||
|
|
||||||
|
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||||
|
joinMap = JsonConvert.DeserializeObject<IBasicCommunicationJoinMap>(joinMapSerialized);
|
||||||
|
|
||||||
|
if (bridge != null)
|
||||||
|
{
|
||||||
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, "Please update config to use 'eiscapiadvanced' to get all join map features for this device.");
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||||
|
|
||||||
|
eisc = bridge;
|
||||||
|
|
||||||
|
trilist.SetBoolSigAction(joinMap.Connected.JoinNumber, (b) => IsConnected = b);
|
||||||
|
|
||||||
|
trilist.SetStringSigAction(joinMap.TextReceived.JoinNumber, (s) => {
|
||||||
|
var textHandler = TextReceived;
|
||||||
|
|
||||||
|
if (textHandler != null)
|
||||||
|
{
|
||||||
|
textHandler(this, new GenericCommMethodReceiveTextArgs(s));
|
||||||
|
}
|
||||||
|
|
||||||
|
var bytesHandler = BytesReceived;
|
||||||
|
|
||||||
|
if(bytesHandler != null)
|
||||||
|
{
|
||||||
|
bytesHandler(this, new GenericCommMethodReceiveBytesArgs(Encoding.ASCII.GetBytes(s)));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -50,6 +50,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
case eControlMethod.Com:
|
case eControlMethod.Com:
|
||||||
comm = new ComPortController(deviceConfig.Key + "-com", GetComPort, controlConfig.ComParams, controlConfig);
|
comm = new ComPortController(deviceConfig.Key + "-com", GetComPort, controlConfig.ComParams, controlConfig);
|
||||||
break;
|
break;
|
||||||
|
case eControlMethod.ComBridge:
|
||||||
|
comm = new CommBridge(deviceConfig.Key + "-simpl", deviceConfig.Name + " Simpl");
|
||||||
|
break;
|
||||||
case eControlMethod.Cec:
|
case eControlMethod.Cec:
|
||||||
comm = new CecPortController(deviceConfig.Key + "-cec", GetCecPort, controlConfig);
|
comm = new CecPortController(deviceConfig.Key + "-cec", GetCecPort, controlConfig);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -158,10 +158,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
Client.TextReceived += Client_TextReceived;
|
Client.TextReceived += Client_TextReceived;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IsSocket)
|
BeginPolling();
|
||||||
{
|
|
||||||
BeginPolling();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e)
|
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e)
|
||||||
|
|||||||
@@ -165,6 +165,7 @@
|
|||||||
<Compile Include="Comm and IR\ComSpecJsonConverter.cs" />
|
<Compile Include="Comm and IR\ComSpecJsonConverter.cs" />
|
||||||
<Compile Include="Comm and IR\ConsoleCommMockDevice.cs" />
|
<Compile Include="Comm and IR\ConsoleCommMockDevice.cs" />
|
||||||
<Compile Include="Comm and IR\GenericComm.cs" />
|
<Compile Include="Comm and IR\GenericComm.cs" />
|
||||||
|
<Compile Include="Comm and IR\CommBridge.cs" />
|
||||||
<Compile Include="Comm and IR\GenericHttpClient.cs" />
|
<Compile Include="Comm and IR\GenericHttpClient.cs" />
|
||||||
<Compile Include="Comm and IR\IRPortHelper.cs" />
|
<Compile Include="Comm and IR\IRPortHelper.cs" />
|
||||||
<Compile Include="Config\Essentials\ConfigUpdater.cs" />
|
<Compile Include="Config\Essentials\ConfigUpdater.cs" />
|
||||||
|
|||||||
@@ -4,21 +4,20 @@
|
|||||||
<id>PepperDashEssentials</id>
|
<id>PepperDashEssentials</id>
|
||||||
<version>1.5.6</version>
|
<version>1.5.6</version>
|
||||||
<title>PepperDash Essentials</title>
|
<title>PepperDash Essentials</title>
|
||||||
<authors>PepperDash Technologies</authors>
|
<authors>PepperDash Technology</authors>
|
||||||
<owners>pepperdash</owners>
|
<owners>pepperdash</owners>
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<license type="expression">MIT</license>
|
<license type="expression">MIT</license>
|
||||||
<projectUrl>https://github.com/PepperDash/PepperDashCore</projectUrl>
|
<projectUrl>https://github.com/PepperDash/PepperDashCore</projectUrl>
|
||||||
<copyright>Copyright 2020</copyright>
|
<copyright>Copyright 2025</copyright>
|
||||||
<description>PepperDash Essentials is an open source Crestron framework that can be configured as a standalone program capable of running a wide variety of system designs and can also be utilized as a plug-in architecture to augment other Simpl# Pro and Simpl Windows programs. Essentials Framework is a collection of C# / Simpl# Pro libraries that can be utilized in several different manners. It is currently operating as a 100% configuration-driven system, and can be extended to add different workflows and behaviors, either through the addition of further device "types" or via the plug-in mechanism. The framework is a collection of "things" that are all related and interconnected, but in general do not have dependencies on each other.</description>
|
<description>PepperDash Essentials is an open source Crestron framework that can be configured as a standalone program capable of running a wide variety of system designs and can also be utilized as a plug-in architecture to augment other Simpl# Pro and Simpl Windows programs. Essentials Framework is a collection of C# / Simpl# Pro libraries that can be utilized in several different manners. It is currently operating as a 100% configuration-driven system, and can be extended to add different workflows and behaviors, either through the addition of further device "types" or via the plug-in mechanism. The framework is a collection of "things" that are all related and interconnected, but in general do not have dependencies on each other.</description>
|
||||||
<tags>crestron 3series 4series</tags>
|
<tags>crestron 3series 4series</tags>
|
||||||
<repository type="git" url="https://github.com/PepperDash/Essentials"/>
|
<repository type="git" url="https://github.com/PepperDash/Essentials"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="PepperDashCore" version="[1.0.45, 2.0.0)"/>
|
<dependency id="PepperDashCore" version="[1.4.1, 2.0.0)"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
<file src="**" target="lib\net35"/>
|
<file src=".\output\**" target="lib\net35"/>
|
||||||
<file src="**" target="lib\net47"/>
|
|
||||||
</files>
|
</files>
|
||||||
</package>
|
</package>
|
||||||
Reference in New Issue
Block a user