From 23dd321f25aab154a905db06ff701159cae18ecd Mon Sep 17 00:00:00 2001 From: Ryan Wagoner Date: Mon, 28 Oct 2019 14:31:58 -0400 Subject: [PATCH] - Always enable first area to support Omni LTe and Omni IIe --- OmniLinkBridge/Modules/MQTTModule.cs | 4 +++- OmniLinkBridge/WebService/OmniLinkService.cs | 4 +++- README.md | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/OmniLinkBridge/Modules/MQTTModule.cs b/OmniLinkBridge/Modules/MQTTModule.cs index c248c5f..cf19395 100644 --- a/OmniLinkBridge/Modules/MQTTModule.cs +++ b/OmniLinkBridge/Modules/MQTTModule.cs @@ -310,7 +310,9 @@ namespace OmniLinkBridge.Modules { clsArea area = OmniLink.Controller.Areas[i]; - if (area.DefaultProperties == true) + // PC Access doesn't let you customize the area name for the Omni LTe or Omni IIe + // (configured for 1 area). To workaround ignore default properties for the first area. + if (i > 1 && area.DefaultProperties == true) { MqttClient.PublishAsync($"{Global.mqtt_discovery_prefix}/alarm_control_panel/{Global.mqtt_prefix}/area{i.ToString()}/config", null, MqttQualityOfServiceLevel.AtMostOnce, true); MqttClient.PublishAsync($"{Global.mqtt_discovery_prefix}/binary_sensor/{Global.mqtt_prefix}/area{i.ToString()}burglary/config", null, MqttQualityOfServiceLevel.AtMostOnce, true); diff --git a/OmniLinkBridge/WebService/OmniLinkService.cs b/OmniLinkBridge/WebService/OmniLinkService.cs index 3baa1ed..015c74c 100644 --- a/OmniLinkBridge/WebService/OmniLinkService.cs +++ b/OmniLinkBridge/WebService/OmniLinkService.cs @@ -29,7 +29,9 @@ namespace OmniLinkBridge.WebAPI { clsArea area = WebServiceModule.OmniLink.Controller.Areas[i]; - if (area.DefaultProperties == false) + // PC Access doesn't let you customize the area name for the Omni LTe or Omni IIe + // (configured for 1 area). To workaround ignore default properties for the first area. + if (i == 1 || area.DefaultProperties == false) names.Add(new NameContract() { id = i, name = area.Name }); } return names; diff --git a/README.md b/README.md index 2658dca..c4d6bd3 100644 --- a/README.md +++ b/README.md @@ -182,9 +182,10 @@ string ON ``` ## Change Log -Version 1.1.4 - 2019-10-27 +Version 1.1.4 - 2019-10-28 - Utilize controller temperature format - Ignore invalid temperature for thermostats +- Always enable first area to fix Omni LTe and Omni IIe - Fix MQTT id validation and add notice for areas - Fix compatibility with Home Assistant 0.95.4 MQTT extra keys