Problem: Loxone Miniserver Gen. 2 does not connect to ioBroker
If you already had a working installation of Loxone and ioBroker and replaced your existing Miniserver Gen. 1 with a new Miniserver Gen. 2, you will unfortunately find that the communication of the Loxone adapter within ioBroker no longer works.
With the help of an Allroundbastler member and his colleague (many thanks again at this point), we were able to locate the cause quickly:
The websocket communication within the Loxone adapter runs via the project “node-lox-ws-api“, and there was a problem with a regular expression. Here is the exact cause: GitHub issue
So the problem has basically already been solved.
However, for the adapter to work properly again, the developer of the ioBroker Loxone adapter has to release an update. I tried to reach him via GitHub for several weeks – unfortunately without success.
However, we can now offer a small workaround
to get the installation running again straight away:
In ioBroker in the path: /node-lox-ws-api/lib/Auth/Token-Enc.js
Line 104:
key = key.replace(/(w)(-+END PUBLIC KEY-+)$/, ‘$1n$2’);
replace with:
key = key.replace(/(-+END PUBLIC KEY-+)/,’n$1′);
Update:
In the meantime the NPM repository has also been updated, so you can run the following command via the console:
sudo npm i node-lox-ws-api
… and then restart ioBroker once (iobroker restart).
Everything should be running again!