Open COMHOME opened 7 years ago
Hey, anything new about this problem?
No. I tried node-red with loxone and homekit - that still works fine. I talked to loxone and they said, they didn't make changes to the websocket or sth. else.
@COMHOME Hello this should be ok now after fix for #16 could you recheck?
Can you publish the version 1.0.3 npm?
First of all: Thank you for the great tool and your efforts
@Nexus2k Maybe it will work for you installing it directly from GitHub until it is available at npm
(1) Change into your directory where current npm install is
find it with
sudo find / -name homebridge-loxone-ws
for my setup i have to change to this directory:
cd /usr/local/lib/node_modules
(2) Install it directly from git:
sudo npm install git+https://git@github.com/Sroose/homebridge-loxone-ws.git
(3) Check if you have the 1.0.3 version
npm list -g --depth=1
It should look like this:
├─┬ homebridge-loxone-ws@1.0.3 (git+https://git@github.com/Sroose/homebridge-loxone-ws.git#5f7f737af50f4747cb4c4bc6587c822d0e19f1db)
│ ├── node-lox-ws-api@0.4.2
│ ├── request@2.83.0
│ └── ws@1.1.4
Confirmed working after installing 1.0.3 from github repo. Still doesn't detect my temperature sensors but that is a different issue.
Hi! First of all thanks for the great work!
I followed the instructions to update homebridge-loxone-ws.git directly from git, went well so far.
But after restarting the homebridge-service I get the following errors:
Oct 13 09:55:41 loxberry homebridge[18360]: [10/13/2017, 9:55:41 AM] Homebridge is running on port 51826.
Oct 13 09:55:41 loxberry homebridge[18360]: /usr/lib/node_modules/homebridge-loxone-ws/libs/WSListener.js:44
Oct 13 09:55:41 loxberry homebridge[18360]: throw new Error("LOXONE WS: connection error");
Oct 13 09:55:41 loxberry homebridge[18360]: ^
Oct 13 09:55:41 loxberry homebridge[18360]: Error: LOXONE WS: connection error
Oct 13 09:55:41 loxberry homebridge[18360]: at API.
@bastelbert
Have you checked your "node-lox-ws-api"-Version?
npm list -g --depth=1
What is your Version-Number?
seems to be correct:
├─┬ homebridge-loxone-ws@1.0.3 (git+https://git@github.com/Sroose/homebridge-loxone-ws.git#5f7f737af50f4747cb4c4bc6587c822d0e19f1db) │ ├── node-lox-ws-api@0.4.2 │ ├── request@2.83.0 │ └── ws@1.1.4
@bastelbert My homebrige-log file is fine. Did you check your homebridge config.json- File?
{ "bridge": {
"name": "xxxx",
"username": "yyyy",
"port": 51826,
"pin": "yyyy" },
"description": "Apple HomeKit Steuerung mit Siri des Loxone Smarthome",
"platforms": [
{ "platform": "homebridge-loxoneWs.LoxoneWs",
"name": "Loxone",
"host": "zzzz",
"port": "80",
"username": "AppleHome",
"password": "xxxx" }
] }
Problem solved! Don't know why, but now Homekit works again! I stopped the homebridge several hours ago, but I forgot to deactivate the automatic restart via crontab every 30 minutes. So the service started at some point correctly and since then it was restarted several times without any problems. Thanks again for the great work!
Homekit is dead again :( The homebridge service is now in a constant loop: It restarts automatically every 10 seconds, finds all accessories, shows the iOS pairing code and then there's this "LOXONE WS: connection error" again.
config.json- file seems to be ok. After downgrading to homebridge-loxone-ws 1.0.2 the service runs stable (but I can't control any accessories). Upgrade to 1.0.3 leads again to the same error during startup...
EDIT: After 5 minutes of continuous restarts the homebridge service could connect to Loxone and runs now stable again.
EDIT2: After a restart of my miniserver, the homebridge service is now again in the constant restart loop as described above. Approximately 100 restarts in the last 30 minutes, every time the same "LOXONE WS: connection error". Fun fact: homebridge already recognizes the new accessory I created in Loxone...
@bastelbert
I have no further idea, there are a lot o modules used as you can see in homebridge-loxone-ws
--> node_modules
directory . Seems you have to wait for the npm update to latest version.
The latest version in now on npm as v1.0.4
Thanks a lot! Installation went fine, but I've still got the same problem: Homebridge starts, connects to the Miniserver, finds all in Loxone defined accessories but instantly disconnets from the Miniserver with the error message stated above :( After some time (up to 90 minutes) of continuous automatic restarts the connection works stable and everything is fine.
Same Issue.
Nov 20 21:12:23 raspberrypi homebridge[3562]: at Connection.emit (events.js:159:13) Nov 20 21:12:23 raspberrypi homebridge[3562]: at WebSocketConnection.<anonymous> (/usr/lib/node_modules/homebridge-loxone-ws/n Nov 20 21:12:23 raspberrypi homebridge[3562]: at WebSocketConnection.emit (events.js:159:13) Nov 20 21:12:23 raspberrypi homebridge[3562]: at WebSocketConnection.handleSocketError (/usr/lib/node_modules/homebridge-loxon Nov 20 21:12:23 raspberrypi homebridge[3562]: at Socket.emit (events.js:159:13) Nov 20 21:12:23 raspberrypi homebridge[3562]: at Socket.writeAfterFIN [as write] (net.js:358:8)
I am also having the same issue here. Happy to provide some data if needed.
I'm not sure if it's related but commenting out the line the exception is thrown helps - https://github.com/Sroose/homebridge-loxone-ws/blob/5f7f737af50f4747cb4c4bc6587c822d0e19f1db/libs/WSListener.js#L44
It looks like it might be something to do with a timeout somewhere.
Just figured out that you can solve the problem (at least temporary) if you reboot your loxone miniserver! Afterwards a ONE-TIME start of homebridge will work. As soon as your raspberry will reboot or restart homebridge the same error will occur. I try to live with this bug... let's see when I'll have to reboot my miniserver again :)
Hello,
Same here...
Great software! After a bit of configuration I have it doing most of what I want.
I am using the latest npm version of homebridge and home-bridge-loxone-ws. My miniserver is updated to the latest version, 9.1.x.
My main problem is that if I restart homebridge, it fails to connect to the mini server. I cannot connect until I reboot the miniserver, then everything works correctly.
I've tried applying the patches listed in pull request #28, but that hasn't fixed it.
Thanks in advance!
Jan 30 12:22:41 raspy3 systemd[1]: Starting Node.js HomeKit Server... Jan 30 12:22:41 raspy3 systemd[1]: Started Node.js HomeKit Server.
... avahi messages ...
Jan 30 12:22:44 raspy3 homebridge[22730]: [2018-1-30 12:22:44] Loaded plugin: homebridge-loxone-ws Jan 30 12:22:44 raspy3 homebridge[22730]: homebridge API version: 2.2 Jan 30 12:22:44 raspy3 homebridge[22730]: [2018-1-30 12:22:44] Registering platform 'homebridge-loxoneWs.LoxoneWs' Jan 30 12:22:44 raspy3 homebridge[22730]: [2018-1-30 12:22:44] --- Jan 30 12:22:44 raspy3 homebridge[22730]: [2018-1-30 12:22:44] Loaded config.json with 0 accessories and 1 platforms. Jan 30 12:22:44 raspy3 homebridge[22730]: [2018-1-30 12:22:44] --- Jan 30 12:22:44 raspy3 homebridge[22730]: [2018-1-30 12:22:44] Loading 1 platforms... Jan 30 12:22:44 raspy3 homebridge[22730]: [2018-1-30 12:22:44] [Loxone] Initializing LoxoneWs platform... Jan 30 12:22:44 raspy3 homebridge[22730]: [2018-1-30 12:22:44] [Loxone] LoxPlatform Init Jan 30 12:22:44 raspy3 homebridge[22730]: SETTING UP WS LISTENER Jan 30 12:22:44 raspy3 homebridge[22730]: New WS: 192.168.0.11:80 Jan 30 12:22:44 raspy3 homebridge[22730]: [2018-1-30 12:22:44] [Loxone] Getting Loxone configuration. Jan 30 12:22:44 raspy3 homebridge[22730]: [2018-1-30 12:22:44] [Loxone] Platform - Connecting to http://user:pass@192.168.0.11:80/data/LoxApp3.json Jan 30 12:22:44 raspy3 homebridge[22730]: [2018-1-30 12:22:44] [Loxone] LOXONE WS: connect
... lots of found accessories ...
Jan 30 12:22:45 raspy3 homebridge[22730]: Setup Payload:
Jan 30 12:22:45 raspy3 homebridge[22730]: X-HM://xxxxxxxxxxxx
Jan 30 12:22:45 raspy3 homebridge[22730]: Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
Jan 30 12:22:45 raspy3 homebridge[22730]: Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:
Jan 30 12:22:45 raspy3 homebridge[22730]: ┌────────────┐
Jan 30 12:22:45 raspy3 homebridge[22730]: │ xxx-xx-xxx │
Jan 30 12:22:45 raspy3 homebridge[22730]: └────────────┘
Jan 30 12:22:45 raspy3 homebridge[22730]: [2018-1-30 12:22:45] Homebridge is running on port 51826.
Jan 30 12:22:45 raspy3 homebridge[22730]: /usr/lib/node_modules/homebridge-loxone-ws/libs/WSListener.js:44
Jan 30 12:22:45 raspy3 homebridge[22730]: throw new Error("LOXONE WS: connection error");
Jan 30 12:22:45 raspy3 homebridge[22730]: ^
Jan 30 12:22:45 raspy3 homebridge[22730]: Error: LOXONE WS: connection error
Jan 30 12:22:45 raspy3 homebridge[22730]: at API.
Please try release 1.0.5 and see if this is still an issue? Working for me now on Loxone 9.3
I had already upgraded Loxone to 9.3 and just upgraded homebridge-loxone-ws to 1.0.5. I can now restart homebridge without restarting the miniserver. Thanks very much!
Loxone just published its own node.js module that handles authentication, encryption and tokens in an easy way.
Its version 0.9 but it will work, I am using it in one of my own projects for a while now. (Yes, I am an Loxone employee...)
You may wanna check it out: LxCommunicator
I'm unsure, what leads to the problem, but in fact you wanna try, it's public: Loxone Public Beta I asked Loxone about changes done to websocket or sth. else via the Beta-Feedback. If I get any news on that, i'll let you know...