Insteon Thermostat 2441TH for ISY

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?

This should be fixed in the latest version on HACS.

  1. I haven’t changed the sensor string, in fact these aren’t even referenced anywhere in the hassio config. I only use them in floorplan and homekit.
  2. Unlike my thermostat device, these aren’t grouped since at one point I had them in separate folders in the ISY UI.

My other I/O Linc that is acting the same way doesn’t have sensor in the name and is only mentioned in customize.yaml (which of course isn’t working since there I refer to it as a switch and it’s coming in as a sensor):

switch.projector_screen_trigger:
  hidden: true

The developer tools show:

Entity State Attributes
sensor.projector_screen 0.0 unit_of_measurement: 100 friendly_name: Projector Screen
sensor.projector_screen_trigger 0.0 unit_of_measurement: 100 friendly_name: Projector Screen Trigger

And the nodes look like:

  <node flag="128" nodeDefId="BinaryControl_ADV">
    <address>28 C0 72 1</address>
    <name>Projector Screen Trigger</name>
    <parent type="3">62374</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>28 C0 72 1</pnode>
    <property id="ST" value="0" formatted="Off" uom="100"/>
  </node>
  <node flag="0" nodeDefId="RelayLampOnly">
    <address>28 C0 72 2</address>
    <name>Projector Screen</name>
    <parent type="3">62374</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>28 C0 72 1</pnode>
    <property id="ST" value="0" formatted="Off" uom="100"/>
  </node>

Upgrade in progress… I’ll let you know if it has any effect on the other issues I’m seeing.

@shbatm any more thoughts on the sensor or the 24-hour clock issues?