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] Notification going to Node_id topic instead of Node_name topic. #334

Closed
1 of 3 tasks
towerhand opened this issue Jan 23, 2021 · 11 comments
Closed
1 of 3 tasks
Assignees
Labels
bug Something isn't working

Comments

@towerhand
Copy link
Contributor

towerhand commented Jan 23, 2021

Before submitting a bug please read: https://zwave-js.github.io/zwavejs2mqtt/#/troubleshooting/bug_report

Version

  • Custom with latest changes on both masters.

Build/Run method

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

zwavejs2mqtt version: 1.0.0 rc.1+cd11214.cd11214
zwavejs version: 6.0.1-798516f

Describe the bug

In the gateway settings I have turned on the option to use node names instead of node ids and it's working properly for all nodes except one, node 22 which is a door lock. The status, node info and CCs are getting published to the node name topic (zwave2jsmqtt/yale_door_lock) as expected, but the notifications are getting published to node_22 topic (zwave2jsmqtt/nodeID_22/notification), what a getting published there are: manual_unlock_operation, manual_lock_operation, RF_lock_operation, RF_unlock_operation.

To Reproduce

I'm checking the mqtt information and topics with MQTT explorer, I have erased the nodeID_22.

Manually locking and unlocking the lock creates the manual_unlock_operation and manual_lock_operation on nodeID_22, locking and unlocking from HA creates the RF_lock_operation and RF_unlock_operation on nodeID_22.

Expected behavior

I would assume the notification topic should be under the node name topic, like everything else. (zwave2jsmqtt/yale_door_lock/notification)

Additional context

I have refreshed values and re-interview the node.

@towerhand towerhand added the bug Something isn't working label Jan 23, 2021
@towerhand towerhand changed the title [bug] Notification going to Node_id topic instead node name topic. [bug] Notification going to Node_id topic instead of Node_name topic. Jan 23, 2021
@larstobi
Copy link
Contributor

Related to #217 ?

@towerhand
Copy link
Contributor Author

towerhand commented Jan 23, 2021

Not sure, I just read through that other issue and seems like it was happening in the homeassistant discovery topic.

@towerhand
Copy link
Contributor Author

I'll close this issue if it's the same underlying problem, just let me know.

@robertsLando
Copy link
Member

@towerhand @larstobi FIxed on master

@towerhand
Copy link
Contributor Author

Thanks @robertsLando, you are always so fast to fix issues. Really appreciate it.

@larstobi
Copy link
Contributor

Thanks!!! 😊

@towerhand
Copy link
Contributor Author

I just noticed the lock doesn't update the state in home assistant when manually operated, I can see the state change with the debug console in zjs2m. Is there something in this fix that could have caused that? otherwise I'll create a new issue.

@robertsLando
Copy link
Member

I can see the state change with the debug console in zjs2m

Could you enable debug logging and attach the logs? With the debug logleve you should see the mqtt message sent (if any) after the state update

@towerhand
Copy link
Contributor Author

towerhand commented Feb 2, 2021

I'm trying but my rp3 is struggling. The logs are growing considerably with the debug log level, over 200 MB when all nodes are completed. Below is what I was able to find by searching the manual lock operation.

2021-02-02 09:19:01.924 INFO ZWAVE: Node 22: notification: Manual lock operation
2021-02-02 09:19:01.927 DEBUG MQTT: Publishing to zwave2jsmqtt/yale_door_lock/notification/Manual_lock_operation: { time: 1612279141925, value: null } with options { qos: 0, retain: true }
2021-02-02 09:19:02.321 DEBUG MQTT: Publishing to zwave2jsmqtt/_EVENTS/ZWAVE_GATEWAY-zwavejs2mqtt/node/node_notification: {
data: [
{
id: 22,
deviceId: '297-1536-32770',
manufacturer: 'ASSA ABLOY',
manufacturerId: 297,
productType: 32770,
productId: 1536,
name: 'yale_door_lock',
loc: '',
values: {
'98-0-currentMode': {
id: '22-98-0-currentMode',
nodeId: 22,
commandClass: 98,
commandClassName: 'Door Lock',
endpoint: 0,
property: 'currentMode',
propertyName: 'currentMode',
propertyKey: undefined,
propertyKeyName: undefined,
type: 'number',
readable: true,
writeable: false,
description: undefined,
label: 'Current lock mode',
default: undefined,
stateless: false,
min: 0,
max: 255,
step: undefined,
unit: undefined,
list: true,
states: [Array],
value: 255,
isCurrentValue: true,
targetValue: '98-0-targetMode',
lastUpdate: 1612278707658
},
'98-0-targetMode': {
id: '22-98-0-targetMode',
nodeId: 22,
commandClass: 98,
commandClassName: 'Door Lock',
endpoint: 0,
property: 'targetMode',
propertyName: 'targetMode',
propertyKey: undefined,
propertyKeyName: undefined,
type: 'number',
readable: true,
writeable: true,
description: undefined,
label: 'Target lock mode',
default: undefined,
stateless: false,
min: 0,
max: 255,
step: undefined,
unit: undefined,
list: true,
states: [Array],
value: 255,
lastUpdate: 1612278680986
},
'98-0-outsideHandlesCanOpenDoor': {
id: '22-98-0-outsideHandlesCanOpenDoor',
nodeId: 22,
commandClass: 98,
commandClassName: 'Door Lock',
endpoint: 0,
property: 'outsideHandlesCanOpenDoor',
propertyName: 'outsideHandlesCanOpenDoor',
propertyKey: undefined,
propertyKeyName: undefined,
type: 'any',
readable: true,
writeable: false,
description: undefined,
label: 'Which outside handles can open the door (actual status)',
default: undefined,
stateless: false,
list: false,
value: [Array],
lastUpdate: 1612278707986
},
'98-0-insideHandlesCanOpenDoor': {
id: '22-98-0-insideHandlesCanOpenDoor',
nodeId: 22,
commandClass: 98,
commandClassName: 'Door Lock',
endpoint: 0,
property: 'insideHandlesCanOpenDoor',
propertyName: 'insideHandlesCanOpenDoor',
propertyKey: undefined,
propertyKeyName: undefined,
type: 'any',
readable: true,
writeable: false,
description: undefined,
label: 'Which inside handles can open the door (actual status)',
default: undefined,
stateless: false,
list: false,
value: [Array],
lastUpdate: 1612278708259
},
'98-0-latchStatus': {
id: '22-98-0-latchStatus',
nodeId: 22,
commandClass: 98,
commandClassName: 'Door Lock',
endpoint: 0,
property: 'latchStatus',
propertyName: 'latchStatus',
propertyKey: undefined,
propertyKeyName: undefined,
type: 'any',
readable: true,
writeable: false,
description: undefined,
label: 'The current status of the latch',
default: undefined,
stateless: false,
list: false,
value: 'open',
lastUpdate: 1612278708576
},
'98-0-boltStatus': {
id: '22-98-0-boltStatus',
nodeId: 22,
commandClass: 98,
commandClassName: 'Door Lock',
endpoint: 0,
property: 'boltStatus',
propertyName: 'boltStatus',
propertyKey: undefined,
propertyKeyName: undefined,
type: 'any',
readable: true,
writeable: false,
description: undefined,
label: 'The current status of the bolt',
default: undefined,
stateless: false,
list: false,
value: 'locked',
lastUpdate: 1612278708829
},
'98-0-doorStatus': {
id: '22-98-0-doorStatus',
nodeId: 22,
commandClass: 98,
commandClassName: 'Door Lock',
endpoint: 0,
property: 'doorStatus',
propertyName: 'doorStatus',
propertyKey: undefined,
propertyKeyName: undefined,
type: 'any',
readable: true,
writeable: false,
description: undefined,
label: 'The current status of the door',
default: undefined,
stateless: false,
list: false,
value: 'open',
lastUpdate: 1612278709257
},
'98-0-lockTimeout': {
id: '22-98-0-lockTimeout',
nodeId: 22,
commandClass: 98,
commandClassName: 'Door Lock',
endpoint: 0,
property: 'lockTimeout',
propertyName: 'lockTimeout',
propertyKey: undefined,
propertyKeyName: undefined,
type: 'number',
readable: true,
writeable: false,
description: undefined,
label: 'Seconds until lock mode times out',
default: undefined,
stateless: false,
min: undefined,
max: undefined,
step: undefined,
unit: undefined,
list: false,
value: undefined,
lastUpdate: 1612278681017
},
'98-0-operationType': {
id: '22-98-0-operationType',
nodeId: 22,
commandClass: 98,
commandClassName: 'Door Lock',
endpoint: 0,
property: 'operationType',
propertyName: 'operationType',
propertyKey: undefined,
propertyKeyName: undefined,
type: 'number',
readable: true,
writeable: true,
description: undefined,
label: 'Lock operation type',
default: undefined,
stateless: false,
min: 0,
max: 255,
step: undefined,
unit: undefined,
list: true,
states: [Array],
value: 1,
lastUpdate: 1612278700003
},
'98-0-outsideHandlesCanOpenDoorConfiguration': {
id: '22-98-0-outsideHandlesCanOpenDoorConfiguration',
nodeId: 22,
commandClass: 98,
commandClassName: 'Door Lock',
endpoint: 0,
property: 'outsideHandlesCanOpenDoorConfiguration',
propertyName: 'outsideHandlesCanOpenDoorConfiguration',
propertyKey: undefined,
propertyKeyName: undefined,
type: 'any',
readable: true,
writeable: true,
description: undefined,
label: 'Which outside handles can open the door (configuration)',
default: undefined,
stateless: false,
list: false,
value: [Array],
lastUpdate: 1612278700303
},
'98-0-insideHandlesCanOpenDoorConfiguration': {
id: '22-98-0-insideHandlesCanOpenDoorConfiguration',
nodeId: 22,
commandClass: 98,
commandClassName: 'Door Lock',
endpoint: 0,
property: 'insideHandlesCanOpenDoorConfiguration',
propertyName: 'insideHandlesCanOpenDoorConfiguration',
propertyKey: undefined,
propertyKeyName: undefined,
type: 'any',
readable: true,
writeable: true,
description: undefined,
label: 'Which inside handles can open the door (configuration)',
default: undefined,
stateless: false,
list: false,
value: [Array],
lastUpdate: 1612278700525
},
'98-0-lockTimeoutConfiguration': {
id: '22-98-0-lockTimeoutConfiguration',
nodeId: 22,
commandClass: 98,
commandClassName: 'Door Lock',
endpoint: 0,
property: 'lockTimeoutConfiguration',
propertyName: 'lockTimeoutConfiguration',
propertyKey: undefined,
propertyKeyName: undefined,
type: 'number',
readable: true,
writeable: true,
description: undefined,
label: 'Duration of timed mode in seconds',
default: undefined,
stateless: false,
min: 0,
max: 65535,
step: undefined,
unit: undefined,
list: false,
value: undefined,
lastUpdate: 1612278681036
},
'99-0-userIdStatus-1': {
id: '22-99-0-userIdStatus-1',
nodeId: 22,
commandClass: 99,
commandClassName: 'User Code',
endpoint: 0,
property: 'userIdStatus',
propertyName: 'userIdStatus',
propertyKey: 1,
propertyKeyName: '1',
type: 'number',
readable: true,
writeable: true,
description: undefined,
label: 'User ID status (1)',
default: undefined,
stateless: false,
min: undefined,
max: undefined,
step: undefined,
unit: undefined,
list: true,
states: [Array],
value: 1,
lastUpdate: 1612278715721
},
'99-0-userCode-1': {

here start listing all 250 user codes then:

    },
    '112-0-1': {
      id: '22-112-0-1',
      nodeId: 22,
      commandClass: 112,
      commandClassName: 'Configuration',
      endpoint: undefined,
      property: 1,
      propertyName: 'Volume',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'number',
      readable: true,
      writeable: true,
      description: 'Volume of voice and beeps',
      label: 'Volume',
      default: 1,
      stateless: false,
      min: 1,
      max: 3,
      step: undefined,
      unit: undefined,
      list: true,
      states: [Array],
      value: 2,
      lastUpdate: 1612279090075
    },
    '112-0-2': {
      id: '22-112-0-2',
      nodeId: 22,
      commandClass: 112,
      commandClassName: 'Configuration',
      endpoint: undefined,
      property: 2,
      propertyName: 'Auto relock',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'number',
      readable: true,
      writeable: true,
      description: 'Automatic relocking',
      label: 'Auto relock',
      default: 0,
      stateless: false,
      min: 0,
      max: 255,
      step: undefined,
      unit: undefined,
      list: true,
      states: [Array],
      value: 0,
      lastUpdate: 1612279091022
    },
    '112-0-3': {
      id: '22-112-0-3',
      nodeId: 22,
      commandClass: 112,
      commandClassName: 'Configuration',
      endpoint: undefined,
      property: 3,
      propertyName: 'Auto relock time',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'number',
      readable: true,
      writeable: true,
      description: 'Time for auto relock',
      label: 'Auto relock time',
      default: 30,
      stateless: false,
      min: 5,
      max: 255,
      step: undefined,
      unit: undefined,
      list: false,
      value: 30,
      lastUpdate: 1612279091969
    },
    '112-0-4': {
      id: '22-112-0-4',
      nodeId: 22,
      commandClass: 112,
      commandClassName: 'Configuration',
      endpoint: undefined,
      property: 4,
      propertyName: 'Incorrect PIN limit',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'number',
      readable: true,
      writeable: true,
      description: 'Number of incorrect PINs before lockout',
      label: 'Incorrect PIN limit',
      default: 5,
      stateless: false,
      min: 1,
      max: 7,
      step: undefined,
      unit: undefined,
      list: false,
      value: 5,
      lastUpdate: 1612279093007
    },
    '112-0-7': {
      id: '22-112-0-7',
      nodeId: 22,
      commandClass: 112,
      commandClassName: 'Configuration',
      endpoint: undefined,
      property: 7,
      propertyName: 'Keypad lockout time',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'number',
      readable: true,
      writeable: true,
      description: 'Incorrect PINs lockout time',
      label: 'Keypad lockout time',
      default: 60,
      stateless: false,
      min: 1,
      max: 255,
      step: undefined,
      unit: undefined,
      list: false,
      value: 60,
      lastUpdate: 1612279105323
    },
    '112-0-8': {
      id: '22-112-0-8',
      nodeId: 22,
      commandClass: 112,
      commandClassName: 'Configuration',
      endpoint: undefined,
      property: 8,
      propertyName: 'Operation Mode',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'number',
      readable: true,
      writeable: true,
      description: 'Operation Mode',
      label: 'Operation Mode',
      default: 0,
      stateless: false,
      min: 0,
      max: 3,
      step: undefined,
      unit: undefined,
      list: true,
      states: [Array],
      value: 0,
      lastUpdate: 1612279106383
    },
    '112-0-6': {
      id: '22-112-0-6',
      nodeId: 22,
      commandClass: 112,
      commandClassName: 'Configuration',
      endpoint: undefined,
      property: 6,
      propertyName: 'Radio event reporting',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'number',
      readable: true,
      writeable: true,
      description: undefined,
      label: 'Radio event reporting',
      default: 255,
      stateless: false,
      min: 0,
      max: 255,
      step: undefined,
      unit: undefined,
      list: true,
      states: [Array],
      value: undefined
    },
    '114-0-manufacturerId': {
      id: '22-114-0-manufacturerId',
      nodeId: 22,
      commandClass: 114,
      commandClassName: 'Manufacturer Specific',
      endpoint: 0,
      property: 'manufacturerId',
      propertyName: 'manufacturerId',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'number',
      readable: true,
      writeable: false,
      description: undefined,
      label: 'Manufacturer ID',
      default: undefined,
      stateless: false,
      min: 0,
      max: 65535,
      step: undefined,
      unit: undefined,
      list: false,
      value: 297,
      lastUpdate: 1612278682810
    },
    '114-0-productType': {
      id: '22-114-0-productType',
      nodeId: 22,
      commandClass: 114,
      commandClassName: 'Manufacturer Specific',
      endpoint: 0,
      property: 'productType',
      propertyName: 'productType',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'number',
      readable: true,
      writeable: false,
      description: undefined,
      label: 'Product type',
      default: undefined,
      stateless: false,
      min: 0,
      max: 65535,
      step: undefined,
      unit: undefined,
      list: false,
      value: 32770,
      lastUpdate: 1612278682812
    },
    '114-0-productId': {
      id: '22-114-0-productId',
      nodeId: 22,
      commandClass: 114,
      commandClassName: 'Manufacturer Specific',
      endpoint: 0,
      property: 'productId',
      propertyName: 'productId',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'number',
      readable: true,
      writeable: false,
      description: undefined,
      label: 'Product ID',
      default: undefined,
      stateless: false,
      min: 0,
      max: 65535,
      step: undefined,
      unit: undefined,
      list: false,
      value: 1536,
      lastUpdate: 1612278682814
    },
    '128-0-level': {
      id: '22-128-0-level',
      nodeId: 22,
      commandClass: 128,
      commandClassName: 'Battery',
      endpoint: 0,
      property: 'level',
      propertyName: 'level',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'number',
      readable: true,
      writeable: false,
      description: undefined,
      label: 'Battery level',
      default: undefined,
      stateless: false,
      min: 0,
      max: 100,
      step: undefined,
      unit: '%',
      list: false,
      value: 54,
      lastUpdate: 1612278690170
    },
    '128-0-isLow': {
      id: '22-128-0-isLow',
      nodeId: 22,
      commandClass: 128,
      commandClassName: 'Battery',
      endpoint: 0,
      property: 'isLow',
      propertyName: 'isLow',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'boolean',
      readable: true,
      writeable: false,
      description: undefined,
      label: 'Low battery level',
      default: undefined,
      stateless: false,
      list: false,
      value: false,
      lastUpdate: 1612278690618
    },
    '134-0-libraryType': {
      id: '22-134-0-libraryType',
      nodeId: 22,
      commandClass: 134,
      commandClassName: 'Version',
      endpoint: 0,
      property: 'libraryType',
      propertyName: 'libraryType',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'any',
      readable: true,
      writeable: false,
      description: undefined,
      label: 'Library type',
      default: undefined,
      stateless: false,
      list: false,
      value: 3,
      lastUpdate: 1612278682823
    },
    '134-0-protocolVersion': {
      id: '22-134-0-protocolVersion',
      nodeId: 22,
      commandClass: 134,
      commandClassName: 'Version',
      endpoint: 0,
      property: 'protocolVersion',
      propertyName: 'protocolVersion',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'any',
      readable: true,
      writeable: false,
      description: undefined,
      label: 'Z-Wave protocol version',
      default: undefined,
      stateless: false,
      list: false,
      value: '4.24',
      lastUpdate: 1612278682825
    },
    '134-0-firmwareVersions': {
      id: '22-134-0-firmwareVersions',
      nodeId: 22,
      commandClass: 134,
      commandClassName: 'Version',
      endpoint: 0,
      property: 'firmwareVersions',
      propertyName: 'firmwareVersions',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'any',
      readable: true,
      writeable: false,
      description: undefined,
      label: 'Z-Wave chip firmware versions',
      default: undefined,
      stateless: false,
      list: false,
      value: [Array],
      lastUpdate: 1612278682828
    },
    '134-0-hardwareVersion': {
      id: '22-134-0-hardwareVersion',
      nodeId: 22,
      commandClass: 134,
      commandClassName: 'Version',
      endpoint: 0,
      property: 'hardwareVersion',
      propertyName: 'hardwareVersion',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'any',
      readable: true,
      writeable: false,
      description: undefined,
      label: 'Z-Wave chip hardware version',
      default: undefined,
      stateless: false,
      list: false,
      value: undefined,
      lastUpdate: 1612278682830
    },
    '139-0-dateAndTime': {
      id: '22-139-0-dateAndTime',
      nodeId: 22,
      commandClass: 139,
      commandClassName: 'Time Parameters',
      endpoint: 0,
      property: 'dateAndTime',
      propertyName: 'dateAndTime',
      propertyKey: undefined,
      propertyKeyName: undefined,
      type: 'any',
      readable: true,
      writeable: true,
      description: undefined,
      label: 'dateAndTime (property)',
      default: undefined,
      stateless: false,
      list: false,
      value: '2021-01-29T10:02:36.000Z',
      lastUpdate: 1612278682832
    }
  },
  groups: [
    {
      text: 'Lifeline',
      value: 1,
      maxNodes: 1,
      isLifeline: true,
      multiChannel: false
    },
    [length]: 1
  ],
  neighbors: [ 1, 2, 3, 4, 6, 7, 14, 16, 17, 21, 23, [length]: 11 ],
  ready: true,
  available: false,
  hassDevices: {
    lock_lock: {
      type: 'lock',
      object_id: 'lock',
      discovery_payload: [Object],
      discoveryTopic: 'lock/yale_door_lock/lock/config',
      values: [Array],
      persistent: false,
      ignoreDiscovery: false
    },
    sensor_battery_level: {
      type: 'sensor',
      object_id: 'battery_level',
      discovery_payload: [Object],
      discoveryTopic: 'sensor/yale_door_lock/battery_level/config',
      values: [Array],
      persistent: false,
      ignoreDiscovery: false
    },
    binary_sensor_battery_islow: {
      type: 'binary_sensor',
      object_id: 'battery_islow',
      discovery_payload: [Object],
      discoveryTopic: 'binary_sensor/yale_door_lock/battery_islow/config',
      values: [Array],
      persistent: false,
      ignoreDiscovery: false
    }
  },
  failed: false,
  lastActive: 1612279106387,
  interviewCompleted: true,
  firmwareVersion: '1.78',
  isBeaming: true,
  isSecure: true,
  keepAwake: false,
  maxBaudRate: null,
  isRouting: true,
  isFrequentListening: true,
  isListening: false,
  status: 'Alive',
  interviewStage: 'Complete',
  productLabel: 'YRD256',
  productDescription: 'Touchscreen deadbolt without keyway',
  zwaveVersion: 4,
  deviceClass: { basic: 4, generic: 64, specific: 3 },
  hexId: '0x0129-0x0600-0x8002'
},
'Manual lock operation',
undefined,
[length]: 3

@towerhand
Copy link
Contributor Author

Please let me know if you need anything else. Is it related to the PR fixing the notification path, or a new issue, or on my end?

@robertsLando
Copy link
Member

I'm going to release a new version, could be also a deivce issue btw. Open a separete log and attach all logs (both zwavejs and zwavejs2mqtt)

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

No branches or pull requests

3 participants