Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thermostatic valves periodically change its values in target_temperature _TZE200_yw7cahqs #16859

Closed
UweLm opened this issue Mar 1, 2023 · 18 comments
Labels
problem Something isn't working stale Stale issues

Comments

@UweLm
Copy link

UweLm commented Mar 1, 2023

What happened?

Hi @ALL, I wrote some javascript classes to implement a heating control. Since a long time, I have the problem that 4 of 7 thermostatic valves change their values in the property zigbee.0...target_temperature automatically and without intervention of the javascript classes. This bypasses the complete control of the temperatures.
I've switched from deconz to ZigBee, but this did not solve the problem.
After more than a year of searching, I now came across the same bug on another channel (zigpy): zigpy/zha-device-handlers#1815.
The problem seems to have been fixed there: zigpy/zha-device-handlers#1816
Is it possible to implement such a solution for the zigbee-herdsman-converters too?
The file saswell.js contains already the device "_TZE200_yw7cahqs".
Or am I on the subject completely wrong here?
Hence, some more data:

  • iobroker: 6.3.5
  • Node.js: v16.19.0(16.19.1)
  • NPM: 8.19.3
  • Zigbee: v1.8.10
  • Thermostat manufacturer: _TZE200_yw7cahqs

In the meanwhile, I've updated my Zigbee Adapter to the Github version (repos:beta) 1.8.11 and the [email protected], [email protected] dedupted.
See here:
image

But it didn't change anything, the problem still occurs.
I've restarted iobroker as well as rebooted the raspi - didn't help out.

Is there any chance to fix this?

Thank you for any replies.

KR Uwe

What did you expect to happen?

No automatic changes of the temperature by the device itself.

How to reproduce it (minimal and precise)

Just wait, the changes happen every day.

Zigbee2MQTT version

None

Adapter firmware version

1.8.11 (Zigbee)

Adapter

_TZE200_yw7cahqs

Debug log

No log available, because the devices change their values automatically.

@JohnRabbit1
Copy link

I had simular issues with the saswell.js file. Although my device is different: _TZE200_c88teujp.
After some investigation i discovered the onEvent: tuya.onEventSetTime line does not do what it suppose to do, so i commented it out. And all problems were gone and after that i wrote my own external converter.

@Koenkk
Copy link
Owner

Koenkk commented Mar 28, 2023

@JohnRabbit1 is the time on the device still correct? If yes, even after force removing the device through the z2m frontend, restarting z2m and re-pairing it?

@JohnRabbit1
Copy link

@Koenkk,

Yes it was. However I have changed the file a few months ago. I am not aware of recent changes. Even after the recent change to summertime i have a correct date/time. In the original saswell.js file the onEventSetTime function messed up the time: i.e. year was changed from 2023->2099. And that gave an unexpected result in the programmed schedule of course. I have attached the saswell.js file i am using now (yes, very dirty). However with some extra bonus functionality.
saswell.zip

@Koenkk
Copy link
Owner

Koenkk commented Mar 29, 2023

@JohnRabbit1 initially the thermostat has to get its time from somewhere. When factory resetting the device or pulling out the batteries for 1 hour, is the time still correct?

@JohnRabbit1
Copy link

@Koenkk I did the following:

  1. Did a factory reset (long press + and PROG key);
  2. Removed batteries for +/- 1,5 hours;
  3. Forced remove the device from z2m
  4. Reboot my Raspberry.
  5. After that: checked time (year was 2099, probably some kind of NULL value). Month was correct. Day and hour not (old values)
  6. Then: Add the device to z2m;
  7. After some time (1 or 2 hours) day/time was correct
  8. But keep in mind i am using my own saswell.js file mentioned above

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Apr 1, 2023
@Koenkk
Copy link
Owner

Koenkk commented Apr 1, 2023

@JohnRabbit1 I've pushed a fix, can you check if it works?

Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

@UweLm
Copy link
Author

UweLm commented Apr 1, 2023 via email

@UweLm
Copy link
Author

UweLm commented Apr 3, 2023

@JohnRabbit1 I've copied your saswell.js to the subfolder /opt/iobroker/node_modules/zigbee-herdsman-converters/devices and restarted ioBroker.
Got some errors in the log:
2023-04-03 17:40:54.129 - error: host.raspbi-SS5 Caught by controller[0]: node:internal/modules/cjs/loader:998
2023-04-03 17:40:54.130 - error: host.raspbi-SS5 Caught by controller[0]: throw err;
2023-04-03 17:40:54.131 - error: host.raspbi-SS5 Caught by controller[0]: ^
2023-04-03 17:40:54.131 - error: host.raspbi-SS5 Caught by controller[0]: Error: Cannot find module '/opt/zigbee2mqtt/node_modules/zigbee-herdsman-converters/lib/exposes'
2023-04-03 17:40:54.131 - error: host.raspbi-SS5 Caught by controller[0]: Require stack:
2023-04-03 17:40:54.132 - error: host.raspbi-SS5 Caught by controller[0]: - /opt/iobroker/node_modules/zigbee-herdsman-converters/devices/saswell.js
2023-04-03 17:40:54.132 - error: host.raspbi-SS5 Caught by controller[0]: - /opt/iobroker/node_modules/zigbee-herdsman-converters/index.js
2023-04-03 17:40:54.133 - error: host.raspbi-SS5 Caught by controller[0]: - /opt/iobroker/node_modules/iobroker.zigbee/lib/utils.js
2023-04-03 17:40:54.133 - error: host.raspbi-SS5 Caught by controller[0]: - /opt/iobroker/node_modules/iobroker.zigbee/lib/commands.js
2023-04-03 17:40:54.134 - error: host.raspbi-SS5 Caught by controller[0]: - /opt/iobroker/node_modules/iobroker.zigbee/main.js
2023-04-03 17:40:54.134 - error: host.raspbi-SS5 Caught by controller[0]: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
2023-04-03 17:40:54.134 - error: host.raspbi-SS5 Caught by controller[0]: at Function.Module._load (node:internal/modules/cjs/loader:841:27)
2023-04-03 17:40:54.134 - error: host.raspbi-SS5 Caught by controller[0]: at Module.require (node:internal/modules/cjs/loader:1067:19)
2023-04-03 17:40:54.135 - error: host.raspbi-SS5 Caught by controller[0]: at require (node:internal/modules/cjs/helpers:103:18)
2023-04-03 17:40:54.135 - error: host.raspbi-SS5 Caught by controller[0]: at Object. (/opt/iobroker/node_modules/zigbee-herdsman-converters/devices/saswell.js:3:17)
2023-04-03 17:40:54.135 - error: host.raspbi-SS5 Caught by controller[0]: at Module._compile (node:internal/modules/cjs/loader:1165:14)
2023-04-03 17:40:54.136 - error: host.raspbi-SS5 Caught by controller[0]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
2023-04-03 17:40:54.136 - error: host.raspbi-SS5 Caught by controller[0]: at Module.load (node:internal/modules/cjs/loader:1043:32)
2023-04-03 17:40:54.136 - error: host.raspbi-SS5 Caught by controller[0]: at Function.Module._load (node:internal/modules/cjs/loader:878:12)
2023-04-03 17:40:54.136 - error: host.raspbi-SS5 Caught by controller[0]: at Module.require (node:internal/modules/cjs/loader:1067:19) {
2023-04-03 17:40:54.137 - error: host.raspbi-SS5 Caught by controller[0]: code: 'MODULE_NOT_FOUND',
2023-04-03 17:40:54.137 - error: host.raspbi-SS5 Caught by controller[0]: requireStack: [
2023-04-03 17:40:54.137 - error: host.raspbi-SS5 Caught by controller[0]: '/opt/iobroker/node_modules/zigbee-herdsman-converters/devices/saswell.js',
2023-04-03 17:40:54.138 - error: host.raspbi-SS5 Caught by controller[0]: '/opt/iobroker/node_modules/zigbee-herdsman-converters/index.js',
2023-04-03 17:40:54.138 - error: host.raspbi-SS5 Caught by controller[0]: '/opt/iobroker/node_modules/iobroker.zigbee/lib/utils.js',
2023-04-03 17:40:54.138 - error: host.raspbi-SS5 Caught by controller[0]: '/opt/iobroker/node_modules/iobroker.zigbee/lib/commands.js',
2023-04-03 17:40:54.138 - error: host.raspbi-SS5 Caught by controller[0]: '/opt/iobroker/node_modules/iobroker.zigbee/main.js'
2023-04-03 17:40:54.139 - error: host.raspbi-SS5 Caught by controller[0]: ]
2023-04-03 17:40:54.139 - error: host.raspbi-SS5 Caught by controller[0]: }
2023-04-03 17:40:54.140 - error: host.raspbi-SS5 instance system.adapter.zigbee.0 terminated with code 1 (JS_CONTROLLER_STOPPED)

I assume just copying isn't enough.

@JohnRabbit1
Copy link

@Koenkk: Sorry for my late response, but i am abroad coming month. So i cannot check your fix. However looking at your fix: i think it will partly solve the problem. In my solution i have an additional fix: fromZigbee: ......, hy_set_time_request] for time sync.
@UweLm: I am not familiar with iobroker. But the error you show looks like your files are in a different place: /opt/iobroker/.... In my case they are in /opt/zigbee2mqtt/..... So you have to change that in the first few lines.

@UweLm
Copy link
Author

UweLm commented Apr 19, 2023 via email

@JohnRabbit1
Copy link

JohnRabbit1 commented Apr 20, 2023 via email

@UweLm
Copy link
Author

UweLm commented Apr 20, 2023 via email

@JohnRabbit1
Copy link

JohnRabbit1 commented Apr 20, 2023 via email

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label May 21, 2023
@UweLm
Copy link
Author

UweLm commented May 21, 2023

Rejoiced too soon...today (2023/04/20) the values of the two thermostatic valves have changed 3 times. No scripts are active, no entries in the log - nothing.
There might be a difference at the devices @JohnRabbit1 is using and the devices I have here. And I know it's hard to figure out what exactly is happening and how to fix it. Let me know if I can debug/check something. I work as a developer, but I'm not very experienced with Linux/Unix and the tools available, and I'm also completely lacking in the context of how the individual components act together. This makes searching for potentially problematic candidates quite difficult.
However, I have no problem with sending one of the thermostatic valves to you for testing, if that would help further

I appreciate your support - thanks for that!

KR Uwe

@github-actions github-actions bot removed the stale Stale issues label May 22, 2023
@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Jun 21, 2023
@UweLm
Copy link
Author

UweLm commented Jun 21, 2023

Still open.

@github-actions github-actions bot removed the stale Stale issues label Jun 22, 2023
@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Jul 22, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working stale Stale issues
Projects
None yet
Development

No branches or pull requests

3 participants