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

[bug] Thermofloor Z-TRM2FX not identified as climate in HASS #202

Closed
1 of 3 tasks
jkaberg opened this issue Jan 11, 2021 · 7 comments · Fixed by #203
Closed
1 of 3 tasks

[bug] Thermofloor Z-TRM2FX not identified as climate in HASS #202

jkaberg opened this issue Jan 11, 2021 · 7 comments · Fixed by #203
Assignees
Labels
bug Something isn't working

Comments

@jkaberg
Copy link
Contributor

jkaberg commented Jan 11, 2021

Version

Build/Run method

  • Docker
  • PKG
  • Manually built (git clone - npm install - npm run build )

zwavejs2mqtt version: master branch (zwave-js from branch fix-ztrm2 - now merged into master)

Describe the bug
In Home Assistant my Thermofloor z-trm2fx aka Heatit Thermostat TF 056 is not properly identified on the climate plattform. I see all the sensors and switches, but no climate controll. Might this be related to this?
To Reproduce
It's consistent with all 6 of my thermostats, I did also try to exclude and include but no change in HASS.

However I do notice an error in the logs:

zwavejs2mqtt_1     | 2021-01-11 09:38:23.350 ERROR GATEWAY: Error while discovering device climate_thermostat of node 49: Cannot read property 'id' of undefined Cannot read property 'id' of undefined
zwavejs2mqtt_1     | TypeError: Cannot read property 'id' of undefined
zwavejs2mqtt_1     |     at Gateway.valueTopic (/usr/src/app/lib/Gateway.js:868:23)
zwavejs2mqtt_1     |     at Gateway.discoverDevice (/usr/src/app/lib/Gateway.js:1126:16)
zwavejs2mqtt_1     |     at /usr/src/app/lib/Gateway.js:360:40
zwavejs2mqtt_1     |     at Array.forEach (<anonymous>)
zwavejs2mqtt_1     |     at Gateway.onNodeStatus (/usr/src/app/lib/Gateway.js:360:17)
zwavejs2mqtt_1     |     at ZwaveClient.emit (events.js:314:20)
zwavejs2mqtt_1     |     at ZwaveClient.EventEmitter.emit (domain.js:483:12)
zwavejs2mqtt_1     |     at ZwaveClient.onNodeStatus (/usr/src/app/lib/ZwaveClient.js:247:10)
zwavejs2mqtt_1     |     at ZwaveClient.onNodeReady (/usr/src/app/lib/ZwaveClient.js:275:16)
zwavejs2mqtt_1     |     at ZWaveNode.emit (events.js:326:22)
zwavejs2mqtt_1     |     at ZWaveNode.EventEmitter.emit (domain.js:483:12)
zwavejs2mqtt_1     |     at ZWaveNode.onReadyChange (/usr/src/app/node_modules/zwave-js/src/lib/node/Node.ts:441:19)
zwavejs2mqtt_1     |     at /usr/src/app/node_modules/zwave-js/src/lib/node/Node.ts:227:10
zwavejs2mqtt_1     |     at Interpreter.update (/usr/src/app/node_modules/xstate/lib/interpreter.js:255:17)
zwavejs2mqtt_1     |     at /usr/src/app/node_modules/xstate/lib/interpreter.js:125:23
zwavejs2mqtt_1     |     at Scheduler.process (/usr/src/app/node_modules/xstate/lib/scheduler.js:60:13)
zwavejs2mqtt_1     | 2021-01-11 09:38:23.352 INFO ZWAVE: Node 49 ready: ThermoFloor - Z-TRM2fx (Floor thermostat)
zwavejs2mqtt_1     | 2021-01-11 09:38:23.353 INFO ZWAVE: Node 49: interview completed, all values are updated
zwavejs2mqtt_1     | 2021-01-11 09:38:23.353 ERROR GATEWAY: Error while discovering device climate_thermostat of node 49: Cannot read property 'id' of undefined Cannot read property 'id' of undefined
zwavejs2mqtt_1     | TypeError: Cannot read property 'id' of undefined
zwavejs2mqtt_1     |     at Gateway.valueTopic (/usr/src/app/lib/Gateway.js:868:23)
zwavejs2mqtt_1     |     at Gateway.discoverDevice (/usr/src/app/lib/Gateway.js:1126:16)
zwavejs2mqtt_1     |     at /usr/src/app/lib/Gateway.js:360:40
zwavejs2mqtt_1     |     at Array.forEach (<anonymous>)
zwavejs2mqtt_1     |     at Gateway.onNodeStatus (/usr/src/app/lib/Gateway.js:360:17)
zwavejs2mqtt_1     |     at ZwaveClient.emit (events.js:314:20)
zwavejs2mqtt_1     |     at ZwaveClient.EventEmitter.emit (domain.js:483:12)
zwavejs2mqtt_1     |     at ZwaveClient.onNodeStatus (/usr/src/app/lib/ZwaveClient.js:247:10)
zwavejs2mqtt_1     |     at ZwaveClient.onNodeInterviewCompleted (/usr/src/app/lib/ZwaveClient.js:314:16)
zwavejs2mqtt_1     |     at ZWaveNode.emit (events.js:326:22)
zwavejs2mqtt_1     |     at ZWaveNode.EventEmitter.emit (domain.js:483:12)
zwavejs2mqtt_1     |     at ZWaveNode.interview (/usr/src/app/node_modules/zwave-js/src/lib/node/Node.ts:989:8)
zwavejs2mqtt_1     |     at Driver.interviewNode (/usr/src/app/node_modules/zwave-js/src/lib/driver/Driver.ts:860:10)

Expected behavior
An climate entity for each thermostat in HASS

Let me know how I can help! As this device already is present in hass/devices.js I'm all out of clues?

@jkaberg jkaberg added the bug Something isn't working label Jan 11, 2021
@robertsLando
Copy link
Member

@jkaberg Could you try removing it from devices.js?

@jkaberg
Copy link
Contributor Author

jkaberg commented Jan 11, 2021

@robertsLando I tried that just now, and when I do zwavejs2mqtt hangs on the first Thermostat it tries to interview. Adding it back lets z2m start like normal

There where no errors: it just stops logging and the UI is none-responsive

@robertsLando
Copy link
Member

@jkaberg Are you using dev tag?

@jkaberg
Copy link
Contributor Author

jkaberg commented Jan 11, 2021

@robertsLando No, I'm building the container myself using Dockerfile.contrib:

DOCKER_BUILDKIT=1 docker build --build-arg SRC=git-clone-src --build-arg Z2M_BRANCH=master --build-arg ZWJ_BRANCH=fix-ztrm2fx --no-cache -t zwavejs2mqtt .

@robertsLando
Copy link
Member

@jkaberg COuld you try to rebuild it now? Because I submitted a fix an hour ago about climate discovery that caused an infinite loop in some cases. So it may work now :)

@jkaberg
Copy link
Contributor Author

jkaberg commented Jan 11, 2021

Sure, built now with (as the fix-ztrm2fx was merged to zwave-js master):
DOCKER_BUILDKIT=1 docker build --build-arg SRC=git-clone-src --build-arg Z2M_BRANCH=master --build-arg ZWJ_BRANCH=master --no-cache -t zwavejs2mqtt .

with compose:

  zwavejs2mqtt:
    image: zwavejs2mqtt 
    restart: unless-stopped
    depends_on:
      - mosquitto
    security_opt:
      - seccomp:unconfined
    devices:
      - /dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0
    volumes:
      - ${STORAGE_DIR}/zwavejs2mqtt:/usr/src/app/store
      - ./devices.js:/usr/src/app/hass/devices.js

and:

zwavejs2mqtt_1     | 2021-01-11 11:18:56.488 INFO GATEWAY: New climate device discovered: {"type":"climate","object_id":"climate","discovery_payload":{"min_temp":5,"max_temp":40,"temp_step":0.5,"modes":["off","heat","cool","auto"],"mode_state_topic":"64-1-mode","mode_state_template":"{{ value_json.value }}","mode_command_topic":"64-1-mode/set","current_temperature_topic":"49-2-Air temperature","current_temperature_template":"{{ value_json.value }}","temperature_state_topic":true,"temperature_state_template":"{{ value_json.value }}","temperature_command_topic":true},"values":["49-2-Air temperature","64-1-mode","67-1-setpoint-1","67-1-setpoint-2","67-1-setpoint-11"],"mode_map":{"off":0,"heat":1,"cool":2},"setpoint_topic":{"1":"67-1-setpoint-1","2":"67-1-setpoint-2","11":"67-1-setpoint-11"},"default_setpoint":"67-1-setpoint-1"}

And now they all exist in HASS 😄

So my local changes to hass/devices.js consists of removing these lines. This with master of both zjs and z2m makes my Thermostats finaly work 😄

robertsLando added a commit that referenced this issue Jan 11, 2021
…) (#203)

This fixes #202 by removing blocking configuration. The the issue for more information.

Co-authored-by: Daniel Lando <[email protected]>
@robertsLando
Copy link
Member

Perfect! Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants