node-zwave-js icon indicating copy to clipboard operation
node-zwave-js copied to clipboard

fix(config): support Comet parameters properly

Open Mart124 opened this issue 1 year ago • 5 comments

Hello,

This PR fixes / enhances the Eurotronic Comet Z-Wave in various ways.

1. Manufacturer specific mode (1st commit)

I have Eurotronic CometZ-Wave devices, which report like this : https://pastebin.com/raw/zbF6cpfY

As for the Eurotronic Spirit devices, the Manufacturer mode is supported / documented, but not reported by the device.

        "4-64-0-mode": {
          "endpoint": 0,
          "commandClass": 64,
          "commandClassName": "Thermostat Mode",
          "property": "mode",
          "propertyName": "mode",
          "ccVersion": 3,
          "metadata": {
            "type": "number",
            "readable": true,
            "writeable": true,
            "label": "Thermostat mode",
            "min": 0,
            "max": 255,
            "states": {
              "0": "Off",
              "1": "Heat",
              "11": "Energy heat",
              "15": "Full power"
            },
            "stateful": true,
            "secret": false
          },
          "value": 1
        },

Interestingly enough is the Full power mode, reported by the device, but not documented by Eurotronic. Device's firmware may have been updated since the documentation...

Let's then apply the same modification as for the Spirit device : https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/devices/0x0148/spirit.json

Result :

image

Note that when enabling the Manufacturer specific mode in Home Assistant through its default / builtin thermostat, it works, but also reports the following warning : Failed to call service climate/set_hvac_mode. expected HVACMode or one of 'off', 'heat', 'cool', 'heat_cool', 'auto', 'dry', 'fan_only' for dictionary value @ data['hvac_mode']

When setting the Manufacturer specific mode manually (through Home Assistant Developer Tools / zwave_js.set_value), the warning does not trigger. Should then be related to the default / builtin thermostat itself.

2. Supervision (2nd commit)

There's a report here indicating that parameters can't be set. As found on other devices, seems like Comet device does not like supervision. Let's then disable it. It then fixes https://github.com/home-assistant/core/issues/103254. Should a report be made to Eurotronic about supervision ?

3. Valve opening (3rd commit)

Some devices report valve opening parameter, some don't, may be related to firmware version (or to template used, I'm not sure here...). But even when not initially reported by the device, it is supported. Let's then enable this useful option.

Result (enabled after 6:00) :

image

Thank you very much 👍

Mart124 avatar Jan 02 '24 09:01 Mart124

@AlCalzone would really be glad to see this merged into next release, if possible of course 😃 Thank you very much 👍

Mart124 avatar Jan 05 '24 10:01 Mart124

Please tell me, how I may test it. I would like to add a review. (Path to a descriptions is sufficient - I simply do not know, how to put the code on my Home Assistant instance.) Thank you.

gnipp avatar Jan 23 '24 16:01 gnipp

Unfortunately there's no "easy" solution. One could be to migrate from Z-Wave JS to Z-Wave JS UI and to create your custom / own template file based on this PR.

Mart124 avatar Jan 24 '24 06:01 Mart124

I'll review when I find the time --> https://github.com/zwave-js/node-zwave-js/issues/6521

AlCalzone avatar Jan 24 '24 07:01 AlCalzone

I hope, your maintenance issue #6521 was successful so far. There is no better adventure than that. All the best for you and your family! My I however dare to ask if I can support somehow?

gnipp avatar Apr 19 '24 18:04 gnipp

Ok from what I've gathered, my assumptions are correct.

AlCalzone avatar Jul 09 '24 19:07 AlCalzone

Thanks, and thanks for the patience!

AlCalzone avatar Jul 09 '24 19:07 AlCalzone

Many thanks @AlCalzone for your review 👍

Mart124 avatar Jul 09 '24 19:07 Mart124