Insteon Thermostat 2441TH for ISY

FYI to anyone using these updates:

1 Like

I see that PR has been closed pending the PyISY updates, how goes things with that?

@shbatm With the current branch my Venstar thermostat isnā€™t being recognized. When I had this issue earlier (Jun 10 above) you had me add 5.3.149 to the insteon climate types, but it looks like that list doesnā€™t exist any more. Any ideas on how to get the Venstar recognized with the new code? There arenā€™t any errors in the log other than some issues with recognizing Polyglot nodes.

This is what my thermostat node looks like:

<node flag="128" nodeDefId="Thermostat">
  <address>14 14 F0 1</address>
  <name>Thermostat</name>
  <type>5.3.149.0</type>
  <enabled>true</enabled>
  <deviceClass>1</deviceClass>
  <wattage>1000</wattage>
  <dcPeriod>60</dcPeriod>
  <startDelay>0</startDelay>
  <endDelay>0</endDelay>
  <pnode>14 14 F0 1</pnode>
  <property id="ST" value="152" formatted="76.0Ā°" uom="101"/>
  <property id="CLIMD" value="7" formatted="Program Cool" uom="98"/>
  <property id="CLISPC" value="150" formatted="75.0Ā°" uom="101"/>
  <property id="CLISPH" value="136" formatted="68.0Ā°" uom="101"/>
  <property id="CLIHUM" value="41" formatted="41%" uom="22"/>
</node>

Still in testing right now, the changes to PyISY ended up being more significant than originally intented ā€“ trying to make sure all the bugs are worked out, which you and everyone else here reporting errors are helping with. I donā€™t have a timeline, but I hope to start recreating the Pull Requests by the end of the year.

About the Venstar thermostat; the list has moved the the const.py file, but I expanded the thermostats to include everything that starts with type ā€œ5.ā€ so Iā€™m not sure what the issue is now.

Just a few things to check:

  1. Youā€™re running Home Assistant > 0.96
  2. You pulled all of the files for the new branch, including const.py
  3. You donā€™t see ā€œAdding ISY node 14 14 F0 1 to Climate platformā€ anywhere in the logs (debug must be enabled for custom_component.isy994).

Ugh, but if we get better support for the ISY out of it (maybe including Polyglot servers so I can get my whole house fan working) itā€™ll be a big win in the long run.

  1. Yep, Iā€™m on 0.97.2
  2. Yep, everything from homeassistant/components/isy994 got copied over to custom_components/isy994
  3. I see events for the node, but not it being added. Although, in looking at the debug logs I donā€™t see anything else being added (or at least no ā€œAdding xxxā€ messages), yet I have plenty of lights, switches, etc. coming from the ISY.

I only see climate for Elk and ZWave, nothing for insteon:

2019-08-13 14:07:01 INFO (SyncWorker_0) [homeassistant.loader] Loaded climate from homeassistant.components.climate
2019-08-13 14:07:05 INFO (MainThread) [homeassistant.setup] Setting up climate
2019-08-13 14:07:05 INFO (MainThread) [homeassistant.setup] Setup of domain climate took 0.0 seconds.
2019-08-13 14:07:12 INFO (MainThread) [homeassistant.components.climate] Setting up climate.zwave
2019-08-13 14:07:14 INFO (MainThread) [homeassistant.components.climate] Setting up climate.elkm1
2019-08-13 14:08:13 INFO (SyncWorker_4) [homeassistant.loader] Loaded ambiclimate from homeassistant.components.ambiclimate

Here is the output of a grep for 14 14 F0 1 from the log:

2019-08-13 14:07:04 INFO (Thread-2) [homeassistant.components.isy994] ISY Node Control Event: 14 14 F0 1 CLISPH
2019-08-13 14:07:04 INFO (Thread-2) [homeassistant.components.isy994] ISY Node Control Event: 14 14 F0 1 CLISPC
2019-08-13 14:07:04 INFO (Thread-2) [homeassistant.components.isy994] ISY Node Control Event: 14 14 F0 1 CLIFS
2019-08-13 14:07:04 INFO (Thread-2) [homeassistant.components.isy994] ISY Node Control Event: 14 14 F0 1 CLIHUM
2019-08-13 14:07:04 INFO (Thread-2) [homeassistant.components.isy994] ISY Node Control Event: 14 14 F0 1 UOM
2019-08-13 14:07:04 INFO (Thread-2) [homeassistant.components.isy994] ISY Node Control Event: 14 14 F0 1 CLIMD
2019-08-13 14:07:04 INFO (Thread-2) [homeassistant.components.isy994] ISY Updated Node: 14 14 F0 1
2019-08-13 14:07:04 INFO (Thread-2) [homeassistant.components.isy994] ISY Node Control Event: 14 14 F0 1 ST
2019-08-13 14:07:04 INFO (Thread-2) [homeassistant.components.isy994] ISY Node Control Event: 14 14 F0 1 CLIHCS
2019-08-13 14:08:07 INFO (Thread-2) [homeassistant.components.isy994] ISY Updated Node: 14 14 F0 1
2019-08-13 14:08:07 INFO (Thread-2) [homeassistant.components.isy994] ISY Node Control Event: 14 14 F0 1 ST
2019-08-13 14:09:11 INFO (Thread-2) [homeassistant.components.isy994] ISY Updated Node: 14 14 F0 1
2019-08-13 14:09:11 INFO (Thread-2) [homeassistant.components.isy994] ISY Node Control Event: 14 14 F0 1 ST
2019-08-13 14:10:18 INFO (Thread-2) [homeassistant.components.isy994] ISY Updated Node: 14 14 F0 1
2019-08-13 14:10:18 INFO (Thread-2) [homeassistant.components.isy994] ISY Node Control Event: 14 14 F0 1 ST
2019-08-13 14:11:24 INFO (Thread-2) [homeassistant.components.isy994] ISY Updated Node: 14 14 F0 1
2019-08-13 14:11:24 INFO (Thread-2) [homeassistant.components.isy994] ISY Node Control Event: 14 14 F0 1 ST
2019-08-13 14:14:39 INFO (Thread-2) [homeassistant.components.isy994] ISY Node Control Event: 14 14 F0 1 CLIHUM
2019-08-13 14:15:45 INFO (Thread-2) [homeassistant.components.isy994] ISY Node Control Event: 14 14 F0 1 CLIHUM

Do you have this node ā€œgroupedā€ in the ISY? It looks like it may be since pnode is the same as the node address. This is causing problems in PyISY right now (grouped nodes arenā€™t being added).

EDIT: Still check this, but I donā€™t think itā€™s the issue any more. I just double checked mine and they list themselves as the parent node also.

EDIT 2: I added your node XML into my ā€œfake ISYā€ and it was picked up fine by Hass, so now Iā€™m not sure what it could be. Iā€™ll keep poking around. If youā€™re willing you can send me a private message with a pastebin (or similar) link to your full http://isy-ip/rest/nodes file and I can try and troubleshoot further.

Grouped as in a folder? No, my thermostat is in the top My Lighting folder.

Grouped as in the ā€œsub-nodesā€ are grouped under the main node.

Ungrouped:

Grouped:
image

Ah, yes I do. That appears to be the default as I never grouped them as far as I can remember.

ANNOUNCEMENT: Until these changes are merged into HASS, they are now available in HACS (Home Assistant Community Store) under ISY994.

1 Like

See if ungrouping helps. If not, Iā€™ll need the full nodes file, because I canā€™t see anything else wrong.

Iā€™m now running this via HACS, so that should at least make installing updates easier.

I just ungrouped the three Thermostat nodes, and I get a climate device in Hassio! However, it is throwing some errors in the logs:

2019-08-14 16:22:01 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up platform isy994
Traceback (most recent call last):
  File "/config/custom_components/isy994/binary_sensor.py", line 62, in async_setup_platform
    parent_device = devices_by_nid[node.parent_node.nid]
KeyError: '14 14 F0 1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 149, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/config/custom_components/isy994/binary_sensor.py", line 68, in async_setup_platform
    node.parent_nid,
AttributeError: 'Node' object has no attribute 'parent_nid'

One other error I ran into, it looks like PyISY doesnā€™t like my 24-hour clock. Unchecking that got around this problem, but I do prefer having a 24 hour clock when I can.

2019-08-14 15:56:59 ERROR (MainThread) [homeassistant.setup] Error during setup of component isy994
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 168, in _async_setup_component
    hass, processed_config
  File "/config/custom_components/isy994/__init__.py", line 464, in async_setup
    log=_LOGGER,
  File "/usr/local/lib/python3.7/site-packages/PyISY/isy.py", line 81, in __init__
    self.programs = Programs(self, xml=self.conn.get_programs())
  File "/usr/local/lib/python3.7/site-packages/PyISY/Programs/__init__.py", line 75, in __init__
    self.parse(xml)
  File "/usr/local/lib/python3.7/site-packages/PyISY/Programs/__init__.py", line 201, in parse
    plastrun = datetime.strptime(plastrun, "%Y/%m/%d %I:%M:%S %p")
  File "/usr/local/lib/python3.7/_strptime.py", line 577, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/local/lib/python3.7/_strptime.py", line 359, in _strptime
    (data_string, format))
ValueError: time data '2019/08/14 15:56:55' does not match format '%Y/%m/%d %I:%M:%S %p'

@shbatm I just found one other problem with this version. My IOLinc is being detected as a sensor instead of a switch ā€“ it was coming in as a switch in the native isy994 code. The following should be switch.hot_water_recirc and sensor.hot_water_recirc.

sensor.hot_water_recirc 0.0 unit_of_measurement: 100 friendly_name: Hot Water Recirc
sensor.hot_water_recirc_sensor 0.0 unit_of_measurement: 100
friendly_name: Hot Water Recirc-Sensor

Here is what shows up in the debug log for that device:

2019-08-15 14:57:42 DEBUG (Thread-3) [custom_components.isy994] ISY Update Received:
<?xml version="1.0"?><Event seqnum="140" sid="uuid:2003"><control>ST</control><action uom="100" prec="0">0</action><node>48 AD C6 1</node><eventInfo></eventInfo><fmtAct>Off</fmtAct></Event>
2019-08-15 14:57:42 DEBUG (Thread-3) [custom_components.isy994] ISY Updated Node: 48 AD C6 1
2019-08-15 14:57:42 DEBUG (Thread-3) [custom_components.isy994] ISY Update Received:
<?xml version="1.0"?><Event seqnum="141" sid="uuid:2003"><control>ST</control><action uom="100" prec="0">0</action><node>48 AD C6 2</node><eventInfo></eventInfo><fmtAct>Off</fmtAct></Event>
2019-08-15 14:57:42 DEBUG (Thread-3) [custom_components.isy994] ISY Updated Node: 48 AD C6 2

And the node data for it:

  <node flag="128" nodeDefId="BinaryControl_ADV">
    <address>48 AD C6 1</address>
    <name>Hot Water Recirc-Sensor</name>
    <parent type="3">32825</parent>
    <type>7.0.65.0</type>
    <enabled>true</enabled>
    <deviceClass>0</deviceClass>
    <wattage>0</wattage>
    <dcPeriod>0</dcPeriod>
    <startDelay>0</startDelay>
    <endDelay>0</endDelay>
    <pnode>48 AD C6 1</pnode>
    <property id="ST" value="0" formatted="Off" uom="100"/>
  </node>
  <node flag="0" nodeDefId="RelayLampOnly">
    <address>48 AD C6 2</address>
    <name>Hot Water Recirc</name>
    <type>7.0.65.0</type>
    <enabled>true</enabled>
    <deviceClass>0</deviceClass>
    <wattage>0</wattage>
    <dcPeriod>0</dcPeriod>
    <startDelay>0</startDelay>
    <endDelay>0</endDelay>
    <pnode>48 AD C6 1</pnode>
    <property id="ST" value="0" formatted="Off" uom="100"/>
  </node>

@shbatm Nice work on this code. With it, I am experiencing improved performance between the ISY994 and Home Assistant.

My system has an Insteon 8-button Mini Remote. The remote is not being properly detected in this version of code. With the native code, the entities of the 8 individual buttons were coming in as lights (eg. light.mini_remote_a, light.mini_remote_b, etc.). Iā€™m not sure that light is proper, but the entities did reflect the states of the remote buttons.

With this version, only two entities show up (sensor.mini_remote_e and sensor.mini_remote_h) and each has a state of 255, 255 100. Neither entity changes state when the respective Mini Remote button is depressed.

Would this version of code have an effect on the Mini Remote? Let me know if you need any additional information.
Thanks!


EDIT: Disregard this post about the Mini Remote operation. I believe any perceived issues have to do with how my Mini Remote is setup. I am making adjustments and it seems to be working, just not as originally expected.

@shbatm Iā€™m not sure if youā€™ve had any time to look at this lately, but I have the following remaining issues with the current version I have installed via. HASC:

  • The grouping issue with the thermostat we already talked about
  • If I set ISY for a 24-hour clock, it fails to start (errors in my post above)
  • Several of my sensors are now showing up as switches. This includes my two IOLincs and the sense lines on a couple of In-LineLincs that I have installed on motion lights. I included some debug logs in a post above as well as the node data for one of the IOLincs.
  • Something odd is going on between the climate module and homekit, but I donā€™t know if it is the ISY code or something in homekit. It seems to be confusing the cool and heat setpoints, for example I currently have the thermostat in Program Cool mode with a setpoint of 76, but homekit shows a setpoint of 70 ā€“ which isnā€™t even the heat setpoint, that would be 68.

Thanks again for all the work you have put into this so far!

@sjthespian ā€“ I will look into these. Away and swamped with work for the next week, but should be able to look at them after that.

@shbatm Great job on the component, Iā€™m glad someone is finally addressing the long outstanding issues- lost track of how many issues I opened!

Would really just like some advice; on how to make the switch, and try out your component?

Iā€™ve got numerous switches, fans, outlets, dimmers, a thermostat, etc, as well as dozens of automations and scripts tied to said components. I had to manually hack the thermostat into HA, as itā€™s controlled over z-wave, via the ISY. So I wrote a handful of shell scripts that interface with the thermostat via the ISY API- itā€™s hacky for sure, but it works great, but not nearly as great as just having a thermostat entity id.

So, would I just install your component via HACS? Does it take precedence over the non-custom-component? Would I loose, and have to change all my current entity idā€™s?

I believe my scripts/components to control the thermostat could coexist, just in case. Iā€™d hate to loose thermostat control in the middle of the summer. Any problem with this?

Anyways, enough rambling, ya get the idea.

Cheers.

@xstrex

Step 1. Make a backup of your config.

But after that, yes, installing via HACS should take precedent over the built-in ISY994 component. I havenā€™t updated anything with the entity naming so it should just be a drop-in replacement with the additional features, and should not change your entity naming. It is intended long-term to merge this into HA core as an update, so I tried to minimize breaking changes.

Config is git backed so weā€™re good there.

Great news, it works!
Installed your component, restarted HA, now I have a climate.thermostat, everything else still works as well. Thanks for all your continued work on this!

Just realized I skipped over this. 2 things:

  1. Do you have the sensor string changed to something else in your HASS config file? If not, it defaults to ā€œsensorā€ and is seeing ā€œsensorā€ in the name of the device, so itā€™s treating it that way. If you do have it set to something else, I have some digging to do.
  2. Do you have the two IOLinc nodes ā€œgroupedā€ (nested with each other) in the ISY Admin Console?