tommasomarchionni / homebridge-openHAB

Homebridge plugin for openHAB
Apache License 2.0
49 stars 18 forks source link

OpenHAB with username/password #39

Open dkrizic opened 7 years ago

dkrizic commented 7 years ago

My OpenHAB is secured with a Username/Password, because I access it remotely via the Internet. Homebridge is unable to access my OpenHAB and I can't see a location where I can enter username/password.

Can this be added?

gijoecool commented 7 years ago

Can you add to the URL in the homebridge config? Example http[s]://[username]:[password]@[ip-address]:[port]/

dkrizic commented 7 years ago

That solves it, thank you!

dkrizic commented 7 years ago

After starting homebridge, I loads all my devices, but then I see this

`[10/16/2016, 4:09:17 PM] Homebridge is running on port 51826. events.js:141 throw er; // Unhandled 'error' event ^

Error: unexpected server response (401) at ClientRequest.response (/usr/lib/node_modules/homebridge-openhab/node_modules/ws/lib/WebSocket.js:694:15) at ClientRequest.g (events.js:260:16) at emitOne (events.js:77:13) at ClientRequest.emit (events.js:169:7) at HTTPParser.parserOnIncomingClient as onIncoming at HTTPParser.parserOnHeadersComplete (_http_common.js:103:23) at Socket.socketOnData (_http_client.js:322:20) at emitOne (events.js:77:13) at Socket.emit (events.js:169:7) at readableAddChunk (_stream_readable.js:153:18) `

matz666 commented 7 years ago

You must add a line with "user": And a line with "password": In you config.json

RafalLukawiecki commented 7 years ago

Is it possible to configure the connection so it uses https rather than http, and so to port 8443? Just changing the port did not work. Many thanks for this very useful plug-in!