broadlink-mqtt-bridge icon indicating copy to clipboard operation
broadlink-mqtt-bridge copied to clipboard

unable to access GUI after update

Open gargamelonly opened this issue 3 years ago • 11 comments

I have updated to latest version, reinstalled over existing installation. Running openHAB. The port 3000 is occupied by Grafana. Kept the same local.json config as before with port 3030 assigned to GUI. I am able to see the logs in port 3001, identifying the device and existing commands. Commands are sent and run ok. Still the GUI on port 3030 is not accessible. It worked ok before the update.

gargamelonly avatar Dec 24 '20 21:12 gargamelonly

It looks like the webserver does not even start. Please help resolve this issue.

gargamelonly avatar Dec 24 '20 22:12 gargamelonly

[10:45:18] openhabian@openHABianPi:~/broadlink-mqtt-bridge$ node index.js
/home/openhabian/broadlink-mqtt-bridge/index.js:1
import { exec } from 'child_process';
       ^

SyntaxError: Unexpected token {
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

gargamelonly avatar Dec 25 '20 08:12 gargamelonly

Also does not work on a clean install.

gargamelonly avatar Dec 25 '20 09:12 gargamelonly

Same here. In a brand new install on Rasp4

miguelbueno avatar Dec 29 '20 17:12 miguelbueno

Same thing here on Rasp3

melkati avatar Jan 06 '21 08:01 melkati

Might be because the 'new' autoinstaller doesn't install in the old path. You would need to goto the folder cd /srv/openhab2-conf/ before running the auto installer.

https://github.com/fbacker/broadlink-mqtt-bridge/wiki/Installation

I've no real release cycles of good way of making 'major' releases :( hopefully this will solve the issue. I'm planning of making better docker releases and then removing this auto installer in the future.

fbacker avatar Jan 06 '21 19:01 fbacker

I had the same problem... GUI not responding on port 3000. I noticed in the log that the GUI is

Listen on ip 127.0.0.1

So, I modified the src/web.js changing

class WebserverClass {
  constructor() {
    this.host = isDocker() ? '0.0.0.0' : '127.0.0.1';
    logger.info(`Listen on ip ${this.host}`);

to

class WebserverClass {
  constructor() {
    this.host = '0.0.0.0';
    logger.info(`Listen on ip ${this.host}`);

mtzro2003 avatar Jan 10 '21 18:01 mtzro2003

I had the same problem... GUI not responding on port 3000. I noticed in the log that the GUI is

Listen on ip 127.0.0.1

So, I modified the src/web.js changing

class WebserverClass {
  constructor() {
    this.host = isDocker() ? '0.0.0.0' : '127.0.0.1';
    logger.info(`Listen on ip ${this.host}`);

to

class WebserverClass {
  constructor() {
    this.host = '0.0.0.0';
    logger.info(`Listen on ip ${this.host}`);

Does not resolve the issue for me.

gargamelonly avatar Jan 10 '21 20:01 gargamelonly

The problem is localised in commit cabd581072247b03dee2fee9ebda53aba4d5ebc4

And the solution is to revert the line 302 of file src/web.js to its previous state :

this.server.listen(config.settings.gui.port, this.host, () => {

replace by : this.server.listen(config.settings.gui.port, () => {

Regard

Astral0 avatar Jan 20 '21 22:01 Astral0

The problem is localised in commit cabd581

And the solution is to revert the line 302 of file src/web.js to its previous state :

this.server.listen(config.settings.gui.port, this.host, () => {

replace by : this.server.listen(config.settings.gui.port, () => {

Regard

That is correct. I modified the file and now it works.

gargamelonly avatar Jan 22 '21 20:01 gargamelonly

Please help... Upgraded to an RPI4 and did a new auto install. Now nothing is working again. Throwing different errors in index.js, service crash, does not start. Latest Bullseye OS installed. NPM version 7.5.2 Node version v12.22.5

gargamelonly avatar May 20 '22 20:05 gargamelonly