Compare commits

..

14 Commits

Author SHA1 Message Date
Jonathan Arndt
52a14c1f3a docs: update cleanup section with detailed file structure example 2025-05-27 08:48:03 -07:00
Jonathan Arndt
bb991544c4 docs: add checklist items for upgrade-to-4-series.md 2025-05-25 15:03:13 -07:00
Jonathan Arndt
663f2483b3 docs: 📝 Add readme.md for guidance to upgrade plugins v1 to v2 or 4series. 2025-05-22 17:14:29 -07:00
Jason DeVito
ba5d0f33a6 Merge pull request #32 from PepperDash/hotfix/robot-docs
fix: Update README workflow to use main branch and correct author/company names in Directory.Build.props
2025-05-21 11:36:01 -05:00
Jonathan Arndt
4283fb2abd fix: Update README workflow to use main branch and correct author/company names in Directory.Build.props 2025-05-21 09:31:49 -07:00
Andrew Welker
4ee211576f Merge pull request #30 from PepperDash/4series-csproj-updates
Update epi-make-model.4Series.csproj
2025-03-25 16:19:46 -05:00
Jason DeVito
085a2d7659 Merge pull request #31 from PepperDash/jtalborough-patch-1
Rename releaserc.json to .releaserc.json
2025-03-25 16:16:41 -05:00
Jason DeVito
952d5b61a4 Update epi-make-model.4Series.csproj
Update PepperDash Essentials version to 2.0.0
2025-03-25 15:54:31 -05:00
Jason T Alborough
c225184021 Rename releaserc.json to .releaserc.json 2025-03-25 16:43:00 -04:00
Jason DeVito
3f2ef80877 Update epi-make-model.4Series.csproj
Update 4Series.csproj to exlcude assets and change local bid output path.
2025-03-25 10:53:56 -05:00
Jason T Alborough
de4cbcac73 Merge pull request #28 from PepperDash/feature/4-series
Feature/4 series
2025-03-12 10:13:33 -04:00
jdevito
61b8c51db2 chore: remove deleted file reference 2025-01-31 08:23:54 -06:00
jdevito
eee7822de0 feat: add updatedoc caller 2025-01-31 08:23:32 -06:00
jdevito
85d2e4e1dc fix: update template repo
1. update workflow files
2. Add 3-series SLN and csproj files
- Remove from project when using the template if not needed
3. Update 4-series SLN and csproj files
4. Moved SLN's to root of project
5. Rename *.cs files to identify naming convention of 'MakeModel'
6. Upate packages.config to reference latest Essentials v1 release
2025-01-30 16:39:56 -06:00
23 changed files with 883 additions and 534 deletions

View File

@@ -9,16 +9,7 @@ jobs:
getVersion: getVersion:
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:
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-3Series-builds.yml@main
secrets: inherit
needs: getVersion
if: needs.getVersion.outputs.newVersion == 'true'
with:
newVersion: ${{ needs.getVersion.outputs.newVersion }}
version: ${{ needs.getVersion.outputs.version }}
tag: ${{ needs.getVersion.outputs.tag }}
channel: ${{ needs.getVersion.outputs.channel }}
build-4Series: build-4Series:
uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-4Series-builds.yml@main uses: PepperDash/workflow-templates/.github/workflows/essentialsplugins-4Series-builds.yml@main
secrets: inherit secrets: inherit

View File

@@ -0,0 +1,14 @@
name: Generate README
on:
push:
branches-ignore:
- 'robot-docs'
jobs:
call-update-readme:
uses: PepperDash/workflow-templates/.github/workflows/update-readme.yml@main
with:
target-branch: ${{ github.ref_name }}

View File

@@ -0,0 +1,110 @@
![PepperDash Essentials Plugin Logo](/images/essentials-plugin-blue.png)
# Upgrading an EPI: Essentials v1.x → v2.x
## Preparation
1. **Clone the Template Repo referred to as TR** to your local machine.
- [EssentialsPluginTemplate](https://github.com/PepperDash/EssentialsPluginTemplate)
2. **Checkout `main` branch** in the TR.
## Branching
4. In your EPI repo:
- Confirm it does **not already support Essentials v2.x**.
- Ensure there is **no existing 4-series update branch**.
- Create a new branch (e.g., `feature/4-series-updates`) from `main`.
## Upgrade Steps
5. In the new branch:
- **Replace** EPI `.github` files/folders with those from TR as needed.
- *Note:* Retain any custom workflows if required. Consult with PepperDash Team if unsure.
- **Copy** the following from TR to EPI:
- `.releaserc.json` (root)
- `epi-make-model.4Series.sln` (root)
- `src/epi-make-model.4Series.csproj` (create `src` folder if missing)
- `images` folder (if your `readme.md` lacks the standard logo)
- **Initial Commit:** Commit changes, but do **not** push yet.
6. **If EPI has a `src/*.nuspec` file:**
- Record these values from `Nuspec` for later:
- `<id>` (Package ID)
- `<projectUrl>` (Project URL)
- `<title>` (Assembly Title)
7. **Open Solution:**
- Open `epi-make-model.4Series.sln` in Visual Studio 2022.
- If errors occur, ensure the `.csproj` file is located within `src` folder.
8. **Update Project Properties:**
- In `src/epi-make-model.4Series.csproj`, update:
- `AssemblyTitle` (from nuspec `<title>`)
- `RootNamespace` (from existing EPI, device namespace actual)
- `PackageProjectUrl` (from nuspec `<projectUrl>`)
- **Rename `make-model` build path references shown below:**
![defineBuildObjectstoRemove](/images/upgrade-to-4Series/removeObsoleteReferences.png)
- **Add runtime exclusion:**
Add `<ExcludeAssets>runtime</ExcludeAssets>` to the PepperDash Essentials `PackageReference`.
![addRuntimeExclusion](/images/upgrade-to-4Series/addRuntumeExclusion.png)
9. **Copy Build Files:**
- Copy `src/Directory.Build.props` and `src/Directory.Build.targets` from TR.
- Update `RepositoryUrl` in `Directory.Build.props` to match nuspec `PackageProjectUrl`.
- Remove "template" text from `<Product>` in `Directory.Build.props` as needed.
10. **Clean Up:**
- Delete old Visual Studio 2008 files: `.sln`, `.suo`, `.nuspec`, `.csproj`, `.csproj.user`, `.projectinfo`.
- Ensure file structure matches below example:
```
├── src/
│ ├── Directory.Build.props
│ ├── Directory.Build.tagets
│ ├── *.3Series.csproj
│ └── *.4Series.csproj
├── .releaserc.json
├── *.3Series.sln
├── *.4Series.sln
├── LICENSE.md
└── README.md
```
11. **Rename Solution/Project** as needed.
![renameEpiSolution](/images/upgrade-to-4Series/renameEpiSolution.png)
12. **Update Project References and Dependencies**
- Remove old PepperDash Essentials dependency.
- Add PepperDash Essentials v2.x dependency via Visual Studio 2022 > Project > `Manage Nuget Packages`.
![removeExistingReferences](/images/upgrade-to-4Series/removeExistingDependencies.png)
13. **Update Factory Class:**
Set `MinimumEssentialsFrameworkVersion` to match the Essentials version dependency.
14. **Build Solution:**
Ensure solution compiles (warnings about obsolete `Debug.Console` calls are OK).
15. **Update Debug Calls:**
Replace `Debug.Console` with `Debug.Log` methods as appropriate (see table).
![replaceDebugConsoleMethods](/images/upgrade-to-4Series/replaceExistingDebugConsoleMethods.png)
## Completion Checklist
- [ ] EPI compiles with **no warnings**.
- [ ] **Obsolete methods** updated to modern equivalents.
- [ ] **Workflows** complete successfully; packages generated via GitHub and NuGet.org.
- [ ] `readme.md` includes:
- Usage/setup instructions
- Example SIMPL Windows bridge joinmap
- Example device communication structure/properties
- [ ] EPI tested against full release Essentials version.
- [ ] EPI tested by another developer.
- [ ] Full release of EPI.
---
*For questions about workflows or customizations, consult with PepperDash Team.*

View File

@@ -0,0 +1,20 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "epi-make-model.3Series", "src\epi-make-model.3Series.csproj", "{9D249E47-8F95-4437-A6BB-563510287AD1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9D249E47-8F95-4437-A6BB-563510287AD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D249E47-8F95-4437-A6BB-563510287AD1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D249E47-8F95-4437-A6BB-563510287AD1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9D249E47-8F95-4437-A6BB-563510287AD1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.11.35327.3 VisualStudioVersion = 17.11.35327.3
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PDT.EssentialsPluginTemplate.EPI.4Series.", "src\PDT.EssentialsPluginTemplate.EPI.4Series..csproj", "{52E6E0A0-A710-4B5F-AF52-08816F5C99BB}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "epi-make-model.4Series", "src\epi-make-model.4Series.csproj", "{52E6E0A0-A710-4B5F-AF52-08816F5C99BB}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -1,3 +1,3 @@
<packages> <packages>
<package id="PepperDashEssentials" version="1.10.2" targetFramework="net35" allowedVersions="[1.0,2.0)"/> <package id="PepperDashEssentials" version="1.16.1" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
</packages> </packages>

View File

@@ -2,14 +2,14 @@
<PropertyGroup> <PropertyGroup>
<Version>1.0.0-local</Version> <Version>1.0.0-local</Version>
<InformationalVersion>$(Version)</InformationalVersion> <InformationalVersion>$(Version)</InformationalVersion>
<Authors>PepperDash Technologies</Authors> <Authors>PepperDash Technology</Authors>
<Company>PepperDash Technologies</Company> <Company>PepperDash Technology</Company>
<Product>PepperDash Essentials Plugin Template</Product> <Product>PepperDash Essentials Plugin Template</Product>
<Copyright>Copyright © 2024</Copyright> <Copyright>Copyright © 2025</Copyright>
<RepositoryUrl>https://github.com/PepperDash/EssentialsPluginTemplate.git</RepositoryUrl> <RepositoryUrl>https://github.com/PepperDash/EssentialsPluginTemplate.git</RepositoryUrl>
<RepositoryType>git</RepositoryType> <RepositoryType>git</RepositoryType>
<PackageTags>Crestron; 4series</PackageTags> <PackageTags>Crestron; 4series</PackageTags>
<PackageOutputPath>../output</PackageOutputPath> <PackageOutputPath>..\output</PackageOutputPath>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild> <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile> <PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile> <PackageReadmeFile>README.md</PackageReadmeFile>

View File

@@ -1,6 +1,6 @@
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace EssentialsPluginTemplate namespace PepperDash.Essentials.Plugin
{ {
/// <summary> /// <summary>
/// Plugin device Bridge Join Map /// Plugin device Bridge Join Map

View File

@@ -2,7 +2,7 @@
using Newtonsoft.Json; using Newtonsoft.Json;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace EssentialsPluginTemplate namespace PepperDash.Essentials.Plugin
{ {
/// <summary> /// <summary>
/// Plugin device configuration object /// Plugin device configuration object

View File

@@ -0,0 +1,99 @@
// For Basic SIMPL# Classes
// For Basic SIMPL#Pro classes
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Bridges;
namespace PepperDash.Essentials.Plugin
{
/// <summary>
/// Plugin device
/// </summary>
/// <remarks>
/// Rename the class to match the device plugin being developed.
/// </remarks>
/// <example>
/// "EssentialsPluginDeviceTemplate" renamed to "SamsungMdcDevice"
/// </example>
public class EssentialsPluginTemplateCrestronDevice : CrestronGenericBridgeableBaseDevice
{
/// <summary>
/// It is often desirable to store the config
/// </summary>
private EssentialsPluginTemplateConfigObject _config;
#region Constructor for Devices without IBasicCommunication. Remove if not needed
/// <summary>
/// Plugin device constructor for Crestron devices
/// </summary>
/// <param name="key"></param>
/// <param name="name"></param>
/// <param name="config"></param>
/// <param name="hardware"></param>
public EssentialsPluginTemplateCrestronDevice(string key, string name, EssentialsPluginTemplateConfigObject config, GenericBase hardware)
: base(key, name, hardware)
{
Debug.Console(0, this, "Constructing new {0} instance", name);
// The base class takes care of registering the hardware device for you
// TODO [ ] Update the constructor as needed for the plugin device being developed
_config = config;
}
#endregion
#region Overrides of EssentialsBridgeableDevice
/// <summary>
/// Links the plugin device to the EISC bridge
/// </summary>
/// <param name="trilist"></param>
/// <param name="joinStart"></param>
/// <param name="joinMapKey"></param>
/// <param name="bridge"></param>
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
{
var joinMap = new EssentialsPluginTemplateBridgeJoinMap(joinStart);
// This adds the join map to the collection on the bridge
if (bridge != null)
{
bridge.AddJoinMap(Key, joinMap);
}
var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey);
if (customJoins != null)
{
joinMap.SetCustomJoinData(customJoins);
}
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Bridge Type {0}", GetType().Name);
// TODO [ ] Implement bridge links as needed
// links to bridge
trilist.SetString(joinMap.DeviceName.JoinNumber, Name);
trilist.OnlineStatusChange += (o, a) =>
{
if (!a.DeviceOnLine) return;
trilist.SetString(joinMap.DeviceName.JoinNumber, Name);
};
}
#endregion
}
}

View File

@@ -1,11 +1,13 @@
using Crestron.SimplSharpPro.DeviceSupport; // For Basic SIMPL# Classes
// For Basic SIMPL#Pro classes
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Bridges;
using PepperDash.Essentials.Core.Queues; using PepperDash.Essentials.Core.Queues;
namespace PepperDash.Essentials.Plugin
namespace EssentialsPluginTemplate
{ {
/// <summary> /// <summary>
/// Plugin device template for third party devices that use IBasicCommunication /// Plugin device template for third party devices that use IBasicCommunication
@@ -18,6 +20,9 @@ namespace EssentialsPluginTemplate
/// </example> /// </example>
public class EssentialsPluginTemplateDevice : EssentialsBridgeableDevice public class EssentialsPluginTemplateDevice : EssentialsBridgeableDevice
{ {
/// <summary>
/// It is often desirable to store the config
/// </summary>
private EssentialsPluginTemplateConfigObject _config; private EssentialsPluginTemplateConfigObject _config;
/// <summary> /// <summary>
@@ -27,14 +32,21 @@ namespace EssentialsPluginTemplate
#region IBasicCommunication Properties and Constructor. Remove if not needed. #region IBasicCommunication Properties and Constructor. Remove if not needed.
// TODO [ ] Add, modify, remove properties and fields as needed for the plugin being developed
private readonly IBasicCommunication _comms; private readonly IBasicCommunication _comms;
private readonly GenericCommunicationMonitor _commsMonitor; private readonly GenericCommunicationMonitor _commsMonitor;
// _comms gather for ASCII based API's
// TODO [ ] If not using an ASCII based API, delete the properties below
private readonly CommunicationGather _commsGather; private readonly CommunicationGather _commsGather;
/// <summary> /// <summary>
/// Set this value to that of the delimiter used by the API (if applicable) /// Set this value to that of the delimiter used by the API (if applicable)
/// </summary> /// </summary>
private const string CommsDelimiter = "\r"; private const string CommsDelimiter = "\r";
// _comms byte buffer for HEX/byte based API's
// TODO [ ] If not using an HEX/byte based API, delete the properties below
private byte[] _commsByteBuffer = { }; private byte[] _commsByteBuffer = { };
@@ -90,9 +102,11 @@ namespace EssentialsPluginTemplate
{ {
Debug.Console(0, this, "Constructing new {0} instance", name); Debug.Console(0, this, "Constructing new {0} instance", name);
// TODO [ ] Update the constructor as needed for the plugin device being developed
_config = config; _config = config;
ReceiveQueue = new GenericQueue(key + "-rxqueue"); ReceiveQueue = new GenericQueue(key + "-rxqueue"); // If you need to set the thread priority, use one of the available overloaded constructors.
ConnectFeedback = new BoolFeedback(() => Connect); ConnectFeedback = new BoolFeedback(() => Connect);
OnlineFeedback = new BoolFeedback(() => _commsMonitor.IsOnline); OnlineFeedback = new BoolFeedback(() => _commsMonitor.IsOnline);
@@ -104,15 +118,26 @@ namespace EssentialsPluginTemplate
var socket = _comms as ISocketStatus; var socket = _comms as ISocketStatus;
if (socket != null) if (socket != null)
{ {
// device comms is IP **ELSE** device comms is RS232
socket.ConnectionChange += socket_ConnectionChange; socket.ConnectionChange += socket_ConnectionChange;
Connect = true; Connect = true;
} }
#region Communication data event handlers. Comment out any that don't apply to the API type #region Communication data event handlers. Comment out any that don't apply to the API type
// Only one of the below handlers should be necessary.
// _comms gather for any API that has a defined delimiter
// TODO [ ] If not using an ASCII based API, remove the line below
_commsGather = new CommunicationGather(_comms, CommsDelimiter); _commsGather = new CommunicationGather(_comms, CommsDelimiter);
_commsGather.LineReceived += Handle_LineRecieved; _commsGather.LineReceived += Handle_LineRecieved;
// _comms byte buffer for HEX/byte based API's with no delimiter
// TODO [ ] If not using an HEX/byte based API, remove the line below
_comms.BytesReceived += Handle_BytesReceived; _comms.BytesReceived += Handle_BytesReceived;
// _comms byte buffer for HEX/byte based API's with no delimiter
// TODO [ ] If not using an HEX/byte based API, remove the line below
_comms.TextReceived += Handle_TextReceived; _comms.TextReceived += Handle_TextReceived;
#endregion #endregion
@@ -128,18 +153,26 @@ namespace EssentialsPluginTemplate
StatusFeedback.FireUpdate(); StatusFeedback.FireUpdate();
} }
// TODO [ ] If not using an API with a delimeter, delete the method below
private void Handle_LineRecieved(object sender, GenericCommMethodReceiveTextArgs args) private void Handle_LineRecieved(object sender, GenericCommMethodReceiveTextArgs args)
{ {
// TODO [ ] Implement method
// Enqueues the message to be processed in a dedicated thread, but the specified method
ReceiveQueue.Enqueue(new ProcessStringMessage(args.Text, ProcessFeedbackMessage)); ReceiveQueue.Enqueue(new ProcessStringMessage(args.Text, ProcessFeedbackMessage));
} }
// TODO [ ] If not using an HEX/byte based API with no delimeter, delete the method below
private void Handle_BytesReceived(object sender, GenericCommMethodReceiveBytesArgs args) private void Handle_BytesReceived(object sender, GenericCommMethodReceiveBytesArgs args)
{ {
// TODO [ ] Implement method
throw new System.NotImplementedException(); throw new System.NotImplementedException();
} }
// TODO [ ] If not using an ASCII based API with no delimeter, delete the method below
void Handle_TextReceived(object sender, GenericCommMethodReceiveTextArgs e) void Handle_TextReceived(object sender, GenericCommMethodReceiveTextArgs e)
{ {
// TODO [ ] Implement method
throw new System.NotImplementedException(); throw new System.NotImplementedException();
} }
@@ -149,23 +182,26 @@ namespace EssentialsPluginTemplate
/// <param name="message"></param> /// <param name="message"></param>
void ProcessFeedbackMessage(string message) void ProcessFeedbackMessage(string message)
{ {
throw new System.NotImplementedException();
} }
/// <summary>
/// Sends text to the device plugin comms // TODO [ ] If not using an ACII based API, delete the properties below
/// </summary> /// <summary>
/// <remarks> /// Sends text to the device plugin comms
/// Can be used to test commands with the device plugin using the DEVPROPS and DEVJSON console commands /// </summary>
/// </remarks> /// <remarks>
/// <param name="text">Command to be sent</param> /// Can be used to test commands with the device plugin using the DEVPROPS and DEVJSON console commands
public void SendText(string text) /// </remarks>
/// <param name="text">Command to be sent</param>
public void SendText(string text)
{ {
if (string.IsNullOrEmpty(text)) return; if (string.IsNullOrEmpty(text)) return;
_comms.SendText($"{text}{CommsDelimiter}"); _comms.SendText(string.Format("{0}{1}", text, CommsDelimiter));
} }
// TODO [ ] If not using an HEX/byte based API, delete the properties below
/// <summary> /// <summary>
/// Sends bytes to the device plugin comms /// Sends bytes to the device plugin comms
/// </summary> /// </summary>
@@ -188,6 +224,8 @@ namespace EssentialsPluginTemplate
/// </remarks> /// </remarks>
public void Poll() public void Poll()
{ {
// TODO [ ] Update Poll method as needed for the plugin being developed
// Example: SendText("getstatus");
throw new System.NotImplementedException(); throw new System.NotImplementedException();
} }
@@ -207,6 +245,7 @@ namespace EssentialsPluginTemplate
{ {
var joinMap = new EssentialsPluginTemplateBridgeJoinMap(joinStart); var joinMap = new EssentialsPluginTemplateBridgeJoinMap(joinStart);
// This adds the join map to the collection on the bridge
if (bridge != null) if (bridge != null)
{ {
bridge.AddJoinMap(Key, joinMap); bridge.AddJoinMap(Key, joinMap);
@@ -222,7 +261,9 @@ namespace EssentialsPluginTemplate
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X")); Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Bridge Type {0}", GetType().Name); Debug.Console(0, "Linking to Bridge Type {0}", GetType().Name);
// TODO [ ] Implement bridge links as needed
// links to bridge
trilist.SetString(joinMap.DeviceName.JoinNumber, Name); trilist.SetString(joinMap.DeviceName.JoinNumber, Name);
trilist.SetBoolSigAction(joinMap.Connect.JoinNumber, sig => Connect = sig); trilist.SetBoolSigAction(joinMap.Connect.JoinNumber, sig => Connect = sig);
@@ -244,6 +285,7 @@ namespace EssentialsPluginTemplate
private void UpdateFeedbacks() private void UpdateFeedbacks()
{ {
// TODO [ ] Update as needed for the plugin being developed
ConnectFeedback.FireUpdate(); ConnectFeedback.FireUpdate();
OnlineFeedback.FireUpdate(); OnlineFeedback.FireUpdate();
StatusFeedback.FireUpdate(); StatusFeedback.FireUpdate();

View File

@@ -1,9 +1,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using Crestron.SimplSharpPro.UI;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
using Crestron.SimplSharpPro.UI;
namespace EssentialsPluginTemplate namespace PepperDash.Essentials.Plugin
{ {
/// <summary> /// <summary>
/// Plugin device factory for devices that use IBasicCommunication /// Plugin device factory for devices that use IBasicCommunication

View File

@@ -0,0 +1,86 @@
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Bridges;
namespace PepperDash.Essentials.Plugin
{
/// <summary>
/// Plugin device template for logic devices that don't communicate outside the program
/// </summary>
/// <remarks>
/// Rename the class to match the device plugin being developed.
/// </remarks>
/// <example>
/// "EssentialsPluginTemplateLogicDevice" renamed to "SamsungMdcDevice"
/// </example>
public class EssentialsPluginTemplateLogicDevice : EssentialsBridgeableDevice
{
/// <summary>
/// It is often desirable to store the config
/// </summary>
private EssentialsPluginTemplateConfigObject _config;
/// <summary>
/// Plugin device constructor
/// </summary>
/// <param name="key"></param>
/// <param name="name"></param>
/// <param name="config"></param>
public EssentialsPluginTemplateLogicDevice(string key, string name, EssentialsPluginTemplateConfigObject config)
: base(key, name)
{
Debug.Console(0, this, "Constructing new {0} instance", name);
// TODO [ ] Update the constructor as needed for the plugin device being developed
_config = config;
}
#region Overrides of EssentialsBridgeableDevice
/// <summary>
/// Links the plugin device to the EISC bridge
/// </summary>
/// <param name="trilist"></param>
/// <param name="joinStart"></param>
/// <param name="joinMapKey"></param>
/// <param name="bridge"></param>
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
{
var joinMap = new EssentialsPluginTemplateBridgeJoinMap(joinStart);
// This adds the join map to the collection on the bridge
if (bridge != null)
{
bridge.AddJoinMap(Key, joinMap);
}
var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey);
if (customJoins != null)
{
joinMap.SetCustomJoinData(customJoins);
}
Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
Debug.Console(0, "Linking to Bridge Type {0}", GetType().Name);
// TODO [ ] Implement bridge links as needed
// links to bridge
trilist.SetString(joinMap.DeviceName.JoinNumber, Name);
trilist.OnlineStatusChange += (o, a) =>
{
if (!a.DeviceOnLine) return;
trilist.SetString(joinMap.DeviceName.JoinNumber, Name);
};
}
#endregion
}
}

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<package >
<metadata>
<id>PDT.EssentialsPluginTemplate</id>
<readme>docs\README.md</readme>
<version>2.0.2</version>
<title>Essentials Plugin Template</title>
<authors>PepperDash Technologies</authors>
<owners>pepperdash</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/PepperDash/EssentialsPluginTemplate</projectUrl>
<copyright>Copyright 2022</copyright>
<description>This software iserves as a template for generating new Essentials-Compliant plugins</description>
<tags>crestron 3series 4series essentials pepperdash pepperdashessentials epi essentials plugin</tags>
<repository type="git" url="https://github.com/PepperDash/EssentialsPluginTemplate"/>
</metadata>
<files>
<file src="**" target="lib\net35"/>
<file src="**" target="lib\net47"/>
<file src="README.md" target="docs\"/>
</files>
</package>

View File

@@ -7,8 +7,8 @@
<ProjectGuid>{9D249E47-8F95-4437-A6BB-563510287AD1}</ProjectGuid> <ProjectGuid>{9D249E47-8F95-4437-A6BB-563510287AD1}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PDT.EssentialsPluginTemplate.EPI</RootNamespace> <RootNamespace>PepperDash.Essentials.Plugin</RootNamespace>
<AssemblyName>PDT.EssentialsPluginTemplate.EPI</AssemblyName> <AssemblyName>MakeModelPlugin</AssemblyName>
<ProjectTypeGuids>{0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{0B4745B0-194B-4BB6-8E21-E9057CA92300};{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PlatformFamilyName>WindowsCE</PlatformFamilyName> <PlatformFamilyName>WindowsCE</PlatformFamilyName>
<PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID> <PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
@@ -48,7 +48,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="Crestron.SimplSharpPro.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL"> <Reference Include="Crestron.SimplSharpPro.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath> <HintPath>C:\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
</Reference> </Reference>
<Reference Include="Essentials Devices Common, Version=1.6.2.33892, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Essentials Devices Common, Version=1.6.2.33892, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
@@ -73,39 +73,39 @@
</Reference> </Reference>
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL"> <Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath> <HintPath>C:\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="SimplSharpHelperInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL"> <Reference Include="SimplSharpHelperInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath> <HintPath>C:\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="SimplSharpNewtonsoft, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL"> <Reference Include="SimplSharpNewtonsoft, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll</HintPath> <HintPath>C:\ProgramData\Crestron\SDK\SimplSharpNewtonsoft.dll</HintPath>
</Reference> </Reference>
<Reference Include="SimplSharpPro, Version=1.5.3.17, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL"> <Reference Include="SimplSharpPro, Version=1.5.3.17, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath> <HintPath>C:\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="SimplSharpReflectionInterface, Version=1.0.5583.25238, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL"> <Reference Include="SimplSharpReflectionInterface, Version=1.0.5583.25238, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll</HintPath> <HintPath>C:\ProgramData\Crestron\SDK\SimplSharpReflectionInterface.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="EssentialsPluginTemplateLogicDevice.cs" /> <Compile Include="MakeModelCrestronDevice.cs" />
<Compile Include="EssentialsPluginTemplateCrestronDevice.cs" /> <Compile Include="MakeModelBridgeJoinMap.cs" />
<Compile Include="EssentialsPluginTemplateBridgeJoinMap.cs" /> <Compile Include="MakeModelConfigObject.cs" />
<Compile Include="EssentialsPluginTemplateConfigObject.cs" /> <Compile Include="MakeModelDevice.cs" />
<Compile Include="EssentialsPluginTemplateFactory.cs" /> <Compile Include="MakeModelFactory.cs" />
<Compile Include="MakeModelLogicDevice.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="EssentialsPluginTemplateDevice.cs" />
<None Include="Properties\ControlSystem.cfg" /> <None Include="Properties\ControlSystem.cfg" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />

View File

@@ -4,17 +4,17 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>net472</TargetFramework> <TargetFramework>net472</TargetFramework>
<RootNamespace>PDT.EssentialsPluginTemplate.EPI</RootNamespace> <RootNamespace>PepperDash.Essentials.Plugin</RootNamespace>
<Deterministic>false</Deterministic> <Deterministic>false</Deterministic>
<AssemblyTitle>PDT.EssentialsPluginTemplate.EPI</AssemblyTitle> <AssemblyTitle>PepperDash.Essentials.Plugin.Make.Model</AssemblyTitle>
<Company>PepperDash Technologies</Company> <Company>PepperDash Technology</Company>
<Description>This software is a template for a PepperDash Essentials Plugin.</Description> <Description>This software is a template for a PepperDash Essentials Plugin.</Description>
<Copyright>Copyright 2024</Copyright> <Copyright>Copyright 2025</Copyright>
<Version>1.0.0-local</Version> <Version>1.0.0-local</Version>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo> <GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<InformationalVersion>$(Version)</InformationalVersion> <InformationalVersion>$(Version)</InformationalVersion>
<OutputPath>4Series\bin\$(Configuration)\</OutputPath> <OutputPath>bin\$(Configuration)\</OutputPath>
<Authors>PepperDash Technologies</Authors> <Authors>PepperDash Technology</Authors>
<PackageId>Pepperdash.Essentials.Plugins.Template</PackageId> <PackageId>Pepperdash.Essentials.Plugins.Template</PackageId>
<PackageProjectUrl>https://github.com/PepperDash/EssentialsPluginTemplate.git</PackageProjectUrl> <PackageProjectUrl>https://github.com/PepperDash/EssentialsPluginTemplate.git</PackageProjectUrl>
<PackageTags>crestron 4series essentials plugin template</PackageTags> <PackageTags>crestron 4series essentials plugin template</PackageTags>
@@ -31,10 +31,20 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Remove="PDT.EssentialsPluginTemplate.projectinfo" /> <None Remove="epi-make-model.projectinfo" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="PepperDashEssentials" Version="2.0.0-beta-2559" /> <PackageReference Include="PepperDashEssentials" Version="2.0.0" >
</ItemGroup> <ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<None Remove="../output\epi-make-model.4Series.1.0.0-local.cplz" />
</ItemGroup>
<ItemGroup>
<None Remove="../output\epi-make-model.4Series.1.0.0-local.cplz" />
</ItemGroup>
</Project> </Project>