From 2e9cdb1bedb63d63d4e7249b92a3e0b8ab8e1abd Mon Sep 17 00:00:00 2001 From: Christopher Piggott Date: Thu, 6 Sep 2018 22:19:41 -0400 Subject: [PATCH 01/12] Removed dead quick_start parameter on plm and exposed load_aldb to allow creating an interface then manually triggering an aldb refresh later --- insteonplm/__init__.py | 7 +++++-- insteonplm/plm.py | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/insteonplm/__init__.py b/insteonplm/__init__.py index c4dfa2a7..a2ee501e 100644 --- a/insteonplm/__init__.py +++ b/insteonplm/__init__.py @@ -135,7 +135,7 @@ def loop(self): def create(cls, device='/dev/ttyUSB0', host=None, username=None, password=None, port=25010, auto_reconnect=True, loop=None, workdir=None, - poll_devices=True): + poll_devices=True, load_aldb=True): """Create a connection to a specific device. Here is where we supply the device and callback callables we @@ -153,6 +153,8 @@ def create(cls, device='/dev/ttyUSB0', host=None, Should the Connection try to automatically reconnect if needed? :param loop: asyncio.loop for async operation + :param load_aldb: + Should the ALDB be loaded on connect :type device: str @@ -180,7 +182,8 @@ def connection_lost(): connection_lost_callback=connection_lost, loop=conn.loop, workdir=workdir, - poll_devices=poll_devices) + poll_devices=poll_devices, + load_aldb=load_aldb) yield from conn.reconnect() diff --git a/insteonplm/plm.py b/insteonplm/plm.py index 58d64b8b..02e1b791 100644 --- a/insteonplm/plm.py +++ b/insteonplm/plm.py @@ -94,7 +94,6 @@ def __init__(self, loop=None, connection_lost_callback=None, self.transport = None self._register_message_handlers() - self._quick_start = False self._writer_task = None self._restart_writer = False self.restart_writing() @@ -343,7 +342,7 @@ def _setup_devices(self): len(self.devices.saved_devices)) self._get_plm_info() self.devices.add_known_devices(self) - if self._quick_start: + if self._load_aldb == False: self._complete_setup() else: self._load_all_link_database() From db8fd13437c212a91b08b7cbd25be0e1e4efe444 Mon Sep 17 00:00:00 2001 From: Christopher Piggott Date: Fri, 7 Sep 2018 09:19:23 -0400 Subject: [PATCH 02/12] Fixed ordering style issue on conditional test to make pylint happy --- insteonplm/plm.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/insteonplm/plm.py b/insteonplm/plm.py index 02e1b791..c2ee55aa 100644 --- a/insteonplm/plm.py +++ b/insteonplm/plm.py @@ -342,10 +342,12 @@ def _setup_devices(self): len(self.devices.saved_devices)) self._get_plm_info() self.devices.add_known_devices(self) - if self._load_aldb == False: - self._complete_setup() - else: + + if self._load_aldb: self._load_all_link_database() + else: + self._complete_setup() + _LOGGER.debug('Ending _setup_devices in IM') # pylint: disable=broad-except From a4405b51129a4434de03943a363855cce6d6e6f4 Mon Sep 17 00:00:00 2001 From: Christopher Piggott Date: Fri, 7 Sep 2018 23:02:38 -0400 Subject: [PATCH 03/12] Split out a base class for an insteon thermostat and created two instances, one for the 2441TH (which already existed) and one for the 2441V (currently adding). --- insteonplm/devices/climateControl.py | 22 ++++++++++++++++++++-- insteonplm/devices/ipdb.py | 4 ++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/insteonplm/devices/climateControl.py b/insteonplm/devices/climateControl.py index a06fe691..ea535474 100644 --- a/insteonplm/devices/climateControl.py +++ b/insteonplm/devices/climateControl.py @@ -16,8 +16,10 @@ _LOGGER = logging.getLogger(__name__) -class ClimateControl_2441th(Device): - """Thermostat model 2441TH.""" + + +class ClimateControl_Base(Device): + """Thermostat model.""" def __init__(self, plm, address, cat, subcat, product_key=None, description=None, model=None): @@ -100,3 +102,19 @@ def async_refresh_state(self): # pylint: disable=unused-argument def _mode_changed(self, addr, group, val): self.async_refresh_state() + + + +class ClimateControl_2441th(ClimateControl_Base): + """TH2441TH thermostat model""" + def __init__(self, plm, address, cat, subcat, product_key=None, + description=None, model=None): + """Constructor, delegates most work to the base thermostat class""" + super().__init__(self, plm, address, cat, subcat, product_key, description, model) + +class ClimateControl_2441v(ClimateControl_Base): + """TH2441V thermostat adapter model""" + def __init__(self, plm, address, cat, subcat, product_key=None, + description=None, model=None): + """Constructor, delegates most work to the base thermostat class""" + super().__init__(self, plm, address, cat, subcat, product_key, description, model) diff --git a/insteonplm/devices/ipdb.py b/insteonplm/devices/ipdb.py index 4687fded..3885fb0e 100644 --- a/insteonplm/devices/ipdb.py +++ b/insteonplm/devices/ipdb.py @@ -15,7 +15,7 @@ SwitchedLightingControl_2334_222_6, SwitchedLightingControl_2334_222_8, SwitchedLightingControl_2663_222) -from insteonplm.devices.climateControl import ClimateControl_2441th +from insteonplm.devices.climateControl import (ClimateControl_2441th, ClimateControl_2441v) from insteonplm.devices.securityHealthSafety import (SecurityHealthSafety, SecurityHealthSafety_2421, SecurityHealthSafety_2842_222, @@ -248,7 +248,7 @@ class IPDB(): Product(0x05, 0x00, None, 'Broan SMSC080 Exhaust Fan', '', None), Product(0x05, 0x01, 0x000002, 'EZTherm', '', None), Product(0x05, 0x02, None, 'Broan SMSC110 Exhaust Fan', '', None), - Product(0x05, 0x03, 0x00001F, 'Thermostat Adapter', '2441V', None), + Product(0x05, 0x03, None, 'Thermostat Adapter', '2441V', ClimateControl_2441v), Product(0x05, 0x04, 0x000024, 'EZTherm', '', None), Product(0x05, 0x05, 0x000038, 'Broan, Venmar, BEST Rangehoods', '', None), Product(0x05, 0x07, None, 'Wireless Thermostat', '2441ZTH', ClimateControl_2441th), From 471fd2ff1df70fbaaa30b10a651b01b0c79b3e80 Mon Sep 17 00:00:00 2001 From: Christopher Piggott Date: Fri, 7 Sep 2018 23:07:28 -0400 Subject: [PATCH 04/12] Split out a base class for an insteon thermostat and created two instances, one for the 2441TH (which already existed) and one for the 2441V (currently adding). --- insteonplm/devices/climateControl.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/insteonplm/devices/climateControl.py b/insteonplm/devices/climateControl.py index ea535474..fe4fd020 100644 --- a/insteonplm/devices/climateControl.py +++ b/insteonplm/devices/climateControl.py @@ -106,14 +106,16 @@ def _mode_changed(self, addr, group, val): class ClimateControl_2441th(ClimateControl_Base): - """TH2441TH thermostat model""" + """TH2441TH thermostat model.""" + def __init__(self, plm, address, cat, subcat, product_key=None, description=None, model=None): """Constructor, delegates most work to the base thermostat class""" super().__init__(self, plm, address, cat, subcat, product_key, description, model) class ClimateControl_2441v(ClimateControl_Base): - """TH2441V thermostat adapter model""" + """TH2441V thermostat adapter model.""" + def __init__(self, plm, address, cat, subcat, product_key=None, description=None, model=None): """Constructor, delegates most work to the base thermostat class""" From c48fee66670981774f1c6f8719971c93c3039890 Mon Sep 17 00:00:00 2001 From: Christopher Piggott Date: Fri, 7 Sep 2018 23:11:54 -0400 Subject: [PATCH 05/12] formatting --- insteonplm/devices/climateControl.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/insteonplm/devices/climateControl.py b/insteonplm/devices/climateControl.py index fe4fd020..93ab48f5 100644 --- a/insteonplm/devices/climateControl.py +++ b/insteonplm/devices/climateControl.py @@ -15,9 +15,6 @@ _LOGGER = logging.getLogger(__name__) - - - class ClimateControl_Base(Device): """Thermostat model.""" @@ -103,20 +100,20 @@ def async_refresh_state(self): def _mode_changed(self, addr, group, val): self.async_refresh_state() - - class ClimateControl_2441th(ClimateControl_Base): """TH2441TH thermostat model.""" def __init__(self, plm, address, cat, subcat, product_key=None, description=None, model=None): - """Constructor, delegates most work to the base thermostat class""" - super().__init__(self, plm, address, cat, subcat, product_key, description, model) + """Constructor, delegates most work to the base thermostat class.""" + super().__init__(self, plm, address, cat, subcat, product_key, + description, model) class ClimateControl_2441v(ClimateControl_Base): """TH2441V thermostat adapter model.""" def __init__(self, plm, address, cat, subcat, product_key=None, description=None, model=None): - """Constructor, delegates most work to the base thermostat class""" - super().__init__(self, plm, address, cat, subcat, product_key, description, model) + """Constructor, delegates most work to the base thermostat class.""" + super().__init__(self, plm, address, cat, subcat, product_key, + description, model) From 101e1eebc2bd423b1d309b3e88399b5558331cba Mon Sep 17 00:00:00 2001 From: Christopher Piggott Date: Fri, 7 Sep 2018 23:14:58 -0400 Subject: [PATCH 06/12] add whitespace --- insteonplm/devices/climateControl.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/insteonplm/devices/climateControl.py b/insteonplm/devices/climateControl.py index 93ab48f5..3b9bd83b 100644 --- a/insteonplm/devices/climateControl.py +++ b/insteonplm/devices/climateControl.py @@ -15,6 +15,7 @@ _LOGGER = logging.getLogger(__name__) + class ClimateControl_Base(Device): """Thermostat model.""" @@ -100,6 +101,7 @@ def async_refresh_state(self): def _mode_changed(self, addr, group, val): self.async_refresh_state() + class ClimateControl_2441th(ClimateControl_Base): """TH2441TH thermostat model.""" @@ -109,6 +111,7 @@ def __init__(self, plm, address, cat, subcat, product_key=None, super().__init__(self, plm, address, cat, subcat, product_key, description, model) + class ClimateControl_2441v(ClimateControl_Base): """TH2441V thermostat adapter model.""" From c58fc3a375757a2b2441787b30e0442f6e98d5f9 Mon Sep 17 00:00:00 2001 From: Christopher Piggott Date: Sat, 8 Sep 2018 09:23:54 -0400 Subject: [PATCH 07/12] Created a base class for thermostats meant to handle multiple variants of the Insteon thermostat. Currently they are identical, but they won't be shortly. Fixed an apparent bug in states/thermostat where it referred to _update_method when the instance member of state is actually named _updatemethod. Note that this really should either be included in the constructor (best choice) or added as a proper property. If the convention is that things starting with _ are private to the class, then external classes shouldn't be reading or writing them. --- LICENSE.md | 21 +++++++++++++++++++++ insteonplm/devices/climateControl.py | 5 ++++- insteonplm/plm.py | 2 +- insteonplm/states/thermostat.py | 12 ++++++------ 4 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..6852ae3a --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +# MIT License + +Copyright (c) 2016 David McNett + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/insteonplm/devices/climateControl.py b/insteonplm/devices/climateControl.py index 3b9bd83b..ba8a174b 100644 --- a/insteonplm/devices/climateControl.py +++ b/insteonplm/devices/climateControl.py @@ -90,7 +90,9 @@ def async_refresh_state(self): address=self._address, commandtuple=COMMAND_EXTENDED_GET_SET_0X2E_0X00, cmd2=0x02, - userdata=Userdata()) + userdata=Userdata([ 0x01, 0x05, 0x0a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00])) ext_status.set_crc() _LOGGER.debug('Sending ext status: %s', ext_status) self._send_msg(ext_status) @@ -120,3 +122,4 @@ def __init__(self, plm, address, cat, subcat, product_key=None, """Constructor, delegates most work to the base thermostat class.""" super().__init__(self, plm, address, cat, subcat, product_key, description, model) + diff --git a/insteonplm/plm.py b/insteonplm/plm.py index c2ee55aa..2bba701e 100644 --- a/insteonplm/plm.py +++ b/insteonplm/plm.py @@ -649,7 +649,7 @@ def _get_device_info(self): self.devices.add_device_callback(self._new_device_added) for addr in self._aldb_devices: - _LOGGER.debug('Getting device info for %s', Address(addr).human) + _LOGGER.debug('Queueing send request for device info for %s', Address(addr).human) self._aldb_devices[addr].id_request() _LOGGER.debug('Ending _get_device_info') diff --git a/insteonplm/states/thermostat.py b/insteonplm/states/thermostat.py index caed75f1..fa81fa9c 100644 --- a/insteonplm/states/thermostat.py +++ b/insteonplm/states/thermostat.py @@ -43,7 +43,7 @@ def __init__(self, address, statename, group, send_message_method, send_message_method, message_callbacks, defaultvalue) - self._update_method = self._send_status_request + self._updatemethod = self._send_status_request self._register_messages() @@ -90,7 +90,7 @@ def __init__(self, address, statename, group, send_message_method, address, statename, group, send_message_method, message_callbacks, defaultvalue) - self._update_method = self._send_status_request + self._updatemethod = self._send_status_request self._register_messages() @@ -136,7 +136,7 @@ def __init__(self, address, statename, group, send_message_method, address, statename, group, send_message_method, message_callbacks, defaultvalue) - self._update_method = self._send_status_request + self._updatemethod = self._send_status_request self._register_messages() @@ -253,7 +253,7 @@ def __init__(self, address, statename, group, send_message_method, address, statename, group, send_message_method, message_callbacks, defaultvalue) - self._update_method = self._send_status_request + self._updatemethod = self._send_status_request self._register_messages() @@ -356,7 +356,7 @@ def __init__(self, address, statename, group, send_message_method, address, statename, group, send_message_method, message_callbacks, defaultvalue) - self._update_method = self._send_status_request + self._updatemethod = self._send_status_request self._register_messages() @@ -412,7 +412,7 @@ def __init__(self, address, statename, group, send_message_method, address, statename, group, send_message_method, message_callbacks, defaultvalue) - self._update_method = self._send_status_request + self._updatemethod = self._send_status_request self._register_messages() From ca9e15782a3365bcd0f2b71ca9afde14050fd278 Mon Sep 17 00:00:00 2001 From: Christopher Piggott Date: Sat, 8 Sep 2018 09:40:40 -0400 Subject: [PATCH 08/12] Un-doing an attempt to stuff userdata into the update method, which shoudln't have been there - that was intended for the backlight configuration command that isn't debugged yet --- insteonplm/devices/climateControl.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/insteonplm/devices/climateControl.py b/insteonplm/devices/climateControl.py index ba8a174b..c1010567 100644 --- a/insteonplm/devices/climateControl.py +++ b/insteonplm/devices/climateControl.py @@ -90,9 +90,7 @@ def async_refresh_state(self): address=self._address, commandtuple=COMMAND_EXTENDED_GET_SET_0X2E_0X00, cmd2=0x02, - userdata=Userdata([ 0x01, 0x05, 0x0a, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00])) + userdata=Userdata()) ext_status.set_crc() _LOGGER.debug('Sending ext status: %s', ext_status) self._send_msg(ext_status) From e82db952843e01174a98fc1b83899daea27e180d Mon Sep 17 00:00:00 2001 From: Christopher Piggott Date: Sat, 8 Sep 2018 09:55:57 -0400 Subject: [PATCH 09/12] Fixed formatting to make pylint happy. Have to learn to pay attention to spacing and line length more to satisfy pylint, and not make last-second changes just prior to commit without running tox first. --- insteonplm/devices/climateControl.py | 1 - insteonplm/plm.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/insteonplm/devices/climateControl.py b/insteonplm/devices/climateControl.py index c1010567..3b9bd83b 100644 --- a/insteonplm/devices/climateControl.py +++ b/insteonplm/devices/climateControl.py @@ -120,4 +120,3 @@ def __init__(self, plm, address, cat, subcat, product_key=None, """Constructor, delegates most work to the base thermostat class.""" super().__init__(self, plm, address, cat, subcat, product_key, description, model) - diff --git a/insteonplm/plm.py b/insteonplm/plm.py index 2bba701e..dba2014b 100644 --- a/insteonplm/plm.py +++ b/insteonplm/plm.py @@ -649,7 +649,8 @@ def _get_device_info(self): self.devices.add_device_callback(self._new_device_added) for addr in self._aldb_devices: - _LOGGER.debug('Queueing send request for device info for %s', Address(addr).human) + _LOGGER.debug('Queueing send request for device info for %s', + Address(addr).human) self._aldb_devices[addr].id_request() _LOGGER.debug('Ending _get_device_info') From 379b13526486521e42d29e3fbcf7eba0b0df32c3 Mon Sep 17 00:00:00 2001 From: Christopher Piggott Date: Sun, 9 Sep 2018 12:27:47 -0400 Subject: [PATCH 10/12] Rookie mistake: included 'self' parameter even though I used super() --- insteonplm/devices/climateControl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/insteonplm/devices/climateControl.py b/insteonplm/devices/climateControl.py index 3b9bd83b..3eee068a 100644 --- a/insteonplm/devices/climateControl.py +++ b/insteonplm/devices/climateControl.py @@ -108,7 +108,7 @@ class ClimateControl_2441th(ClimateControl_Base): def __init__(self, plm, address, cat, subcat, product_key=None, description=None, model=None): """Constructor, delegates most work to the base thermostat class.""" - super().__init__(self, plm, address, cat, subcat, product_key, + super().__init__(plm, address, cat, subcat, product_key, description, model) @@ -118,5 +118,5 @@ class ClimateControl_2441v(ClimateControl_Base): def __init__(self, plm, address, cat, subcat, product_key=None, description=None, model=None): """Constructor, delegates most work to the base thermostat class.""" - super().__init__(self, plm, address, cat, subcat, product_key, + super().__init__(plm, address, cat, subcat, product_key, description, model) From 6216f7261f2b67d0f7c4a7f2c181ab57ee55f848 Mon Sep 17 00:00:00 2001 From: Christopher Piggott Date: Sun, 9 Sep 2018 14:16:08 -0400 Subject: [PATCH 11/12] Added more debug logging for the thermostat device, and fixed some pylint warnings --- insteonplm/devices/climateControl.py | 13 ++++++++----- insteonplm/states/thermostat.py | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/insteonplm/devices/climateControl.py b/insteonplm/devices/climateControl.py index 3eee068a..121f83a8 100644 --- a/insteonplm/devices/climateControl.py +++ b/insteonplm/devices/climateControl.py @@ -25,6 +25,8 @@ def __init__(self, plm, address, cat, subcat, product_key=None, Device.__init__(self, plm, address, cat, subcat, product_key, description, model) + _LOGGER.debug("Created instance of Insteon Climate Controller") + self._stateList[0x01] = CoolSetPoint( self._address, "coolSetPoint", 0x01, self._send_msg, self._message_callbacks, 0x00) @@ -108,9 +110,9 @@ class ClimateControl_2441th(ClimateControl_Base): def __init__(self, plm, address, cat, subcat, product_key=None, description=None, model=None): """Constructor, delegates most work to the base thermostat class.""" - super().__init__(plm, address, cat, subcat, product_key, - description, model) - + _LOGGER.debug("Created instance of 2441TH controller") + ClimateControl_Base.__init__(self, plm, address, cat, subcat, + product_key, description, model) class ClimateControl_2441v(ClimateControl_Base): """TH2441V thermostat adapter model.""" @@ -118,5 +120,6 @@ class ClimateControl_2441v(ClimateControl_Base): def __init__(self, plm, address, cat, subcat, product_key=None, description=None, model=None): """Constructor, delegates most work to the base thermostat class.""" - super().__init__(plm, address, cat, subcat, product_key, - description, model) + _LOGGER.debug("Created instance of 2441V controller") + ClimateControl_Base.__init__(self, plm, address, cat, subcat, + product_key, description, model) diff --git a/insteonplm/states/thermostat.py b/insteonplm/states/thermostat.py index fa81fa9c..a1ec57f3 100644 --- a/insteonplm/states/thermostat.py +++ b/insteonplm/states/thermostat.py @@ -48,6 +48,7 @@ def __init__(self, address, statename, group, send_message_method, self._register_messages() def _send_status_request(self): + _LOGGER.debug("Sending status request") msg = StandardSend( address=self._address, commandtuple=COMMAND_THERMOSTAT_GET_ZONE_INFORMATION_0X6A_NONE, @@ -55,9 +56,11 @@ def _send_status_request(self): self._send_method(msg, self._status_received) def _status_received(self, msg): + _LOGGER.debug("Received temperature status update") self._update_subscribers(msg.cmd2 / 2) def _temp_received(self, msg): + _LOGGER.debug("Received temperature value update") self._update_subscribers(msg.cmd2 / 2) def _register_messages(self): @@ -102,9 +105,11 @@ def _send_status_request(self): self._send_method(msg, self._status_received) def _status_received(self, msg): + _LOGGER.debug("Received humidity status") self._update_subscribers(msg.cmd2) def _humidity_received(self, msg): + _LOGGER.debug("Received humidity value") self._update_subscribers(msg.cmd2) def _register_messages(self): @@ -188,9 +193,11 @@ def _send_status_request(self): self._send_method(msg, self._status_received) def _status_received(self, msg): + _LOGGER.info("mode standard status received") self._update_subscribers(ThermostatMode(msg.cmd2)) def _ext_status_received(self, msg): + _LOGGER.info("mode extended status received") sysmode = msg.userdata['d6'] ext_mode = sysmode >> 4 if ext_mode == 0: @@ -300,9 +307,11 @@ def _send_status_request(self): self._send_method(msg, self._status_received) def _status_received(self, msg): + _LOGGER.debug("Fan standard status message received") self._update_subscribers(ThermostatMode(msg.cmd2)) def _ext_status_received(self, msg): + _LOGGER.debug("Fan extended status message received") sysmode = msg.userdata['d6'] ext_mode = sysmode & 0x0f if ext_mode == 0: @@ -371,6 +380,7 @@ def set(self, val): self._send_method(msg, self._set_cool_point_ack) def _set_cool_point_ack(self, msg): + _LOGGER.debug("Cooling setpoint standard received") self._update_subscribers(msg.cmd2 / 2) def _send_status_request(self): @@ -381,6 +391,7 @@ def _send_status_request(self): self._send_method(msg, self._status_message_received) def _status_message_received(self, msg): + _LOGGER.debug("Cooling standard status received") self._update_subscribers(msg.cmd2 / 2) def _register_messages(self): @@ -398,6 +409,7 @@ def _register_messages(self): self._ext_status_received) def _ext_status_received(self, msg): + _LOGGER.debug("Cooling extended status received") cool_sp = msg.userdata['d7'] / 2 self._update_subscribers(cool_sp) @@ -437,6 +449,7 @@ def _send_status_request(self): self._send_method(msg, self._status_message_received) def _status_message_received(self, msg): + _LOGGER.debug("Heating standard status received") self._update_subscribers(msg.cmd2 / 2) def _register_messages(self): @@ -457,5 +470,6 @@ def _register_messages(self): self._ext_status_received) def _ext_status_received(self, msg): + _LOGGER.debug("Heating extended status received") heat_sp = msg.userdata['d12'] / 2 self._update_subscribers(heat_sp) From 84615f5f570997211308616635f204ccb5e9cb50 Mon Sep 17 00:00:00 2001 From: Christopher Piggott Date: Tue, 11 Sep 2018 08:17:32 -0400 Subject: [PATCH 12/12] Two spaces before starting new class --- insteonplm/devices/climateControl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/insteonplm/devices/climateControl.py b/insteonplm/devices/climateControl.py index 121f83a8..de35c055 100644 --- a/insteonplm/devices/climateControl.py +++ b/insteonplm/devices/climateControl.py @@ -114,6 +114,7 @@ def __init__(self, plm, address, cat, subcat, product_key=None, ClimateControl_Base.__init__(self, plm, address, cat, subcat, product_key, description, model) + class ClimateControl_2441v(ClimateControl_Base): """TH2441V thermostat adapter model."""