ilcato / homebridge-fibaro-home-center

Homebridge plugin for Fibaro Home Center
Apache License 2.0
28 stars 23 forks source link

[Fibaro HC3] Error getting data from Home Center: Error: Not Implemented #27

Closed uteitler closed 3 years ago

uteitler commented 3 years ago

Using Docker on a QNAP with the following json config, and get the error as per bottom of log

{ "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "031-45-154" }, "accessories": [], "platforms": [ { "name": "Config", "port": 8581, "platform": "config" }, { "platform": "FibaroHC3", "name": "FibaroHC3", "host": "192.168.1.187", "url": "http://192.168.1.187/", "username": "admin", "password": "XXXXXX", "pollerperiod": "2", "securitysystem": "disabled", "addRoomNameToDeviceName": "enabled", "_bridge": { "username": "0E:24:10:A8:16:2A", "port": 32694 } } ] }

[2/27/2021, 5:32:26 PM] [HB Supervisor] OS: Linux 4.14.24-qnap x64 [2/27/2021, 5:32:26 PM] [HB Supervisor] Node.js v14.15.5 /usr/local/bin/node [2/27/2021, 5:32:26 PM] [HB Supervisor] Homebridge Path: /usr/local/lib/node_modules/homebridge/bin/homebridge [2/27/2021, 5:32:26 PM] [HB Supervisor] UI Path: /usr/local/lib/node_modules/homebridge-config-ui-x/dist/bin/standalone.js [2/27/2021, 5:32:34 PM] [Homebridge UI] Homebridge Config UI X v4.39.1 is listening on 0.0.0.0 port 8581 [2/27/2021, 5:32:35 PM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /homebridge/node_modules [2/27/2021, 5:32:35 PM] [HB Supervisor] Started Homebridge v1.3.1 with PID: 27669 Initializing HAP-NodeJS v0.9.2... [2/27/2021, 5:32:36 PM] Loaded config.json with 0 accessories and 2 platforms. [2/27/2021, 5:32:36 PM] Loaded 0 cached accessories from cachedAccessories. [2/27/2021, 5:32:36 PM] --- [2/27/2021, 5:32:37 PM] Loaded plugin: homebridge-dummy@0.5.0 [2/27/2021, 5:32:37 PM] Registering accessory 'homebridge-dummy.DummySwitch' [2/27/2021, 5:32:37 PM] --- [2/27/2021, 5:32:37 PM] Loaded plugin: homebridge-config-ui-x@4.39.1 [2/27/2021, 5:32:37 PM] Registering platform 'homebridge-config-ui-x.config' [2/27/2021, 5:32:37 PM] --- [2/27/2021, 5:32:37 PM] Loaded plugin: homebridge-fibaro-hc3@1.1.2 [2/27/2021, 5:32:37 PM] Registering platform 'homebridge-fibaro-hc3.FibaroHC3' [2/27/2021, 5:32:37 PM] --- [2/27/2021, 5:32:37 PM] Loading 2 platforms... [2/27/2021, 5:32:37 PM] [Config] Initializing config platform... [2/27/2021, 5:32:37 PM] [Config] Running in Service Mode [2/27/2021, 5:32:37 PM] [FibaroHC3] Initializing FibaroHC3 platform... Preparing Advertiser for 'Homebridge CAD8' using bonjour-hap backend! Setup Payload: X-HM://0023ISYWYMMBU Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 031-45-154 │     
└────────────┘     

Starting to advertise 'Homebridge CAD8' using bonjour-hap backend! [2/27/2021, 5:32:37 PM] Homebridge v1.3.1 (Homebridge) is running on port 51826. Initializing HAP-NodeJS v0.9.2... [2/27/2021, 5:32:38 PM] [FibaroHC3] Launched external bridge with PID 27692 [2/27/2021, 5:32:38 PM] Registering platform 'homebridge-fibaro-hc3.FibaroHC3' [2/27/2021, 5:32:38 PM] [FibaroHC3] Loaded homebridge-fibaro-hc3 v1.1.2 successfully [2/27/2021, 5:32:38 PM] Loaded 0 cached accessories from cachedAccessories.0E2410A8162A. Preparing Advertiser for 'FibaroHC3 A01D' using bonjour-hap backend! [2/27/2021, 5:32:38 PM] [FibaroHC3] didFinishLaunching. Starting to advertise 'FibaroHC3 A01D' using bonjour-hap backend! [2/27/2021, 5:32:38 PM] Homebridge v1.3.1 (FibaroHC3) is running on port 32694. [2/27/2021, 5:32:38 PM] [FibaroHC3] Error getting data from Home Center: Error: Not Implemented at Request.callback (/usr/local/lib/node_modules/homebridge-fibaro-hc3/node_modules/superagent/src/node/index.js:879:15) at IncomingMessage. (/usr/local/lib/node_modules/homebridge-fibaro-hc3/node_modules/superagent/src/node/index.js:1130:18) at IncomingMessage.emit (events.js:327:22) at endReadableNT (internal/streams/readable.js:1327:12) at processTicksAndRejections (internal/process/task_queues.js:80:21) { status: 501, response: <ref *1> Response { _events: [Object: null prototype] {}, _eventsCount: 0, _maxListeners: undefined, res: IncomingMessage { _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 4, _maxListeners: undefined, socket: [Socket], httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, headers: [Object], rawHeaders: [Array], trailers: {}, rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 501, statusMessage: 'Not Implemented', client: [Socket], _consuming: false, _dumped: false, req: [ClientRequest], text: '',

  [Symbol(RequestTimeout)]: undefined
},
request: Request {
  _events: [Object: null prototype],
  _eventsCount: 1,
  _maxListeners: undefined,
  _enableHttp2: false,
  _agent: false,
  _formData: null,
  method: 'GET',
  url: 'http://192.168.1.187//api/scenes',
  _header: [Object],
  header: [Object],
  writable: true,
  _redirects: 0,
  _maxRedirects: 5,
  cookies: '',
  qs: {},
  _query: [],
  qsRaw: [],
  _redirectList: [],
  _streamRequest: false,
  _ca: <Buffer 2d 2d 2d 2d 2d 42 45 47 49 4e 20 43 45 52 54 49 46 49 43 41 54 45 2d 2d 2d 2d 2d 0a 4d 49 49 47 7a 44 43 43 42 4c 53 67 41 77 49 42 41 67 49 42 41 54 ... 2369 more bytes>,
  req: [ClientRequest],
  protocol: 'http:',
  host: '192.168.1.187',
  _endCalled: true,
  _callback: [Function (anonymous)],
  _fullfilledPromise: [Promise],
  res: [IncomingMessage],
  _resBuffered: true,
  response: [Circular *1],
  called: true,
  [Symbol(kCapture)]: false
},
req: ClientRequest {
  _events: [Object: null prototype],
  _eventsCount: 3,
  _maxListeners: undefined,
  outputData: [],
  outputSize: 0,
  writable: true,
  destroyed: false,
  _last: true,
  chunkedEncoding: false,
  shouldKeepAlive: false,
  _defaultKeepAlive: true,
  useChunkedEncodingByDefault: false,
  sendDate: false,
  _removedConnection: false,
  _removedContLen: false,
  _removedTE: false,
  _contentLength: 0,
  _hasBody: true,
  _trailer: '',
  finished: true,
  _headerSent: true,
  socket: [Socket],
  _header: 'GET //api/scenes HTTP/1.1\r\n' +
    'Host: 192.168.1.187\r\n' +
    'Accept-Encoding: gzip, deflate\r\n' +
    'Authorization: Basic YWRtaW46NjguU3ByaW5nZGFsZQ==\r\n' +
    'accept: json\r\n' +
    'Connection: close\r\n' +
    '\r\n',
  _keepAliveTimeout: 0,
  _onPendingData: [Function: noopPendingOutput],
  agent: [Agent],
  socketPath: undefined,
  method: 'GET',
  maxHeaderSize: undefined,
  insecureHTTPParser: undefined,
  path: '//api/scenes',
  _ended: true,
  res: [IncomingMessage],
  aborted: false,
  timeoutCb: null,
  upgradeOrConnect: false,
  parser: null,
  maxHeadersCount: null,
  reusedSocket: false,
  host: '192.168.1.187',
  protocol: 'http:',
  [Symbol(kCapture)]: false,
  [Symbol(kNeedDrain)]: false,
  [Symbol(corked)]: 0,
  [Symbol(kOutHeaders)]: [Object: null prototype]
},
text: '',
body: {},
files: undefined,
buffered: true,
headers: {
  server: 'nginx',
  date: 'Sat, 27 Feb 2021 06:32:42 GMT',
  'transfer-encoding': 'chunked',
  connection: 'close'
},
header: {
  server: 'nginx',
  date: 'Sat, 27 Feb 2021 06:32:42 GMT',
  'transfer-encoding': 'chunked',
  connection: 'close'
},
statusCode: 501,
status: 501,
statusType: 5,
info: false,
ok: false,
redirect: false,
clientError: false,
serverError: true,
error: Error: cannot GET //api/scenes (501)
    at Response.toError (/usr/local/lib/node_modules/homebridge-fibaro-hc3/node_modules/superagent/src/node/response.js:95:15)
    at Response._setStatusProperties (/usr/local/lib/node_modules/homebridge-fibaro-hc3/node_modules/superagent/src/response-base.js:126:48)
    at new Response (/usr/local/lib/node_modules/homebridge-fibaro-hc3/node_modules/superagent/src/node/response.js:41:8)
    at Request._emitResponse (/usr/local/lib/node_modules/homebridge-fibaro-hc3/node_modules/superagent/src/node/index.js:928:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-fibaro-hc3/node_modules/superagent/src/node/index.js:1130:38)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  status: 501,
  text: '',
  method: 'GET',
  path: '//api/scenes'
},
created: false,
accepted: false,
noContent: false,
badRequest: false,
unauthorized: false,
notAcceptable: false,
forbidden: false,
notFound: false,
unprocessableEntity: false,
type: '',
links: {},
setEncoding: [Function: bound ],
redirects: [],
pipe: [Function (anonymous)],
[Symbol(kCapture)]: false

} } (node:27692) UnhandledPromiseRejectionWarning: Error: Not Implemented at Request.callback (/usr/local/lib/node_modules/homebridge-fibaro-hc3/node_modules/superagent/src/node/index.js:879:15) at IncomingMessage. (/usr/local/lib/node_modules/homebridge-fibaro-hc3/node_modules/superagent/src/node/index.js:1130:18) at IncomingMessage.emit (events.js:327:22) at endReadableNT (internal/streams/readable.js:1327:12) at processTicksAndRejections (internal/process/task_queues.js:80:21) (Use node --trace-warnings ... to show where the warning was created) (node:27692) 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: 1) (node:27692) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

uteitler commented 3 years ago

Sorry .. ignore .. Rookie error .. had / on the end of the URL ..