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 613 forks source link

[Qubino Flush Dimmer] Switch command class and dimmer command class don't update each other #1090

Closed darkbasic closed 4 years ago

darkbasic commented 4 years ago

When I turn on the light using the switch command class I expect it to update the level of the dimmer command class accordingly and viceversa. Unfortunately that doesn't happen.

zwave-284642.log

$ npm start

> zwavejs2mqtt@0.0.0 start /home/niko/devel/zwavejs2mqtt
> node bin/www

  z2m:Store scenes.json not found +0ms
  z2m:Store nodes.json not found +2ms
  z2m:App zwavejs2mqtt version: 0.0.0 +0ms
  z2m:App Application path:/home/niko/devel/zwavejs2mqtt +1ms
  z2m:Mqtt MQTT is disabled +0ms
  z2m:Zwave Connecting to /dev/ttyACM0 +0ms
Logging to file:
/home/niko/devel/zwavejs2mqtt/bin/zwave-284642.log
  z2m:App Listening on port 8091 +0ms
  z2m:App New connection ohv-AeAq0ZkOcAPRAAAA +1s
  z2m:Zwave Zwave driver is ready +2s
  z2m:Zwave Driver ready +1ms
  z2m:Zwave Node added 1 +1ms
  z2m:Zwave Scanning network with homeid: 0xc54055a2 +0ms
  z2m:Zwave Node 1 is alive +59ms
  z2m:Zwave Node 1 doesn't support groups associations +3ms
  z2m:Zwave Node 1: value added 1-32-0-currentValue => undefined +3ms
  z2m:Zwave Node 1: value added 1-32-0-targetValue => undefined +1ms
  z2m:Zwave Node 1 ready: AEON Labs - ZW090 (Z‐Stick Gen5 USB Controller) +1ms
  z2m:Zwave Scan completed +0ms
  z2m:Zwave Network scan complete. Found: 1 nodes +1ms
  z2m:Zwave Node 1: interview completed, all values are updated +1ms
  z2m:App User disconnected ohv-AeAq0ZkOcAPRAAAA +8s
GET / 304 8.727 ms - -
GET /static/css/app.ac70a60bcc407fe11707.css 304 4.830 ms - -
GET /static/js/app.a4eeee65f64587f9e920.js 304 0.763 ms - -
  z2m:App New connection -xi4jW9V5OFHT317AAAB +396ms
GET /static/logo.png 304 0.690 ms - -
  z2m:App Zwave api call: startInclusion [ true ] +22s
  z2m:Zwave Secure inclusion started +29s
  z2m:Zwave Success zwave api call startInclusion true +1ms
  z2m:Zwave Node 2: added +13s
  z2m:Zwave Node added 2 +1ms
  z2m:Zwave Inclusion stopped +5ms
  z2m:Zwave Node 2 is alive +104ms
  z2m:Zwave Node 2: value added: 114-0-manufacturerId => 345 +52ms
  z2m:Zwave Node 2: value added: 114-0-productType => 1 +1ms
  z2m:Zwave Node 2: value added: 114-0-productId => 81 +0ms
  z2m:Zwave Node 2: value added: 134-0-libraryType => 3 +57ms
  z2m:Zwave Node 2: value added: 134-0-protocolVersion => 4.5 +0ms
  z2m:Zwave Node 2: value added: 134-0-firmwareVersions => 3.7 +0ms
  z2m:Zwave Node 2: value added: 94-0-zwavePlusVersion => 1 +490ms
  z2m:Zwave Node 2: value added: 94-0-nodeType => 0 +0ms
  z2m:Zwave Node 2: value added: 94-0-roleType => 5 +1ms
  z2m:Zwave Node 2: value added: 94-0-installerIcon => 7168 +0ms
  z2m:Zwave Node 2: value added: 94-0-userIcon => 7168 +1ms
  z2m:Zwave Node 2: metadata updated: 38-0-Up +45ms
  z2m:Zwave Node 2: metadata updated: 38-0-Down +1ms
  z2m:Zwave Node 2: value added: 38-0-currentValue => 0 +61ms
  z2m:Zwave Node 2: value added: 37-0-currentValue => false +65ms
  z2m:Zwave Node 2: metadata updated: 50-0-reset +50ms
  z2m:Zwave Node 2: metadata updated: 50-0-value-65537 +92ms
  z2m:Zwave Node 2: metadata updated: 50-0-previousValue-65537 +0ms
  z2m:Zwave Node 2: metadata updated: 50-0-deltaTime-65537 +1ms
  z2m:Zwave Node 2: value added: 50-0-value-65537 => 64 +0ms
  z2m:Zwave Node 2: value added: 50-0-deltaTime-65537 => 0 +0ms
  z2m:Zwave Node 2: metadata updated: 50-0-value-66049 +91ms
  z2m:Zwave Node 2: metadata updated: 50-0-previousValue-66049 +1ms
  z2m:Zwave Node 2: metadata updated: 50-0-deltaTime-66049 +1ms
  z2m:Zwave Node 2: value added: 50-0-value-66049 => 0 +1ms
  z2m:Zwave Node 2: value added: 50-0-deltaTime-66049 => 0 +0ms
  z2m:Zwave Node 2: metadata updated: 112-0-1 +7ms
  z2m:Zwave Node 2: metadata updated: 112-0-2 +1ms
  z2m:Zwave Node 2: metadata updated: 112-0-3 +1ms
  z2m:Zwave Node 2: metadata updated: 112-0-4 +1ms
  z2m:Zwave Node 2: metadata updated: 112-0-10 +0ms
  z2m:Zwave Node 2: metadata updated: 112-0-11 +0ms
  z2m:Zwave Node 2: metadata updated: 112-0-12 +1ms
  z2m:Zwave Node 2: metadata updated: 112-0-20 +0ms
  z2m:Zwave Node 2: metadata updated: 112-0-21 +1ms
  z2m:Zwave Node 2: metadata updated: 112-0-30 +0ms
  z2m:Zwave Node 2: metadata updated: 112-0-40 +0ms
  z2m:Zwave Node 2: metadata updated: 112-0-42 +0ms
  z2m:Zwave Node 2: metadata updated: 112-0-60 +1ms
  z2m:Zwave Node 2: metadata updated: 112-0-61 +0ms
  z2m:Zwave Node 2: metadata updated: 112-0-65 +0ms
  z2m:Zwave Node 2: metadata updated: 112-0-66 +1ms
  z2m:Zwave Node 2: metadata updated: 112-0-67 +0ms
  z2m:Zwave Node 2: metadata updated: 112-0-68 +0ms
  z2m:Zwave Node 2: metadata updated: 112-0-100 +1ms
  z2m:Zwave Node 2: metadata updated: 112-0-101 +0ms
  z2m:Zwave Node 2: metadata updated: 112-0-110 +0ms
  z2m:Zwave Node 2: metadata updated: 112-0-120 +0ms
  z2m:Zwave Node 2: metadata updated: 112-0-250 +1ms
  z2m:Zwave Node 2: value added: 112-0-1 => 0 +80ms
  z2m:Zwave Node 2: value added: 112-0-2 => 0 +72ms
  z2m:Zwave Node 2: value added: 112-0-3 => 0 +73ms
  z2m:Zwave Node 2: value added: 112-0-4 => 0 +124ms
  z2m:Zwave Node 2: value added: 112-0-10 => 255 +77ms
  z2m:Zwave Node 2: value added: 112-0-11 => 0 +72ms
  z2m:Zwave Node 2: value added: 112-0-12 => 0 +70ms
  z2m:Zwave Node 2: value added: 112-0-20 => 0 +69ms
  z2m:Zwave Node 2: value added: 112-0-21 => 0 +71ms
  z2m:Zwave Node 2: value added: 112-0-30 => 0 +77ms
  z2m:Zwave Node 2: value added: 112-0-40 => 10 +70ms
  z2m:Zwave Node 2: value added: 112-0-42 => 0 +72ms
  z2m:Zwave Node 2: value added: 112-0-60 => 10 +71ms
  z2m:Zwave Node 2: value added: 112-0-61 => 99 +71ms
  z2m:Zwave Node 2: value added: 112-0-65 => 100 +77ms
  z2m:Zwave Node 2: value added: 112-0-66 => 3 +73ms
  z2m:Zwave Node 2: value added: 112-0-67 => 0 +69ms
  z2m:Zwave Node 2: value added: 112-0-68 => 0 +76ms
  z2m:Zwave Node 2: value added: 112-0-100 => 0 +77ms
  z2m:Zwave Node 2: value added: 112-0-101 => 0 +69ms
  z2m:Zwave Node 2: value added: 112-0-110 => 32536 +71ms
  z2m:Zwave Node 2: value added: 112-0-120 => 5 +68ms
  z2m:Zwave Node 2: value added: 112-0-250 => 0 +39ms
  z2m:Zwave Node 2: value added: 142-0-maxNodes-1 => 1 +325ms
  z2m:Zwave Node 2: value added: 142-0-nodeIds-1 =>  +1ms
  z2m:Zwave Node 2: value added: 142-0-endpoints-1 =>  +1ms
  z2m:Zwave Node 2: value added: 142-0-maxNodes-2 => 16 +238ms
  z2m:Zwave Node 2: value added: 142-0-nodeIds-2 =>  +1ms
  z2m:Zwave Node 2: value added: 142-0-endpoints-2 =>  +1ms
  z2m:Zwave Node 2: value added: 142-0-maxNodes-3 => 16 +237ms
  z2m:Zwave Node 2: value added: 142-0-nodeIds-3 =>  +1ms
  z2m:Zwave Node 2: value added: 142-0-endpoints-3 =>  +0ms
  z2m:Zwave Node 2: value added: 142-0-maxNodes-4 => 16 +235ms
  z2m:Zwave Node 2: value added: 142-0-nodeIds-4 =>  +0ms
  z2m:Zwave Node 2: value added: 142-0-endpoints-4 =>  +0ms
  z2m:Zwave Node 2: value added: 142-0-maxNodes-5 => 16 +233ms
  z2m:Zwave Node 2: value added: 142-0-nodeIds-5 =>  +1ms
  z2m:Zwave Node 2: value added: 142-0-endpoints-5 =>  +0ms
  z2m:Zwave Node 2: value added: 142-0-maxNodes-6 => 16 +235ms
  z2m:Zwave Node 2: value added: 142-0-nodeIds-6 =>  +1ms
  z2m:Zwave Node 2: value added: 142-0-endpoints-6 =>  +1ms
  z2m:Zwave Node 2: value added: 142-0-maxNodes-7 => 16 +235ms
  z2m:Zwave Node 2: value added: 142-0-nodeIds-7 =>  +0ms
  z2m:Zwave Node 2: value added: 142-0-endpoints-7 =>  +1ms
  z2m:Zwave Node 2: value added: 142-0-maxNodes-8 => 16 +233ms
  z2m:Zwave Node 2: value added: 142-0-nodeIds-8 =>  +1ms
  z2m:Zwave Node 2: value added: 142-0-endpoints-8 =>  +1ms
  z2m:Zwave Node 2: value added: 142-0-maxNodes-9 => 16 +239ms
  z2m:Zwave Node 2: value added: 142-0-nodeIds-9 =>  +1ms
  z2m:Zwave Node 2: value added: 142-0-endpoints-9 =>  +1ms
  z2m:Zwave Node 2: value added: 142-0-maxNodes-10 => 16 +238ms
  z2m:Zwave Node 2: value added: 142-0-nodeIds-10 =>  +1ms
  z2m:Zwave Node 2: value added: 142-0-endpoints-10 =>  +1ms
  z2m:Zwave Node 2: value added: 142-0-maxNodes-11 => 16 +237ms
  z2m:Zwave Node 2: value added: 142-0-nodeIds-11 =>  +2ms
  z2m:Zwave Node 2: value added: 142-0-endpoints-11 =>  +1ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-1 1 => 1 +321ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-1  => 1 +2ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-1  =>  +1ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-11 16 => 16 +390ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-11  => 1 +1ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-11  =>  +2ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-11 16 => 16 +31ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-11 1 =>  +1ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-11  =>  +1ms
  z2m:Zwave Node 2: metadata updated: 113-0-Power Management-Over-load status +1s
  z2m:Zwave Node 2: value added 2-38-0-targetValue => undefined +27ms
  z2m:Zwave Node 2: value added 2-38-0-duration => undefined +4ms
  z2m:Zwave Node 2: value added 2-38-0-currentValue => 0 +0ms
  z2m:Zwave Node 2: value added 2-38-0-Up => undefined +0ms
  z2m:Zwave Node 2: value added 2-38-0-Down => undefined +1ms
  z2m:Zwave Node 2: value added 2-94-0-zwavePlusVersion => 1 +0ms
  z2m:Zwave Node 2: value added 2-94-0-nodeType => 0 +0ms
  z2m:Zwave Node 2: value added 2-94-0-roleType => 5 +0ms
  z2m:Zwave Node 2: value added 2-94-0-installerIcon => 7168 +0ms
  z2m:Zwave Node 2: value added 2-94-0-userIcon => 7168 +1ms
  z2m:Zwave Node 2: value added 2-134-0-libraryType => 3 +0ms
  z2m:Zwave Node 2: value added 2-134-0-protocolVersion => 4.5 +0ms
  z2m:Zwave Node 2: value added 2-134-0-firmwareVersions => 3.7 +2ms
  z2m:Zwave Node 2: value added 2-134-0-hardwareVersion => undefined +0ms
  z2m:Zwave Node 2: value added 2-114-0-manufacturerId => 345 +0ms
  z2m:Zwave Node 2: value added 2-114-0-productType => 1 +0ms
  z2m:Zwave Node 2: value added 2-114-0-productId => 81 +0ms
  z2m:Zwave Node 2: value added 2-37-0-currentValue => false +1ms
  z2m:Zwave Node 2: value added 2-37-0-targetValue => undefined +0ms
  z2m:Zwave Node 2: value added 2-50-0-value-65537 => 64 +0ms
  z2m:Zwave Node 2: value added 2-50-0-deltaTime-65537 => 0 +0ms
  z2m:Zwave Node 2: value added 2-50-0-value-66049 => 0 +0ms
  z2m:Zwave Node 2: value added 2-50-0-deltaTime-66049 => 0 +0ms
  z2m:Zwave Node 2: value added 2-50-0-reset => undefined +1ms
  z2m:Zwave Node 2: value added 2-50-0-previousValue-65537 => undefined +0ms
  z2m:Zwave Node 2: value added 2-50-0-previousValue-66049 => undefined +0ms
  z2m:Zwave Node 2: value added 2-113-0-Power Management-Over-load status => undefined +0ms
  z2m:Zwave Node 2: value added 2-142-0-maxNodes-1 => 1 +0ms
  z2m:Zwave Node 2: value added 2-142-0-nodeIds-1 => 1 +0ms
  z2m:Zwave Node 2: value added 2-142-0-endpoints-1 =>  +1ms
  z2m:Zwave Node 2: value added 2-142-0-maxNodes-2 => 16 +0ms
  z2m:Zwave Node 2: value added 2-142-0-nodeIds-2 =>  +0ms
  z2m:Zwave Node 2: value added 2-142-0-endpoints-2 =>  +0ms
  z2m:Zwave Node 2: value added 2-142-0-maxNodes-3 => 16 +0ms
  z2m:Zwave Node 2: value added 2-142-0-nodeIds-3 =>  +0ms
  z2m:Zwave Node 2: value added 2-142-0-endpoints-3 =>  +1ms
  z2m:Zwave Node 2: value added 2-142-0-maxNodes-4 => 16 +0ms
  z2m:Zwave Node 2: value added 2-142-0-nodeIds-4 =>  +0ms
  z2m:Zwave Node 2: value added 2-142-0-endpoints-4 =>  +0ms
  z2m:Zwave Node 2: value added 2-142-0-maxNodes-5 => 16 +1ms
  z2m:Zwave Node 2: value added 2-142-0-nodeIds-5 =>  +0ms
  z2m:Zwave Node 2: value added 2-142-0-endpoints-5 =>  +0ms
  z2m:Zwave Node 2: value added 2-142-0-maxNodes-6 => 16 +0ms
  z2m:Zwave Node 2: value added 2-142-0-nodeIds-6 =>  +0ms
  z2m:Zwave Node 2: value added 2-142-0-endpoints-6 =>  +1ms
  z2m:Zwave Node 2: value added 2-142-0-maxNodes-7 => 16 +0ms
  z2m:Zwave Node 2: value added 2-142-0-nodeIds-7 =>  +0ms
  z2m:Zwave Node 2: value added 2-142-0-endpoints-7 =>  +0ms
  z2m:Zwave Node 2: value added 2-142-0-maxNodes-8 => 16 +1ms
  z2m:Zwave Node 2: value added 2-142-0-nodeIds-8 =>  +0ms
  z2m:Zwave Node 2: value added 2-142-0-endpoints-8 =>  +1ms
  z2m:Zwave Node 2: value added 2-142-0-maxNodes-9 => 16 +0ms
  z2m:Zwave Node 2: value added 2-142-0-nodeIds-9 =>  +0ms
  z2m:Zwave Node 2: value added 2-142-0-endpoints-9 =>  +0ms
  z2m:Zwave Node 2: value added 2-142-0-maxNodes-10 => 16 +0ms
  z2m:Zwave Node 2: value added 2-142-0-nodeIds-10 =>  +1ms
  z2m:Zwave Node 2: value added 2-142-0-endpoints-10 =>  +0ms
  z2m:Zwave Node 2: value added 2-142-0-maxNodes-11 => 16 +0ms
  z2m:Zwave Node 2: value added 2-142-0-nodeIds-11 =>  +0ms
  z2m:Zwave Node 2: value added 2-142-0-endpoints-11 =>  +0ms
  z2m:Zwave Node 2: value added 2-112-0-1 => 0 +1ms
  z2m:Zwave Node 2: value added 2-112-0-2 => 0 +0ms
  z2m:Zwave Node 2: value added 2-112-0-3 => 0 +0ms
  z2m:Zwave Node 2: value added 2-112-0-4 => 0 +0ms
  z2m:Zwave Node 2: value added 2-112-0-10 => 255 +1ms
  z2m:Zwave Node 2: value added 2-112-0-11 => 0 +0ms
  z2m:Zwave Node 2: value added 2-112-0-12 => 0 +0ms
  z2m:Zwave Node 2: value added 2-112-0-20 => 0 +0ms
  z2m:Zwave Node 2: value added 2-112-0-21 => 0 +0ms
  z2m:Zwave Node 2: value added 2-112-0-30 => 0 +1ms
  z2m:Zwave Node 2: value added 2-112-0-40 => 10 +0ms
  z2m:Zwave Node 2: value added 2-112-0-42 => 0 +0ms
  z2m:Zwave Node 2: value added 2-112-0-60 => 10 +0ms
  z2m:Zwave Node 2: value added 2-112-0-61 => 99 +0ms
  z2m:Zwave Node 2: value added 2-112-0-65 => 100 +1ms
  z2m:Zwave Node 2: value added 2-112-0-66 => 3 +0ms
  z2m:Zwave Node 2: value added 2-112-0-67 => 0 +0ms
  z2m:Zwave Node 2: value added 2-112-0-68 => 0 +0ms
  z2m:Zwave Node 2: value added 2-112-0-100 => 0 +0ms
  z2m:Zwave Node 2: value added 2-112-0-101 => 0 +1ms
  z2m:Zwave Node 2: value added 2-112-0-110 => 32536 +0ms
  z2m:Zwave Node 2: value added 2-112-0-120 => 5 +0ms
  z2m:Zwave Node 2: value added 2-112-0-250 => 0 +0ms
  z2m:Zwave Node 2 ready: Qubino - ZMNHDD (Flush Dimmer Plus) +2ms
  z2m:Zwave Node 2: interview completed, all values are updated +2ms
  z2m:App Zwave api call: writeValue [
  { nodeId: 2, commandClass: 37, endpoint: 0, property: 'targetValue' },
  true
] +3m
  z2m:Zwave Node 2: value updated: 37-0-currentValue false => true +3m
  z2m:Zwave Success zwave api call writeValue  +1ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 0 => 80.1 +2s
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +1ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 80.1 => 80.7 +995ms
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +1ms
  z2m:App Zwave api call: writeValue [
  { nodeId: 2, commandClass: 37, endpoint: 0, property: 'targetValue' },
  false
] +54s
  z2m:Zwave Node 2: value updated: 37-0-currentValue true => false +52s
  z2m:Zwave Success zwave api call writeValue  +1ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 80.7 => 0 +2s
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +0ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 0 => 0 +983ms
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +1ms
  z2m:App Zwave api call: writeValue [
  { nodeId: 2, commandClass: 38, endpoint: 0, property: 'targetValue' },
  50
] +15s
  z2m:Zwave Node 2: value updated: 38-0-currentValue 0 => 0 +12s
  z2m:Zwave Success zwave api call writeValue  +1ms
  z2m:Zwave Node 2: value updated: 38-0-currentValue 0 => 50 +914ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 0 => 11.4 +1s
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +2ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 11.4 => 27.4 +996ms
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +1ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 27.4 => 45.4 +995ms
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +0ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 45.4 => 47.1 +996ms
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +1ms
  z2m:App Zwave api call: writeValue [
  { nodeId: 2, commandClass: 38, endpoint: 0, property: 'targetValue' },
  0
] +22s
  z2m:Zwave Node 2: value updated: 38-0-currentValue 50 => 54 +17s
  z2m:Zwave Success zwave api call writeValue  +1ms
  z2m:Zwave Node 2: value updated: 38-0-currentValue 54 => 50 +258ms
  z2m:Zwave Node 2: value updated: 38-0-currentValue 50 => 34 +989ms
  z2m:Zwave Node 2: value updated: 38-0-currentValue 34 => 16 +995ms
  z2m:Zwave Node 2: value updated: 38-0-currentValue 16 => 0 +995ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 47.1 => 0 +1s
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +2ms
  z2m:App Zwave api call: writeValue [
  { nodeId: 2, commandClass: 37, endpoint: 0, property: 'targetValue' },
  true
] +15s
  z2m:Zwave Node 2: value updated: 38-0-currentValue 0 => 99 +11s
  z2m:Zwave Node 2: value updated: 37-0-currentValue false => true +17ms
  z2m:Zwave Success zwave api call writeValue  +5ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 0 => 80.9 +2s
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +1ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 80.9 => 81.1 +996ms
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +2ms
  z2m:App Zwave api call: writeValue [
  { nodeId: 2, commandClass: 37, endpoint: 0, property: 'targetValue' },
  false
] +14s
  z2m:Zwave Node 2: value updated: 37-0-currentValue true => false +11s
  z2m:Zwave Success zwave api call writeValue  +3ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 81.1 => 3 +2s
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +0ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 3 => 0 +997ms
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +0ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 0 => 0 +996ms
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +1ms
  z2m:App Zwave api call: writeValue [
  { nodeId: 2, commandClass: 37, endpoint: 0, property: 'targetValue' },
  true
] +15s
  z2m:Zwave Node 2: value updated: 37-0-currentValue false => true +12s
  z2m:Zwave Success zwave api call writeValue  +5ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 0 => 80.5 +2s
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +1ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 80.5 => 80.8 +995ms
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +1ms
  z2m:App Zwave api call: writeValue [
  { nodeId: 2, commandClass: 37, endpoint: 0, property: 'targetValue' },
  false
] +8s
  z2m:Zwave Node 2: value updated: 37-0-currentValue true => false +4s
  z2m:Zwave Success zwave api call writeValue  +3ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 80.8 => 0 +3s
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +1ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 0 => 0 +995ms
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +0ms
  z2m:App Zwave api call: writeValue [
  { nodeId: 2, commandClass: 38, endpoint: 0, property: 'targetValue' },
  0
] +6s
  z2m:Zwave Node 2: value updated: 38-0-currentValue 99 => 0 +2s
  z2m:Zwave Success zwave api call writeValue  +1ms
  z2m:Zwave Node 2: value updated: 38-0-currentValue 0 => 0 +895ms
  z2m:App Zwave api call: writeValue [
  { nodeId: 2, commandClass: 37, endpoint: 0, property: 'targetValue' },
  true
] +6s
  z2m:Zwave Node 2: value updated: 37-0-currentValue false => true +6s
  z2m:Zwave Success zwave api call writeValue  +2ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 0 => 66.4 +1s
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +1ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 66.4 => 80.9 +995ms
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +1ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 80.9 => 81.2 +995ms
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +1ms
  z2m:App Zwave api call: writeValue [
  { nodeId: 2, commandClass: 37, endpoint: 0, property: 'targetValue' },
  false
] +43s
  z2m:Zwave Node 2: value updated: 37-0-currentValue true => false +40s
  z2m:Zwave Success zwave api call writeValue  +2ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 81.2 => 0 +2s
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +1ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 0 => 0 +994ms
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +0ms
  z2m:App Zwave api call: writeValue [
  { nodeId: 2, commandClass: 38, endpoint: 0, property: 'targetValue' },
  99
] +10s
  z2m:Zwave Node 2: value updated: 38-0-currentValue 0 => 0 +7s
  z2m:Zwave Success zwave api call writeValue  +1ms
  z2m:Zwave Node 2: value updated: 38-0-currentValue 0 => 99 +877ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 0 => 28.4 +1s
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +1ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 28.4 => 74.8 +996ms
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +0ms
  z2m:Zwave Node 2: value updated: 50-0-value-66049 74.8 => 81.5 +995ms
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-66049 0 => 0 +0ms
  z2m:Zwave Node 2: value updated: 50-0-value-65537 64 => 64.1 +2m
  z2m:Zwave Node 2: value updated: 50-0-deltaTime-65537 0 => 0 +0ms
AlCalzone commented 4 years ago

The request does sound plausible, but I'm not sure if it is feasibly to do this automagically. At least I couldn't find anything in the specs I've read that these two CCs should be mapped to each other.

Did this work with the OZW backend? A quick search didn't show any code where that could be happening.

I'm a bit hesitant to do this, because I can already anticipate that there's at least one device out there where Binary Switch and Multilevel Switch do different things.

@robertsLando what do you think?

robertsLando commented 4 years ago

Could be something configurable using the device config file? Maybe a special option

darkbasic commented 4 years ago

I think this should be a matter of setting the right association groups or something similar. Regarding OZW if I recall correctly it used to work with OZW 1.4 but it doesn't work anymore with 1.6. If I include the device with OZW 1.6 it doesn't even update the power (W) value when I turn on/off the light, while if I include it with zwave-js it does update the power (W). So I guess it's something which gets set during inclusion. Something similar happened to me with the Qubino Flush Shutter in venetian mode, which didn't report the tilt value whenever you changed it using the physical push button with OZW 1.4. The following procedure fixed it: https://community.home-assistant.io/t/integration-of-qubino-zmnhdd1-flush-dimmer/129487/13 With OZW 1.6 it works out of the box, so I guess it's setting those associations automatically.

Could it be something similar for the Flush Dimmer?

This is the manual: https://qubino.com/manuals/Flush_Dimmer.pdf

AlCalzone commented 4 years ago

The following procedure fixed it: https://community.home-assistant.io/t/integration-of-qubino-zmnhdd1-flush-dimmer/129487/13

Both OZW and this driver automatically configure lifeline associations during the device interview. Missing reports are almost always related to misconfigured associations. zwave-js automatically uses Multi Channel Assocations (with a target endpoint) if possible, otherwise "normal" node assocations. For some devices I had to force node associations, because I was getting reports that the reports wouldn't work otherwise. This includes ZMNHDD!

I'm not sure if the dashboard already allows you to configure associations - if it does, you could try to change group 1 (should include the controller) from a node association (node 1, NO endpoint) to a multi channel association (node 1, endpoint 0)

I see you opened a similar issue in the OZW repo, I'll watch this to see if the maintainers have any more information about the correct behavior.

darkbasic commented 4 years ago

I'm not sure if the dashboard already allows you to configure associations

@robertsLando does it?

robertsLando commented 4 years ago

Yes, you can

robertsLando commented 4 years ago

Control Panel > Groups Tab > Select a Node Then the goups and the target node / endpoint and press add association

AlCalzone commented 4 years ago

While you're at it, try if adding the controller to group 4 changes anything. This might at least give you multilevel switch updates when turning it on with binary switch.

darkbasic commented 4 years ago

try to change group 1 (should include the controller) from a node association (node 1, NO endpoint) to a multi channel association (node 1, endpoint 0)

zwavejs2mqtt_cannot_remove_association

Those are my associations for node 2, group 1. Unfortunately I cannot manage to remove the existing one, neither with "Remove" nor "Remove all".

  z2m:App Zwave api call: removeAssociations [ 2, 1, [ { nodeId: 1, endpoint: 0 } ] ] +3m
  z2m:Zwave Assocaitions: Removing associations from Node 2 Group 1: [object Object] +8m
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-1 1 => 1 +350ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-1 1 => 1 +0ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-1  =>  +0ms
  z2m:Zwave Success zwave api call removeAssociations  +1ms
  z2m:App Zwave api call: getAssociations [ 2, 1 ] +1s
  z2m:Zwave Success zwave api call getAssociations [ { nodeId: 1 } ] +650ms
  z2m:App Zwave api call: removeAllAssociations [ 2 ] +1m
  z2m:Zwave Assocaitions: Removing all associations from Node 2 +1m
  z2m:Zwave Success zwave api call removeAllAssociations  +1ms
  z2m:App Zwave api call: getAssociations [ 2, 1 ] +1s
  z2m:Zwave Success zwave api call getAssociations [ { nodeId: 1 } ] +1s

Any clue?

AlCalzone commented 4 years ago

This should be a node association:

Success zwave api call getAssociations [ { nodeId: 1 } ]

but the remove call tries to remove an endpoint association { nodeId: 1, endpoint: 0 } (which does not exist) @robertsLando

robertsLando commented 4 years ago

I know but shouldn't the removeAllAssociations remove it?

AlCalzone commented 4 years ago

Probably, yeah. I'd need to see the logfile 😅

darkbasic commented 4 years ago

Here it is: zwave-359840.log

In the log I tried to remove it with "Remove" first, then "RemoveAll".

AlCalzone commented 4 years ago

Strange, there's only the first remove visible in the log. @robertsLando I'm inclined to believe this is a bug in zwavejs2mqtt. The interview and the log from above

  z2m:App Zwave api call: removeAssociations [ 2, 1, [ { nodeId: 1, endpoint: 0 } ] ] +3m
  z2m:Zwave Assocaitions: Removing associations from Node 2 Group 1: [object Object] +8m
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-1 1 => 1 +350ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-1 1 => 1 +0ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-1  =>  +0ms
  z2m:Zwave Success zwave api call removeAssociations  +1ms
  z2m:App Zwave api call: getAssociations [ 2, 1 ] +1s
  z2m:Zwave Success zwave api call getAssociations [ { nodeId: 1 } ] +650ms

shows that there is only a node association (last line), but zwavejs2mqtt tries to remove an endpoint association (first line).

robertsLando commented 4 years ago

shows that there is only a node association (last line), but zwavejs2mqtt tries to remove an endpoint association (first line).

Yes, you right. Actually when I call removeAssociations I let the user specify the association to remove 'manually' (he doesn't select it from the associations list) and as it is multiChannel I also add the endpoint. I will try to improve this in the ui, anyway like I said, shouldn't the removeAllAssociations remove it?

robertsLando commented 4 years ago

@darkbasic Try to pull last commit https://github.com/zwave-js/zwavejs2mqtt/commit/3def708f8c86c638333ddcd0069a77d93951cb56

AlCalzone commented 4 years ago

removeAllAssociations

That is not part of zwave-js https://zwave-js.github.io/node-zwave-js/#/api/controller?id=managing-associations

robertsLando commented 4 years ago

That is not part of zwave-js

:rofl: :rofl: Let me go take my :coffee:

Is removeNodeFromAllAssocations the same?

UPDATE

No no wait I'm calling the right api: https://github.com/zwave-js/zwavejs2mqtt/blob/master/lib/ZwaveClient.js#L1164

I have just changed the name :)

robertsLando commented 4 years ago

Or maybe it means to remove the node from the other associations, not to remove associations of that node. Tricky :confounded:

AlCalzone commented 4 years ago

Yep, that has an entirely different meaning :) When a node is removed from a network, it should be removed from all associations. This is what this method is for.

You could just call removeAssociations with getAssociations(nodeId).get(groupId) to clear a group.

robertsLando commented 4 years ago

@AlCalzone Fixed:

https://github.com/zwave-js/zwavejs2mqtt/blob/master/lib/ZwaveClient.js#L1158

https://github.com/zwave-js/zwavejs2mqtt/blob/master/lib/ZwaveClient.js#L1184

darkbasic commented 4 years ago

@AlCalzone z2m:Zwave Error while adding associations to 2: Node 2, group 1 does not support multi channel associations! +1ms

zwave-3679.log

  z2m:App Zwave api call: getAssociations [ 2, 1 ] +12s
  z2m:Zwave Success zwave api call getAssociations [ { nodeId: 1 } ] +37s
  z2m:App Zwave api call: removeAssociations [ 2, 1, [ { nodeId: 1 } ] ] +11s
  z2m:Zwave Assocaitions: Removing associations from Node 2 Group 1: [object Object] +11s
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-1 1 => 1 +389ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-1 1 =>  +0ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-1  =>  +1ms
  z2m:Zwave Success zwave api call removeAssociations  +1ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-1 1 => 1 +75ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-1  =>  +0ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-1  =>  +1ms
  z2m:App Zwave api call: getAssociations [ 2, 1 ] +1s
  z2m:Zwave Success zwave api call getAssociations [] +535ms
  z2m:App Zwave api call: addAssociations [ 2, 1, [ { nodeId: 1, endpoint: 0 } ] ] +1m
  z2m:Zwave Assocaitions: Adding Node 1 to Group 1 of  Node 2 +1m
  z2m:Zwave Error while adding associations to 2: Node 2, group 1 does not support multi channel associations! +1ms
  z2m:Zwave Success zwave api call addAssociations  +1ms
  z2m:App Zwave api call: getAssociations [ 2, 1 ] +1s
  z2m:Zwave Success zwave api call getAssociations [] +1s

@robertsLando z2m:Zwave Assocaitions: Removing associations from Node 2 Group 1: [object Object] +11s typo is Associations plus json needs to be serialized

darkbasic commented 4 years ago

@robertsLando I also don't like the fact that once you've changed the placeholder channel ID you can't select the empty one anymore

darkbasic commented 4 years ago

@AlCalzone I also can't add the controller to group 4

zwave-3679.log

  z2m:App Zwave api call: getAssociations [ 2, 4 ] +2m
  z2m:Zwave Success zwave api call getAssociations [] +2m
  z2m:App Zwave api call: addAssociations [ 2, 4, [ { nodeId: 1 } ] ] +5s
  z2m:Zwave Assocaitions: Adding Node 1 to Group 4 of  Node 2 +5s
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-4 16 => 16 +387ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-4  => 1 +0ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-4  =>  +1ms
  z2m:Zwave Success zwave api call addAssociations  +1ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-4 16 => 16 +61ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-4 1 =>  +1ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-4  =>  +0ms
  z2m:App Zwave api call: getAssociations [ 2, 4 ] +1s
  z2m:Zwave Success zwave api call getAssociations [] +550ms
robertsLando commented 4 years ago

I also don't like the fact that once you've changed the placeholder channel ID you can't select the empty one anymore

What?

robertsLando commented 4 years ago

z2m:Zwave Error while adding associations to 2: Node 2, group 1 does not support multi channel associations! +1ms

That's really strange as it is has multiChannel flag to true

darkbasic commented 4 years ago

What?

Nevermind, I saw the slider and I didn't notice you can actually delete the content of the channel ID field.

Anyway, wouldn't it be better to have a "Delete" button near each "Current associations" item instead of the current way of doing this?

robertsLando commented 4 years ago

Anyway, wouldn't it be better to have a "Delete" button near each "Current associations" item instead of the current way?

Yes it would be more user friendly, I'm just lazy :rofl:

darkbasic commented 4 years ago

Anyway I've just tried to add a multichannel node association to group 4 and now both the node association and the multichannel one appeared:

  z2m:App Zwave api call: getAssociations [ 2, 4 ] +8m
  z2m:Zwave Success zwave api call getAssociations [] +8m
  z2m:App Zwave api call: addAssociations [ 2, 4, [ { nodeId: 1, endpoint: 0 } ] ] +16s
  z2m:Zwave Assocaitions: Adding Node 1 to Group 4 of  Node 2 +16s
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-4 16 => 16 +319ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-4  => 1 +1ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-4  => [object Object] +0ms
  z2m:Zwave Success zwave api call addAssociations  +1ms
  z2m:App Zwave api call: getAssociations [ 2, 4 ] +1s
  z2m:Zwave Success zwave api call getAssociations [ { nodeId: 1 }, { nodeId: 1, endpoint: 0 } ] +684ms

zwave-3679.log

Something strange is going on here...

robertsLando commented 4 years ago

@darkbasic I have submitted an ui improvment for associations that you will like :) pull

robertsLando commented 4 years ago

Something strange is going on here...

Zwave is good, zwave devices are strange :rofl:

AlCalzone commented 4 years ago

z2m:App Zwave api call: addAssociations [ 2, 4, [ { nodeId: 1 } ] ] +5s z2m:Zwave Assocaitions: Adding Node 1 to Group 4 of Node 2 +5s z2m:Zwave Node 2: value updated: 142-0-maxNodes-4 16 => 16 +387ms z2m:Zwave Node 2: value updated: 142-0-nodeIds-4 => 1 +0ms z2m:Zwave Node 2: value updated: 142-0-endpoints-4 => +1ms z2m:Zwave Success zwave api call addAssociations +1ms z2m:Zwave Node 2: value updated: 142-0-maxNodes-4 16 => 16 +61ms z2m:Zwave Node 2: value updated: 142-0-nodeIds-4 1 => +1ms z2m:Zwave Node 2: value updated: 142-0-endpoints-4 => +0ms z2m:App Zwave api call: getAssociations [ 2, 4 ] +1s

Looks like the device did not accept this change. addAssociations performs an add command and then requests the updated list. Wonder why the node association showed up on the next attempt though, maybe the device needed time to update?

Zwave is good, zwave devices are strange 🤣

yeah and Z-Wave associations are a f*cking mess.

That's really strange as it is has multiChannel flag to true

If the config file forbids multi channel associations then the driver respects that. @darkbasic You could try and change your config file locally: In node_modules/@zwave-js/config/config/devices/0x0159/zmnhdd.json comment out the lines with noEndpoint: true, then restart. Just be warned that this could cause the unsolicited updates to stop working.

darkbasic commented 4 years ago

I have submitted an ui improvment for associations that you will like :) pull

Unfortunately the backend is doing something fishy, because I had both a node association and a group association and after deleting one of them it deleted both...

  z2m:App Zwave api call: getAssociations [ 2, 4 ] +10s
  z2m:Zwave Success zwave api call getAssociations [ { nodeId: 1 }, { nodeId: 1, endpoint: 0 } ] +13s
  z2m:App Zwave api call: removeAssociations [ 2, 4, [ { nodeId: 1 } ] ] +1h
  z2m:Zwave Assocaitions: Removing associations from Node 2 Group 4: [{"nodeId":1}] +1h
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-4 16 => 16 +388ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-4 1 =>  +1ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-4 [object Object] => [object Object] +1ms
  z2m:Zwave Success zwave api call removeAssociations  +0ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-4 16 => 16 +16ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-4  =>  +0ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-4 [object Object] =>  +1ms
  z2m:App Zwave api call: getAssociations [ 2, 4 ] +1s
  z2m:Zwave Success zwave api call getAssociations [] +594ms

Wonder why the node association showed up on the next attempt though, maybe the device needed time to update?

I don't think so:

  z2m:App Zwave api call: addAssociations [ 2, 4, [ { nodeId: 1 } ] ] +2m
  z2m:Zwave Assocaitions: Adding Node 1 to Group 4 of  Node 2 +2m
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-4 16 => 16 +389ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-4  => 1 +0ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-4  => [object Object] +1ms
  z2m:Zwave Success zwave api call addAssociations  +1ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-4 16 => 16 +45ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-4 1 =>  +2ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-4 [object Object] =>  +1ms
  z2m:App Zwave api call: getAssociations [ 2, 4 ] +1s
  z2m:Zwave Success zwave api call getAssociations [] +561ms
  z2m:App User disconnected ndt4_zcnbK4pPDA0AAAC +10s

(waited some time)

  z2m:App Zwave api call: getAssociations [ 2, 4 ] +12s
  z2m:Zwave Success zwave api call getAssociations [] +23s
darkbasic commented 4 years ago

In node_modules/@zwave-js/config/config/devices/0x0159/zmnhdd.json comment out the lines with noEndpoint: true

It looks like despite the error it already created the group association, because after commeting them out it shows both:

  z2m:App Zwave api call: getAssociations [ 2, 4 ] +7s
  z2m:Zwave Success zwave api call getAssociations [] +12s
  z2m:App Zwave api call: getAssociations [ 2, 1 ] +2s
  z2m:Zwave Success zwave api call getAssociations [ { nodeId: 1 }, { nodeId: 1, endpoint: 0 } ] +2s

@robertsLando I tried the new "Remove all", but it doesn't remove all the associations:

  z2m:App Zwave api call: removeAllAssociations [ 2 ] +25s
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-1 1 => 1 +26s
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-1  =>  +1ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-1 [object Object] =>  +2ms
  z2m:Zwave Assocaitions: Removed 2 associations from Node 2 group 1 +4ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-2 16 => 16 +337ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-2  =>  +1ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-2  =>  +0ms
  z2m:Zwave Assocaitions: Removed 0 associations from Node 2 group 2 +1ms
  z2m:App Zwave api call: getAssociations [ 2, 1 ] +1s
  z2m:Zwave Success zwave api call getAssociations [ { nodeId: 1 } ] +252ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-3 16 => 16 +93ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-3  =>  +1ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-3  =>  +1ms
  z2m:Zwave Assocaitions: Removed 0 associations from Node 2 group 3 +1ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-4 16 => 16 +337ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-4  =>  +0ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-4  =>  +1ms
  z2m:Zwave Assocaitions: Removed 0 associations from Node 2 group 4 +1ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-5 16 => 16 +326ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-5  =>  +1ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-5  =>  +0ms
  z2m:Zwave Assocaitions: Removed 0 associations from Node 2 group 5 +1ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-6 16 => 16 +344ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-6  =>  +1ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-6  =>  +1ms
  z2m:Zwave Assocaitions: Removed 0 associations from Node 2 group 6 +1ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-7 16 => 16 +336ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-7  =>  +1ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-7  =>  +1ms
  z2m:Zwave Assocaitions: Removed 0 associations from Node 2 group 7 +0ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-8 16 => 16 +352ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-8  =>  +0ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-8  =>  +1ms
  z2m:Zwave Assocaitions: Removed 0 associations from Node 2 group 8 +1ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-9 16 => 16 +364ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-9  =>  +0ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-9  =>  +1ms
  z2m:Zwave Assocaitions: Removed 0 associations from Node 2 group 9 +2ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-10 16 => 16 +344ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-10  =>  +0ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-10  =>  +1ms
  z2m:Zwave Assocaitions: Removed 0 associations from Node 2 group 10 +1ms
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-11 16 => 16 +321ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-11  =>  +1ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-11 [object Object] =>  +0ms
  z2m:Zwave Assocaitions: Removed 1 associations from Node 2 group 11 +1ms
  z2m:Zwave Success zwave api call removeAllAssociations  +0ms

EDIT: even removing it with removeAssociation (instead of removeAll) doesn't work:

  z2m:App Zwave api call: getAssociations [ 2, 1 ] +5s
  z2m:Zwave Success zwave api call getAssociations [ { nodeId: 1 } ] +2m
  z2m:App Zwave api call: removeAssociations [ 2, 1, [ { nodeId: 1 } ] ] +23s
  z2m:Zwave Assocaitions: Removing associations from Node 2 Group 1: [{"nodeId":1}] +23s
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-1 1 => 1 +403ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-1  =>  +1ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-1  =>  +0ms
  z2m:Zwave Success zwave api call removeAssociations  +1ms
  z2m:App Zwave api call: getAssociations [ 2, 1 ] +1s
  z2m:Zwave Success zwave api call getAssociations [ { nodeId: 1 } ] +601ms
AlCalzone commented 4 years ago

Hmm that does indeed look very fishy.

z2m:App Zwave api call: removeAllAssociations [ 2 ] +25s z2m:Zwave Node 2: value updated: 142-0-maxNodes-1 1 => 1 +26s z2m:Zwave Node 2: value updated: 142-0-nodeIds-1 => +1ms z2m:Zwave Node 2: value updated: 142-0-endpoints-1 [object Object] => +2ms z2m:Zwave Assocaitions: Removed 2 associations from Node 2 group 1 +4ms

This looks like an endpoint association was removed (2nd to last line)

z2m:App Zwave api call: getAssociations [ 2, 1 ] +1s z2m:Zwave Success zwave api call getAssociations [ { nodeId: 1 } ] +252ms

And this is really weird. @robertsLando does z2m cache these results somehow? If not, this does seem like we have a node association created by the Association CC and nothing for Multi Channel Association CC. Removing that only uses Multi Channel Association CC, so the Association CC association is probably unaffected. 🤔

robertsLando commented 4 years ago

does z2m cache these results somehow?

I only cache groups, associations are fetched on every request when the user selects a group

robertsLando commented 4 years ago

@darkbasic Please use dev branch, I will add edits there

AlCalzone commented 4 years ago

Ok, then I'll have to investigate

robertsLando commented 4 years ago

@AlCalzone Add investigating flag :rofl:

AlCalzone commented 4 years ago

@darkbasic could you share your cache file (something.values.jsonl) please? If @robertsLando didn't change the location, it should be in node_modules/zwave-js/cache

robertsLando commented 4 years ago

It's in "store" folder now

darkbasic commented 4 years ago

It's in "store" folder now

Yes, it's in store:

zwavejs2mqtt]$ git status --ignored
Sul branch master
Il tuo branch è aggiornato rispetto a 'origin/master'.

File ignorati:
  (usa "git add -f <file>..." per includere l'elemento fra quelli di cui verrà eseguito il commit)
        bin/zwave-10331.log
        bin/zwave-16501.log
        bin/zwave-3679.log
        dist/
        node_modules/
        store/d743ed1a.json
        store/d743ed1a.metadata.jsonl
        store/d743ed1a.values.jsonl
        store/settings.json

@AlCalzone here it is, I also attached latest log

d743ed1a.values.jsonl.txt

zwave-16501.log

AlCalzone commented 4 years ago

Yup, that confirms my suspicion in https://github.com/zwave-js/node-zwave-js/issues/1090#issuecomment-721699693

AlCalzone commented 4 years ago

I'll probably have some time for a fix later tonight. Will let you know.

AlCalzone commented 4 years ago

@darkbasic https://github.com/zwave-js/node-zwave-js/pull/1094 should enable the controller to remove both the "normal" and the multi channel association. Can you test this from github or should I create an alpha release for you?

Testing from github should work as follows:

darkbasic commented 4 years ago

I'm using zwavejs2mqtt from the dev branch and node-zwave-js from the association-delete-all branch. I added a node association and then tried to add a multi-channel association, but it doesn't show up: is it normal?

  z2m:App Zwave api call: getAssociations [ 2, 1 ] +1s
  z2m:Zwave Success zwave api call getAssociations [] +676ms
  z2m:App Zwave api call: addAssociations [ 2, 1, [ { nodeId: 1 } ] ] +8s
  z2m:Zwave Assocaitions: Adding Node 1 to Group 1 of  Node 2 +8s
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-1 1 => 1 +320ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-1 [] => [ 1 ] +1ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-1 [] => [] +0ms
  z2m:Zwave Success zwave api call addAssociations  +2ms
  z2m:App Zwave api call: getAssociations [ 2, 1 ] +1s
  z2m:Zwave Success zwave api call getAssociations [ { nodeId: 1 } ] +678ms
  z2m:App Zwave api call: addAssociations [ 2, 1, [ { nodeId: 1, endpoint: 0 } ] ] +4s
  z2m:Zwave Assocaitions: Adding Node 1 to Group 1 of  Node 2 +4s
  z2m:Zwave Node 2: value updated: 142-0-maxNodes-1 1 => 1 +284ms
  z2m:Zwave Node 2: value updated: 142-0-nodeIds-1 [ 1 ] => [ 1 ] +0ms
  z2m:Zwave Node 2: value updated: 142-0-endpoints-1 [] => [] +1ms
  z2m:Zwave Success zwave api call addAssociations  +1ms
  z2m:App Zwave api call: getAssociations [ 2, 1 ] +1s
  z2m:Zwave Success zwave api call getAssociations [ { nodeId: 1 } ] +719ms
darkbasic commented 4 years ago

By the way, did you consider using yarn workspaces?

AlCalzone commented 4 years ago

z2m:App Zwave api call: addAssociations [ 2, 1, [ { nodeId: 1, endpoint: 0 } ] ] +4s z2m:Zwave Assocaitions: Adding Node 1 to Group 1 of Node 2 +4s z2m:Zwave Node 2: value updated: 142-0-maxNodes-1 1 => 1 +284ms z2m:Zwave Node 2: value updated: 142-0-nodeIds-1 [ 1 ] => [ 1 ] +0ms z2m:Zwave Node 2: value updated: 142-0-endpoints-1 [] => [] +1ms

The multi channel association is added as a node association. Not sure if this is due to the config file forcing a node association or if z2m is mixing this up? @robertsLando

By the way, did you consider using yarn workspaces?

I have never worked with yarn. npm@7 is also getting a workspace feature, but I'm not sure yet what this changes exactly.

Btw, can I interpret the above log as confirmation that the association-delete-all does what it is supposed to?

darkbasic commented 4 years ago

Btw, can I interpret the above log as confirmation that the association-delete-all does what it is supposed to?

I've been able to remove a node association or a multi channel association, but I couldn't try to delete them when they where both present at the same time, because I can only have a node or a multi channel now (not both).

@robertsLando I've found a new bug: if you edit the channel id field (for example because you added a multi channel association) and then you clear it up, you won't be able to create new associations until you refresh the page:

z2m:App Zwave api call: addAssociations [ 2, 1, [ { nodeId: 1, endpoint: '' } ] ] +14s

It basically targets the "empty string" endpoint.

AlCalzone commented 4 years ago

I've been able to remove a node association or a multi channel association

That is enough for me. At least it seems like your phantom association is gone.