madchicken/homebridge-zigbee-nt

Add Ikea Tradfri repeater support

nyxs opened this issue · 27 comments

nyxs commented

Hey all,
I bought the Ikea Tradfri repeater (which said to be supported) and I get this:
[15/05/2021, 00:56:32] [ZigBee] Registering new accessory with uuid f34fbfb9-d4ee-4dc4-9b7f-16b171c5a08c and name 0xd0cf5efffedd9fb8 [15/05/2021, 00:56:32] [ZigBee] Device with key IKEA of Sweden:TRADFRI signal repeater not supported. Please open a Github issue for this at https://github.com/madchicken/homebridge-zigbee-nt/issues Device { ID: 6, _type: 'Router', _ieeeAddr: '0xd0cf5efffedd9fb8', _networkAddress: 25240, _manufacturerID: 4476, _endpoints: [ Endpoint { ID: 1, profileID: 260, deviceID: 8, inputClusters: [Array], outputClusters: [Array], deviceNetworkAddress: 25240, deviceIeeeAddress: '0xd0cf5efffedd9fb8', clusters: [Object], _binds: [], _configuredReportings: [], meta: {} }, Endpoint { ID: 242, profileID: 41440, deviceID: 97, inputClusters: [Array], outputClusters: [Array], deviceNetworkAddress: 25240, deviceIeeeAddress: '0xd0cf5efffedd9fb8', clusters: {}, _binds: [], _configuredReportings: [], meta: {} } ], _manufacturerName: 'IKEA of Sweden', _powerSource: 'Mains (single phase)', _modelID: 'TRADFRI signal repeater', _applicationVersion: 32, _stackVersion: 98, _zclVersion: 3, _hardwareVersion: 1, _dateCode: '20180828', _softwareBuildID: '2.0.019', _interviewCompleted: true, _interviewing: false, _skipDefaultResponse: false, meta: {}, _lastSeen: 1621029391352 } [15/05/2021, 00:56:32] [ZigBee] Device not recognized: { device: Device { ID: 6, _type: 'Router', _ieeeAddr: '0xd0cf5efffedd9fb8', _networkAddress: 25240, _manufacturerID: 4476, _endpoints: [ [Endpoint], [Endpoint] ], _manufacturerName: 'IKEA of Sweden', _powerSource: 'Mains (single phase)', _modelID: 'TRADFRI signal repeater', _applicationVersion: 32, _stackVersion: 98, _zclVersion: 3, _hardwareVersion: 1, _dateCode: '20180828', _softwareBuildID: '2.0.019', _interviewCompleted: true, _interviewing: false, _skipDefaultResponse: false, meta: {}, _lastSeen: 1621029391352 } }

Can you add this device, please? (Again, it said to be supported in the zigbee2mqtt.io supported devices).

Thanks

Can confirm. Getting the same message...

Device {
  ID: 8,
  _type: 'Router',
  _ieeeAddr: '0x84fd27fffe6fab53',
  _networkAddress: 34504,
  _manufacturerID: 4476,
  _endpoints: [
    Endpoint {
      ID: 1,
      profileID: 260,
      deviceID: 8,
      inputClusters: [Array],
      outputClusters: [Array],
      deviceNetworkAddress: 34504,
      deviceIeeeAddress: '0x84fd27fffe6fab53',
      clusters: [Object],
      _binds: [],
      _configuredReportings: [],
      meta: {}
    },
    Endpoint {
      ID: 242,
      profileID: 41440,
      deviceID: 97,
      inputClusters: [Array],
      outputClusters: [Array],
      deviceNetworkAddress: 34504,
      deviceIeeeAddress: '0x84fd27fffe6fab53',
      clusters: {},
      _binds: [],
      _configuredReportings: [],
      meta: {}
    }
  ],
  _manufacturerName: 'IKEA of Sweden',
  _powerSource: 'Mains (single phase)',
  _modelID: 'TRADFRI Signal Repeater',
  _applicationVersion: 33,
  _stackVersion: 98,
  _zclVersion: 3,
  _hardwareVersion: 1,
  _dateCode: '20190311',
  _softwareBuildID: '2.2.005',
  _interviewCompleted: true,
  _interviewing: false,
  _skipDefaultResponse: false,
  meta: {},
  _lastSeen: 1626379621826
}

I will look into this...I need to understand how this device integrates with Homekit in general

IMHO there should not be any Homekit integration at all since it is just a repeater without any further functionality.

Yes, but this is an homebridge plugin, that is creating accessories for Homekit. I need to handle this accessory differently

That's what I meant. It needs to be handled differently as in not handled at all... without producing that error message. It is part of the network but should not be part of the homekit integration.

@Qeteshpony @nyxs Can someone build and run this branch and tell me if works for you?

nyxs commented

@Qeteshpony @nyxs Can someone build and run this branch and tell me if works for you?

How do I build and run this locally?

Let me publish a beta version, it's probably easier

I just published version 2.5.2-beta.2
Install it using command

npm i homebridge-zigbee-nt@2.5.2-beta.2 -g
nyxs commented

I just published version 2.5.2-beta.2
Install it using command

npm i homebridge-zigbee-nt@2.5.2-beta.2 -g

Installed, restarted the HB Server and still getting the same message
Uploading 56953A76-6E24-4B1F-A14C-022EF194E0B3.jpeg…

Sorry I did the new build from the wrong branch. Please use the beta.3 one (building it right now)

nyxs commented

Same error after installing beta 3 and restarting the server

Ok, beta.5 should now work (I added a test). Let me know so I can merge this PR

nyxs commented

Sorry to disappoint, but it's not working also:
[30/08/2021, 10:16:23] [ZigBee] Device with key IKEA of Sweden:TRADFRI signal repeater not supported. Please open a Github issue for this at https://github.com/madchicken/homebridge-zigbee-nt/issues Device {
ID: 6,
_type: 'Router',
_ieeeAddr: '0xd0cf5efffedd9fb8',
_networkAddress: 25240,
_manufacturerID: 4476,
_endpoints: [
Endpoint {
ID: 1,
profileID: 260,
deviceID: 8,
inputClusters: [Array],
outputClusters: [Array],
deviceNetworkAddress: 25240,
deviceIeeeAddress: '0xd0cf5efffedd9fb8',
clusters: [Object],
_binds: [],
_configuredReportings: [],
meta: {}
},
Endpoint {
ID: 242,
profileID: 41440,
deviceID: 97,
inputClusters: [Array],
outputClusters: [Array],
deviceNetworkAddress: 25240,
deviceIeeeAddress: '0xd0cf5efffedd9fb8',
clusters: {},
_binds: [],
_configuredReportings: [],
meta: {}
}
],
_manufacturerName: 'IKEA of Sweden',
_powerSource: 'Mains (single phase)',
_modelID: 'TRADFRI signal repeater',
_applicationVersion: 32,
_stackVersion: 98,
_zclVersion: 3,
_hardwareVersion: 1,
_dateCode: '20180828',
_softwareBuildID: '2.0.019',
_interviewCompleted: true,
_interviewing: false,
_skipDefaultResponse: false,
meta: {},
_lastSeen: 1630057833597
}

image

Can you try the new beta.6 @nyxs ?

nyxs commented

Can you try the new beta.6 @nyxs ?

Ok, so I had to install it using --unsafe, otherwise, it fails to install.
Now I do see it as an unsupported device.

The question now is if it will cast to the HB and then to the HK the devices synced to it.
Need to test.

Ok, I am gonna close this and merge the PR. Please feel free to open a new one if you find any problem

Hi, I'm ussing the latest version of plugin. Today I install Ikea repeater. The log below:

(node:21039) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'configured' of undefined
    at IkeaSignalRepeater.set isConfigured [as isConfigured] (/usr/lib/node_modules/homebridge-zigbee-nt/src/accessories/zig-bee-accessory.ts:209:46)
    at IkeaSignalRepeater.<anonymous> (/usr/lib/node_modules/homebridge-zigbee-nt/src/accessories/zig-bee-accessory.ts:178:28)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/lib/node_modules/homebridge-zigbee-nt/dist/accessories/zig-bee-accessory.js:5:58)
(node:21039) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 55)

Hi, it appears my logs are also showing that TypeError when using the signal repeater, started as soon as I added it.

@madchicken Is it OK to leave that? It seems to send this error to the console quite often.

Edit: I have since discovered that the same error happens upon adding lightbulbs also, although interestingly buttons and sensors don't seem to show this issue.

I've also noticed that there's a follow up issue of the same error and there was a fix underway for these bugs. Looking forward to that being released so I can chuck the IKEA Tradfri hub out of the window! 😄

If someone can test this branch it should solve the issue: #208

If someone can test this branch it should solve the issue: #208

Hey, I'd love to test this for you to confirm it's all working- I'm running homebridge using the raspberry pi image, what would be the best way to run your plugin on this branch on it?

Can you try version 2.5.5?

Hey, I've just updated to it, and tried add the signal repeater specifically, it looks like a similar error occurs.

Here's the full log from when I tried:

[31/10/2021, 14:47:39] [ZigBee] Zigbee: allowing new devices to join.
[31/10/2021, 14:48:17] [ZigBee] Accepting joining whitelisted device '0x680ae2fffed1f4d7'
[31/10/2021, 14:48:17] [ZigBee] Device joined, Adding 0x680ae2fffed1f4d7 (undefined - undefined)
[31/10/2021, 14:48:17] [ZigBee] Interview progress started for device 0x680ae2fffed1f4d7
[31/10/2021, 14:48:19] [ZigBee] Initializing ZigBee device: 0x680ae2fffed1f4d7 - TRADFRI Signal Repeater - IKEA of Sweden
[31/10/2021, 14:48:19] [ZigBee] Registering new accessory with uuid 964eb072-5d01-46d7-affe-0b54be9c39a4 and name 0x680ae2fffed1f4d7
[31/10/2021, 14:48:19] [ZigBee] Registered device: 0x680ae2fffed1f4d7 IKEA of Sweden TRADFRI Signal Repeater
[31/10/2021, 14:48:19] [ZigBee] Mounting device 0x680ae2fffed1f4d7...
[31/10/2021, 14:48:19] [ZigBee] Device 0x680ae2fffed1f4d7 is a router, install ping
[31/10/2021, 14:48:19] [homebridge-zigbee-nt] This plugin generated a warning from the characteristic 'Status Low Battery': Characteristic not in required or optional characteristic section for service WiFiTransport. Adding anyway.. See https://git.io/JtMGR for more info.
[31/10/2021, 14:48:19] [homebridge-zigbee-nt] This plugin generated a warning from the characteristic 'Status Tampered': Characteristic not in required or optional characteristic section for service WiFiTransport. Adding anyway.. See https://git.io/JtMGR for more info.
[31/10/2021, 14:48:20] [ZigBee] Successfully interviewed device: IKEA of Sweden - TRADFRI Signal Repeater
[31/10/2021, 14:48:21] [Bedroom Speakers] Current volume: 28
[31/10/2021, 14:48:21] [Bedroom Speakers] Current state for Sonos: stopped
(node:723) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'configured' of undefined
    at IkeaSignalRepeater.set isConfigured [as isConfigured] (/usr/local/lib/node_modules/homebridge-zigbee-nt/src/accessories/zig-bee-accessory.ts:209:46)
    at IkeaSignalRepeater.<anonymous> (/usr/local/lib/node_modules/homebridge-zigbee-nt/src/accessories/zig-bee-accessory.ts:178:28)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/homebridge-zigbee-nt/dist/accessories/zig-bee-accessory.js:5:58)
(node:723) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 101)
(node:723) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'configured' of undefined
    at IkeaSignalRepeater.set isConfigured [as isConfigured] (/usr/local/lib/node_modules/homebridge-zigbee-nt/src/accessories/zig-bee-accessory.ts:209:46)
    at IkeaSignalRepeater.<anonymous> (/usr/local/lib/node_modules/homebridge-zigbee-nt/src/accessories/zig-bee-accessory.ts:178:28)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/homebridge-zigbee-nt/dist/accessories/zig-bee-accessory.js:5:58)
(node:723) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 102)
(node:723) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'configured' of undefined
    at IkeaSignalRepeater.set isConfigured [as isConfigured] (/usr/local/lib/node_modules/homebridge-zigbee-nt/src/accessories/zig-bee-accessory.ts:209:46)
    at IkeaSignalRepeater.<anonymous> (/usr/local/lib/node_modules/homebridge-zigbee-nt/src/accessories/zig-bee-accessory.ts:178:28)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/homebridge-zigbee-nt/dist/accessories/zig-bee-accessory.js:5:58)
(node:723) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 103)
[31/10/2021, 14:48:53] [ZigBee] Zigbee: disabling joining new devices.
(node:723) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'configured' of undefined
    at IkeaSignalRepeater.set isConfigured [as isConfigured] (/usr/local/lib/node_modules/homebridge-zigbee-nt/src/accessories/zig-bee-accessory.ts:209:46)
    at IkeaSignalRepeater.<anonymous> (/usr/local/lib/node_modules/homebridge-zigbee-nt/src/accessories/zig-bee-accessory.ts:178:28)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/homebridge-zigbee-nt/dist/accessories/zig-bee-accessory.js:5:58)
(node:723) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 104)

Just to let you know, I got the following message when it updated, although this didn't seem to impact it's operation:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'http2@3.3.7',
npm WARN EBADENGINE   required: { node: '>=0.12.0 <9.0.0' },
npm WARN EBADENGINE   current: { node: 'v14.17.1', npm: '7.17.0' }
npm WARN EBADENGINE }

I'd like to add some further details- Previously upon rebooting, the error would persist, whereas currently it seems to (presumably) succeed as I see this line and no errors specifically like the above:

[31/10/2021, 15:03:23] [ZigBee] Device 0x680ae2fffed1f4d7 successfully configured on attempt 1!

Another update: I also used to see this error when adding bulbs to the system, however now this does not appear and they seem to instead work just fine, which is fantastic! 🎉

I can definitely tell that the previous error was originated by the previous version (2.5.4). Glad to hear that it is working

I can definitely tell that the previous error was originated by the previous version (2.5.4). Glad to hear that it is working

So maybe the new version didn't fully take effect until I rebooted the Pi? Huh!