mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-11 19:44:52 +00:00
Merge pull request #7 in PEC/essentials from feature/ecs-747 to development
* commit 'e0bfb8f0915de0597a05bc658bf9b9a235566b38': Fixed issue preventing lighting scene feedback from updating correctly. Bug fix for LutronQuantumArea class that caused crash when debug level was set to 2 and data was received from device. Updates EssentialsEnvironmentDriver to only include environment devices in UI container columns if a matching UI driver can be constructed (ignores DIN8SW8)
This commit is contained in:
@@ -26,6 +26,8 @@ namespace PepperDash.Essentials.Core.Lighting
|
||||
: base(key, name)
|
||||
{
|
||||
LightingScenes = new List<LightingScene>();
|
||||
|
||||
CurrentLightingScene = new LightingScene();
|
||||
}
|
||||
|
||||
public abstract void SelectScene(LightingScene scene);
|
||||
|
||||
@@ -17,9 +17,9 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Lutron
|
||||
|
||||
CTimer SubscribeAfterLogin;
|
||||
|
||||
public int IntegrationId;
|
||||
public string Username;
|
||||
public string Password;
|
||||
string IntegrationId;
|
||||
string Username;
|
||||
string Password;
|
||||
|
||||
const string Delimiter = "\x0d\x0a";
|
||||
const string Set = "#";
|
||||
@@ -32,8 +32,8 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Lutron
|
||||
|
||||
IntegrationId = props.IntegrationId;
|
||||
|
||||
Username = props.Username;
|
||||
Password = props.Password;
|
||||
Username = props.Control.TcpSshProperties.Username;
|
||||
Password = props.Control.TcpSshProperties.Password;
|
||||
|
||||
LightingScenes = props.Scenes;
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Lutron
|
||||
/// <param name="args"></param>
|
||||
void Communication_TextReceived(object sender, GenericCommMethodReceiveTextArgs args)
|
||||
{
|
||||
Debug.Console(2, this, "Text Received: '{0}'");
|
||||
Debug.Console(2, this, "Text Received: '{0}'", args.Text);
|
||||
|
||||
if (args.Text.Contains("login:"))
|
||||
{
|
||||
@@ -120,7 +120,7 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Lutron
|
||||
/// <param name="args"></param>
|
||||
void PortGather_LineReceived(object sender, GenericCommMethodReceiveTextArgs args)
|
||||
{
|
||||
Debug.Console(2, this, "Line Received: '{0}'");
|
||||
Debug.Console(2, this, "Line Received: '{0}'", args.Text);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -128,7 +128,7 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Lutron
|
||||
{
|
||||
var response = args.Text.Split(',');
|
||||
|
||||
var integrationId = Int32.Parse(response[1]);
|
||||
var integrationId = response[1];
|
||||
|
||||
if (integrationId != IntegrationId)
|
||||
{
|
||||
@@ -143,7 +143,7 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Lutron
|
||||
{
|
||||
case (int)eAction.Scene:
|
||||
{
|
||||
var scene = Int32.Parse(response[3]);
|
||||
var scene = response[3];
|
||||
CurrentLightingScene = LightingScenes.FirstOrDefault(s => s.ID.Equals(scene));
|
||||
|
||||
OnLightingSceneChange();
|
||||
@@ -180,7 +180,7 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Lutron
|
||||
public override void SelectScene(LightingScene scene)
|
||||
{
|
||||
Debug.Console(1, this, "Selecting Scene: '{0}'", scene.Name);
|
||||
SendLine(string.Format("{0}AREA,{1},{2},{3}", Set, IntegrationId, eAction.Scene, scene.ID));
|
||||
SendLine(string.Format("{0}AREA,{1},{2},{3}", Set, IntegrationId, (int)eAction.Scene, scene.ID));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -188,7 +188,7 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Lutron
|
||||
/// </summary>
|
||||
public void MasterRaise()
|
||||
{
|
||||
SendLine(string.Format("{0}AREA,{1},{2}", Set, IntegrationId, eAction.Raise));
|
||||
SendLine(string.Format("{0}AREA,{1},{2}", Set, IntegrationId, (int)eAction.Raise));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -196,7 +196,7 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Lutron
|
||||
/// </summary>
|
||||
public void MasterLower()
|
||||
{
|
||||
SendLine(string.Format("{0}AREA,{1},{2}", Set, IntegrationId, eAction.Lower));
|
||||
SendLine(string.Format("{0}AREA,{1},{2}", Set, IntegrationId, (int)eAction.Lower));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -204,7 +204,7 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Lutron
|
||||
/// </summary>
|
||||
public void MasterRaiseLowerStop()
|
||||
{
|
||||
SendLine(string.Format("{0}AREA,{1},{2}", Set, IntegrationId, eAction.Stop));
|
||||
SendLine(string.Format("{0}AREA,{1},{2}", Set, IntegrationId, (int)eAction.Stop));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -239,10 +239,11 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Lutron
|
||||
public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; }
|
||||
public ControlPropertiesConfig Control { get; set; }
|
||||
|
||||
public int IntegrationId { get; set; }
|
||||
public List<LightingScene> Scenes{ get; set; }
|
||||
public string IntegrationId { get; set; }
|
||||
public List<LightingScene> Scenes { get; set; }
|
||||
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
// Moved to use existing properties in Control object
|
||||
//public string Username { get; set; }
|
||||
//public string Password { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -4,5 +4,5 @@
|
||||
[assembly: AssemblyCompany("PepperDash Technology Corp")]
|
||||
[assembly: AssemblyProduct("PepperDashEssentials")]
|
||||
[assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2017")]
|
||||
[assembly: AssemblyVersion("1.3.0.*")]
|
||||
[assembly: AssemblyVersion("1.2.0.*")]
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ControlSystem>
|
||||
<Name>Desk MC3</Name>
|
||||
<Address>ssh 10.0.0.15</Address>
|
||||
<ProgramSlot>Program01</ProgramSlot>
|
||||
<Storage>Internal Flash</Storage>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ControlSystem>
|
||||
<Name>Test RMC3</Name>
|
||||
<Address>auto 192.168.1.40</Address>
|
||||
<ProgramSlot>Program01</ProgramSlot>
|
||||
<Storage>Internal Flash</Storage>
|
||||
</ControlSystem>
|
||||
@@ -121,22 +121,27 @@ namespace PepperDash.Essentials
|
||||
|
||||
if (device != null)
|
||||
{
|
||||
Devices.Add(device);
|
||||
|
||||
// Build the driver
|
||||
var devicePanelDriver = GetPanelDriverForDevice(device, column);
|
||||
|
||||
// Add new PanelDriverBase SubDriver
|
||||
if (devicePanelDriver != null)
|
||||
{
|
||||
Devices.Add(device);
|
||||
DeviceSubDrivers.Add(devicePanelDriver);
|
||||
|
||||
Debug.Console(1, "Adding '{0}' to Environment Devices", device.Key);
|
||||
Debug.Console(1, "Adding '{0}' to Environment Devices", device.Key);
|
||||
|
||||
column++;
|
||||
column++;
|
||||
|
||||
|
||||
// Quit if device count is exceeded
|
||||
if (column > 4)
|
||||
break;
|
||||
}
|
||||
else
|
||||
Debug.Console(1, "Unable to build environment driver for device: '{0}'", device.Key);
|
||||
|
||||
// Quit if device count is exceeded
|
||||
if (column > 4)
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -214,7 +214,6 @@ namespace PepperDash.Essentials
|
||||
TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusLabelPress, avDriver.ShowActiveCallsList);
|
||||
|
||||
// Set Call Status Subpage Position
|
||||
#warning may need to add a new position when environment icon is displayed
|
||||
|
||||
if (nextJoin == 3951)
|
||||
{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user