Improving support for 2441V Insteon Thermostat Adaptor for Venstar

Hi there,

It looks like this thermostat is not fully supported in this binding, system mode in particular. From my tests, this thermostat has 6 states (state 4 intentionally left out)):

  • 0 - 0x00 - off
  • 1 - 0x04 - heat
  • 2 - 0x05 - cool
  • 3 - 0x06 - auto
  • 5 - 0x0A - program heat
  • 6 - 0x0B - program cool

The current code handles 5 states, 0 through 4, most likely what the Insteon thermostat 2441TH supports (I do not have one to test):

  • 0 - 0x00 - off
  • 1 - 0x04 - heat
  • 2 - 0x05 - cool
  • 3 - 0x06 - auto
  • 4 - 0x0A - program

I am currently working on modifying the code to accommodate these additional states. I would welcome any input on this, especially from the code maintainers.

Thanks.

I haven’t seen any “maintainers” for Insteon around here for a while. That being said, I suspect you can do this with a couple of new xml files. I added a feature (on level) to my dimmers last year as documented here.

Feel free to take a look and ask questions, maybe this will lead you closer to a solution. You’ll need to compare the existing thermostat xml file commands to the commands yours needs - then make a new device for yourself.

Good luck!

@Bernd_Pfrommer are you still around?

I’m not sure the question requires Bernd. While he is the OH Insteon plug-in author I think the question is more generic. How does one contribute changed to the OH project? I’ve also added some capability but never figured out how to submit this.

Basically you need to submit a pull request with your change. More info can be found at https://www.openhab.org/docs/developer/contributing/contributing.html

It doesn’t seem like a pull request / binding update is necessary here. Reading through the documentation on the Insteon binding it’s set up to add more devices through the pair of custom xml files as I show in my link above.

Of course, if anyone is doing a pull request then I’ll try to get my dimmer on level feature added as well!

Without the pull request, it will be a custom one-off change and won’t be included in the binding.

You’ve convinced me. I’ll add mine as a pull request tonight.

Pull request here

Thanks @crxporter for the info. It is not obvious to me how to add support for these changes using the xml files. I will have to dig a little deeper.

However, by changing the code directly, I was able to control/get feedback for all the 6 states mentioned above. One exception: I am not able to set state “5 - program heat” from OpenHAB, but when I select it at the thermostat, it shows correctly in OpenHAB. This may be a problem with my thermostat adapter, as I am not able to set this state not even when I send the raw command via plmsend.

I am reluctant to make a pull request until I am sure it works as expected. Also, I am not sure how these changes will impact the support for the 2442TH thermostat. Meanwhile, you can see below the code changes I made.

package org.openhab.binding.insteonplm.internal.device;
...
public abstract class MessageHandler {
...
   /**
    * Handle reply to system mode change command
    */
    public static class ThermostatSystemModeReplyHandler extends NumberMsgHandler {
        ThermostatSystemModeReplyHandler(DeviceFeature p) {
            super(p);
        }
        @Override
        public int transform(int raw) {
            switch (raw) {
                case 0x09:
                    return (0); // off
                case 0x04:
                    return (1); // heat
                case 0x05:
                    return (2); // cool
                case 0x06:
                    return (3); // auto
                case 0x0A:
                    return (5); // program heat
                case 0x0B:
                    return (6); // program cool
                default:
                    break;
            }
            return (5); // when in doubt assume to be in "program" mode
        }
    }
...
public abstract class CommandHandler {
...
   /**
    * Handler to set the thermostat system mode
    */
    public static class ThermostatSystemModeCommandHandler extends NumberCommandHandler {
        ThermostatSystemModeCommandHandler(DeviceFeature f) {
            super(f);
        }
        @Override
        public int transform(int cmd) {
            switch (cmd) {
                case 0:
                    return (0x09); // off
                case 1:
                    return (0x04); // heat
                case 2:
                    return (0x05); // cool
                case 3:
                    return (0x06); // auto (aka manual auto)
                case 4:
                    return (0x0A); // program  
                case 5:
                    return (0x0A); // program heat
                case 6:
                    return (0x0B); // program cool
                default:
                    break;
            }
            return (0x0A); // when in doubt go to program
        }
    }
...

For a quick reference, I also uploaded the page from the developer’s manual that lists the available commands. Unfortunately, they do not specifically distinguish between various thermostats.
Books.pdf (99.2 KB)

@pmm, thanks for posting!
Alas, your code will break the binding for the other thermostats.
Please make another command handler (“Thermostat2SystemModeCommandHandler”?) and likewise for the reply handler. Then use those handler instead for the 2441V.
Thanks!