zwave-js / node-zwave-js

Z-Wave driver written entirely in JavaScript/TypeScript
https://zwave-js.github.io/node-zwave-js/
MIT License
755 stars 608 forks source link

Device (Heatit thermostat) doesn't report binary switch as it should with updated firmware #4688

Open Fr00t opened 2 years ago

Fr00t commented 2 years ago

Is your problem within Home Assistant (Core or Z-Wave JS Integration)?

NO, my problem is NOT within Home Assistant or the ZWave JS integration

Is your problem within ZWaveJS2MQTT?

YES, BUT a ZWaveJS2MQTT developer has told me to come here

Checklist

Describe the bug

What causes the bug? Unclear. Maybe the device was set up using documentation of a previous firmware version of the device that didn't support the binary switch?

What do you observe? The thermostat reports setpoints as expected, but the new firmware is also capable of reporting wether or not the relay is open which is the feature I want.

What did you expect to happen? That binary switch for heating status is correctly reported

Steps to reproduce the behavior: I've tried re-interviewing the nodes multiple time. I've got two identical thermostats. They reported correctly using Homeseers implementation so I know it's actually possible.

I turn up the setpoint above current temperature, see the red LED-indicator light up, and look for changes in the events tab, but all I get is the new setpoint.

I have attached the documentation of this firmware version if that could be of any use.

HeatIt_1v9.pdf

Device information

Manufacturer: HeatIt Model name: Z-trm2fx Firmware: 1.92 Node ID in your network: 96

It's added as "Thermofloor Thermostat TF016 / TF021" in Zwavejs2mqtt

How are you using node-zwave-js?

Which branches or versions?

version: node-zwave-js branch: zwavejs2mqtt branch:

Did you change anything?

no

If yes, what did you change?

No response

Did this work before?

No, it never worked anywhere

If yes, where did it work?

It worked in Homeseer before I migrated to zwavejs2mqtt and Homeassistant

Attach Driver Logfile

zwavejs_2022-06-04.log

Fr00t commented 2 years ago

It seems to actually report correctly when using the "Refresh" button in zwavejs2mqtt. I'm puzzled by why it wouldn't update automatically?

Are my groups/associations off?

AlCalzone commented 2 years ago

If the new firmware changed capabilities, you might need to exclude and re-include the device.

I won't be able to look at this before Monday, so please make sure to capture the inclusion and/or an interview in the driver log. I'm on mobile so I Can't verify that the posted log is sufficient right now.

Fr00t commented 2 years ago

If the new firmware changed capabilities, you might need to exclude and re-include the device.

I won't be able to look at this before Monday, so please make sure to capture the inclusion and/or an interview in the driver log. I'm on mobile so I Can't verify that the posted log is sufficient right now.

Thanks, but it was always at 1.92 when I added it to zwavejs

Fr00t commented 2 years ago

It seems like configuration (parameters) introduced in this firmware isn't supported either. Parameter 14-18 in the documentation linked in OP

Fr00t commented 2 years ago

It seems like configuration (parameters) introduced in this firmware isn't supported either. Parameter 14-18 in the documentation linked in OP

As for this issue I think the solution should be fairly simple. I've forked and created a commit here. I do need some guidance on how I can test it though? How can I move that device-json into my zwavejs2mqtt container to give it a go?

EDIT: I've manually moved it into the container and it seems to work as expected. Will test a bit more and create a pr for this.

This doesn't solve my other problem though. It seems related to this issue with related fix, that user ran with fw 1.8

AlCalzone commented 2 years ago

There is documentation on testing device files in the zwavejs2mqtt repo.

Fr00t commented 2 years ago

There is documentation on testing device files in the zwavejs2mqtt repo.

Yea I just found it and that makes testing significantly easier :) I imagine with FW >= 1.9 it's possible to drop disableBasicMapping.

I'm still unable to get it to update the binary switch current value by itself, I have to manually trigger the refresh and then I get the correct information immediately. Any ideas about this?

Attached is a log file in which I at 2022-06-04T18:56:33 set a new lower setpoint which turns the relay off and then at 2022-06-04T18:56:51 I guery the basic switch and see that it's turned off. zwavejs_2022-06-04 (1).log

Is there an assiciation group or endpoint I'm missing? If so, where would I start to look for it?

image

AlCalzone commented 2 years ago
2022-06-04T18:56:38.043Z DRIVER   Dropping message because it could not be deserialized: BinarySwitchCCSet: dese
                                  rialization not implemented (ZW0320)

The thermostat is using a BinarySwitchCCSet which is meant to control a binary switch and not to report status. See manual: image

According to the manual, there is another association group on Endpoint 1, which uses Basic Report commands to do the same. This sounds like a better fit: image

I'm not sure how this one is labeled though, since we don't have any associations defined for the endpoints in the config file.

You do seem to have a few duplicated associations though. The controller doesn't have any endpoints, so specifying a different target endpoint than "None" (or 0 for some lifelines) just results in duplicate reports.

Fr00t commented 2 years ago

Thanks so much for getting back to me @AlCalzone !

I cleaned up my associations: image

I started a new log and did the following:

  1. Changed to high setpoint
  2. Changed to low setpoint
  3. Refreshed basic v0
  4. Refreshed binary switch v1
  5. Changed to high setpoint
  6. Refreshed basic v0 (might have double clicked this)
  7. Refreshed binary switch v1

I still have to manually refresh to get the new values. Note that this is without disableBasicMapping

zwavejs_2022-06-07.log

Any way I can get this to automatically report? Thanks!

AlCalzone commented 2 years ago

I'm still not seeing any unsolicited Basic reports from the thermostat, only the Binary Switch Set commands.

You'll have to ask the Heat It support how the thermostat needs to be configured so it sends the Basic Reports mentioned in the device manual. They should be able to tell you.

zwave-js-assistant[bot] commented 1 year ago

This issue has not seen any recent activity and was marked as "stale 💤". Closing for housekeeping purposes... 🧹

Feel free to reopen if the issue persists.

nesheimt commented 1 month ago

Official information about the Heatit TRM2 TF021 v1.92 can be found here: https://github.com/Heatit-Controls/no.thermofloor/tree/main/drivers/TF_Thermostat_FW1.92

I do believe that Heatit TRM2 TF021 with firmware versions less that v1.92 are behaving different and having different configurations i the drivers. Most like I think that the v1.92 should have it's own device.

AlCalzone commented 4 weeks ago

Do you have an actual manual for that firmware?

nesheimt commented 4 weeks ago

Yes, I got this from the manufacturer this morning when asking for v1.92 documentation(even though it says v1.9 on the front page)

Appendix_Firmware_update_1_9_Heatit_Z-Wave.pdf

nesheimt commented 3 weeks ago

The manufacturer implemented the relay-status and relay-command going from the thermostat to the controller using association Groups 2.

For what it's worth, here is a Zniffer-file(Silicone Labs Zniffer) from the Heatit Zwave v1.92 starting at setpoint 20, going to 25(turning on the relay) and back to 20(turning off the relay). Association group settings are: image

By looking at the messages it seems like the relay status actually is there as "Basic Report" and relay-commad(for eg a SmartPlug) as "Switch Binay Set", right after the relay changes state due to eg a setpoint change. The "Basic Report" and "Switch Binary Set" can be turned off removing the respective association group.

The "Basic Report" seems not to be "picked up" in the Zwave JS UI?

Heatit-TRM2v192.zip

nesheimt commented 3 weeks ago

Hi Here are logfiles for Node5 (Heatit v1.92) when I do the following: Thermostat setpoint is 20, and then I do the following: increase setpoint to 26, decrease setpoint to 21, increase setpoint to 26 decrease setpoint to 22.

In between all these settings of the setpoints the relay should change state, and a report should be sent correspondingly and hopefully show up in the debugger (similar to the zniffer logs). Groups for this log recording is: image

zwave-js-ui-store (1).zip

nesheimt commented 3 weeks ago

Here is the an allegedly working config file from Open-Zwave: https://github.com/OpenZWave/open-zwave/blob/master/config/thermofloor/heatit021-v1.92.xml