Insteon Thermostat 2441TH for ISY

Thanks for the update. I’m not sure why it was working on my instance and not yours. I added the changes and pushed a new version to GitHub.

Works great! Just installed without issue. Running ISY 5.0.14 and latest Hass.io on RPi3.

As per the instructions @shbatm posted on March 26th, I just got this working on my Hassio instance, as well. Super simple, but for the less adventurous folks, here’s a bit more detail: I ssh’d into my instance (enable the ssh add-on, first, of course), created a temporary directory into which I cloned the repo, did git checkout isy994-climate-dev to get files in the branch, then copied the contents of the isy994 directory from the repo into /config/custom_components/isy994/. Finally, reboot the Hassio RPi and…viola! My Insteon thermostats show up as entities I can play with in HA now. Super stoked! Thanks for working on this @shbatm! :smile: :beers:

I just installed the custom component but the temp is wrong. First I thought it was Celsius, but its not. Any idea?

Figured it out. I downloaded the dev branch.

All,

I just pushed another round of updates to the isy994-climate-dev branch–this is for compatibility with the new climate-1.0 framework in Home Assistant version > 0.96.0b0.

I also had to clean-up my code and branches, getting ready for some PRs. isy994-climate-dev now includes the general cleanup and Z-wave expansion in isy994-zwave-x. Use isy994-climate-dev if you want ALL of the changes I have been working on.

1 Like

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.