CT101 thermostat not supported in OpenHab2 z-wave binding?

i also just purchased this thermostat off Amazon.ca for the same reasons and would appreciate it being implemented in the binding. How much beer are we looking at to get it done?

I purchased mine from Amazon, it is the radio thermostat version not the iris version.
The fact that it created a node xml file is an improvement from the previous firmware version and give some hope to have it working with openhab2.
But I donā€™t know anything about the z wave binding.

If it generated the XML, then I would say it is probably updated firmwareā€¦ I guess the obvious question is ā€œdoes it workā€? :wink: .

Unfortunately we are talking about two different products. Iā€™m not sure if I can paste links to Amazon listings in this forum, but mine is the CT101 ā€œIRISā€ version ($50), and I think pailloā€™s is the original CT101 ($100). Maybe itā€™s enough to get the node XML file into the database to get his working, but I still have the same issue with the non-standards compliant zwave firmware in the IRIS variant (detailed earlier in this thread). Enabling the OH community at large to be able to purchase the half price thermostats is worth a look :slight_smile:

When I did network inclusion OH2 found the new thing and added it into the list, however since then it (~24Hrs) it only shows up as ā€œController Offlineā€.

On the CT101 it shows that it is connected to the network (Tower with Link below and ā€œ1ā€ beside tower). So not sure why the thermostat and my newly installed light switch wont show up normally like my other 2 sensors and outlet doā€¦

I tried re-adding it into the network last night as well but remained offline like the first time.

Mine is a Radio Thermostat but in the manual it says ā€œā€¦has built in zwave radioā€¦to communicate with the Iris* Systemā€¦ā€ and it did show up in OH2 with IDā€™s and all that just wont allow status and control, almost like it didnā€™t quite complete the recognition process even though it recognises it as a thermostat class thing,ā€¦

I have tried with the snapshot binding from the 10/10 and the device is properly recognised. All the channels are available.
I have not tested all the functionalities but I can read the temperature, humidity, set the target temp, thermostat mode, fan mode. So looking really good so far!
Type:ID = 6501:000D is good to go!

Thanks

1 Like

Iā€™m going to take a chance and post an Amazon link, hoping thatā€™s not against the forum rules. This is the IRIS version of the CT101 that I bought: https://www.amazon.com/gp/product/B01MZG4TX7/

The biggest advantage is that itā€™s cheap! The biggest disadvantage is that it doesnā€™t implement zwave correctlyā€¦ Anyway, Iā€™m glad that paillo has his CT101 working now but Iā€™m still wondering if I should return mine and buy the standard CT101 for 2x the price. Chris, please let me know if youā€™re up for some hacking :slight_smile:

@paillo, where you downloaded the build?
I have the same issue and I hope it will solve it for me too.
Thanks

@alfredosc8, I downloaded the last build from the openhab2 repo:
https://openhab.ci.cloudbees.com/job/openHAB2-Bundles/lastStableBuild/org.openhab.binding%24org.openhab.binding.zwave/

I take it thatā€™s a ā€œnoā€ for attempting the workaround. No worries, I will return the CT101-IRIS to Amazon and order the ā€œregularā€ CT101 instead. Itā€™s too bad about the buggy firmware. The HA community deserves a cheap zwave thermostat :slight_smile:

I decided to take a stab at it myself, and appear to have achieved some level of success! I got the temperature reading at least. More testing WIP. Hereā€™s the patch so far:

--- a/src/main/java/org/openhab/binding/zwave/internal/protocol/commandclass/ZWaveMultiInstanceCommandClass.java
+++ b/src/main/java/org/openhab/binding/zwave/internal/protocol/commandclass/ZWaveMultiInstanceCommandClass.java
@@ -210,8 +210,19 @@ public class ZWaveMultiInstanceCommandClass extends ZWaveCommandClass {
         CommandClass commandClass = CommandClass.getCommandClass(commandClassCode);

         if (commandClass == null) {
-            logger.debug(String.format("NODE %d: Unsupported command class 0x%02x", getNode().getNodeId(),
-                    commandClassCode));
+            if (this.getNode().getManufacturer() == 0x98 && this.getNode().getDeviceType() == 0x6501
+                    && this.getNode().getDeviceId() == 0xc) {
+                logger.debug(String.format(
+                        "NODE %d: DEVICE BUG WORKAROUND, handling MULTI_INSTANCE message as MULTI_CHANNEL",
+                        getNode().getNodeId()));
+                handleMultiChannelEncapResponse(serialMessage, offset);
+            } else {
+                logger.debug(String.format("NODE %d: Unsupported command class 0x%02x", getNode().getNodeId(),
+                        commandClassCode));
+            }
             return;
         }

edit: removed useless debug print from patch

Nice one. I donā€™t think itā€™s too hard to make this work - itā€™s harder to do it nicely in a way that isnā€™t a hack and thatā€™s what I would like to avoid in the master binding.

1 Like

I take it youā€™re (nicely) calling my code a hack :slight_smile:

Iā€™m OK with that. Let me know if you have any suggestions for how to better integrate it into the master binding. In the meantime I will continue using my locally modified version. Itā€™s working 100% so far.

And Iā€™m off to Amazon to buy a couple more of the cheap CT101ā€™s!

To be honest, I didnā€™t look that closely, but since you askā€¦ :wink:

The sort of thing I donā€™t like are hardcoding manufacturer/device data into the binding. Itā€™s better to set a flag somewhere, and have that flag updated by (say) the database which is how most of these ā€œhacksā€ are done.

You also need to make sure that this doesnā€™t cause problems for newer versions of the device?

Understood. Good feedback. If you look at more of the code around where I made changes, specifically the context of where it has been added, I basically put a ā€œlast resortā€ in an existing failure path. A newer version of the device with corrected firmware would not even be in that method call. Let me paste a bit more context:

Hereā€™s what it was originally:

    private void handleMultiInstanceEncapResponse(SerialMessage serialMessage, int offset)
            throws ZWaveSerialMessageException {
        logger.trace("Process Multi-instance Encapsulation");
        int instance = serialMessage.getMessagePayloadByte(offset);
        int commandClassCode = serialMessage.getMessagePayloadByte(offset + 1);
        CommandClass commandClass = CommandClass.getCommandClass(commandClassCode);

        if (commandClass == null) {
            logger.debug(String.format("NODE %d: Unsupported command class 0x%02x", getNode().getNodeId(),
                        commandClassCode));
            return;
        }

And my new version next. The handleMultiInstanceEncapResponse method call was about to fail anyway.

    private void handleMultiInstanceEncapResponse(SerialMessage serialMessage, int offset)
            throws ZWaveSerialMessageException {
        logger.trace("Process Multi-instance Encapsulation");
        int instance = serialMessage.getMessagePayloadByte(offset);
        int commandClassCode = serialMessage.getMessagePayloadByte(offset + 1);
        CommandClass commandClass = CommandClass.getCommandClass(commandClassCode);

        if (commandClass == null) {
            if (this.getNode().getManufacturer() == 0x98 && this.getNode().getDeviceType() == 0x6501
                    && this.getNode().getDeviceId() == 0xc) {
                logger.debug(String.format(
                        "NODE %d: DEVICE BUG WORKAROUND, handling MULTI_INSTANCE message as MULTI_CHANNEL",
                        getNode().getNodeId()));
                handleMultiChannelEncapResponse(serialMessage, offset);
            } else {
                logger.debug(String.format("NODE %d: Unsupported command class 0x%02x", getNode().getNodeId(),
                        commandClassCode));
            }
            return;
        }

I guess what you are suggesting is something more like this:

    private void handleMultiInstanceEncapResponse(SerialMessage serialMessage, int offset)
            throws ZWaveSerialMessageException {
        logger.trace("Process Multi-instance Encapsulation");
        int instance = serialMessage.getMessagePayloadByte(offset);
        int commandClassCode = serialMessage.getMessagePayloadByte(offset + 1);
        CommandClass commandClass = CommandClass.getCommandClass(commandClassCode);

        if (commandClass == null) {
            if (this.getNode().getWorkaroundFlag()) {  // where this flag comes from the DB...
                logger.debug(String.format(
                        "NODE %d: DEVICE BUG WORKAROUND, handling MULTI_INSTANCE message as MULTI_CHANNEL",
                        getNode().getNodeId()));
                handleMultiChannelEncapResponse(serialMessage, offset);
            } else {
                logger.debug(String.format("NODE %d: Unsupported command class 0x%02x", getNode().getNodeId(),
                        commandClassCode));
            }
            return;
        }

Using the latest snapshot it is detected and it works perfectly, I have 2 of them in my house

1 Like

Alfredo, whatā€™s the Device Type:ID for the CT101ā€™s you are using? Is it 6501:000d or 6501:000c?

@alfredosc8 @jschmidt

I have 2 Iris CT101 Z-wave Thermostats in my amazon cart right now - if I bump openhab to the latest 2.1 snapshot they should work perfectly? Or is there a specific revision of the Iris product that I need to look for? The price is great but if I canā€™t get them to workā€¦ not so much :wink:

Iā€™m just looking for confirmation of support before I hit the checkout button.

Walter, my ones are not the iris version but from rtc and they are ct101.
Iā€™m using the latest from the nightly build because the ct101 profile has been added in late spring.
It has the humidity too and it is returned.