Autor Thema: Not getting a "gassistantFHEM.loginURL"  (Gelesen 973 mal)

Offline dominik

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1284
Antw:Not getting a "gassistantFHEM.loginURL"
« Antwort #15 am: 21 Juli 2019, 23:17:49 »
Ok, then try to uninstall grpc and install it with
npm install grpc --unsafe-perm
again.

If it works, it should download the grpc binary during the install process.
Module: 10_EQ3BT (EQ-3 Bluetooth Thermostat), 98_BOSEST (BOSE SoundTouch), 98_DLNARenderer (DLNA Renderer), 98_GOOGLECAST (Google Cast), 39_gassistant (Google Assistant)
Kaffeespende: https://paypal.me/todominik

Offline Zaleo

  • New Member
  • *
  • Beiträge: 19
Antw:Not getting a "gassistantFHEM.loginURL"
« Antwort #16 am: 22 Juli 2019, 00:01:35 »
Zitat von: console
# npm uninstall grpc
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN gassistant-fhem@2.0.0 No repository field.

audited 349 packages in 52.8s
found 0 vulnerabilities

Zitat von: console
# npm install grpc --unsafe-perm

> grpc@1.20.0 install /usr/local/lib/node_modules/gassistant-fhem/node_modules/@firebase/firestore/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using request for node-pre-gyp https download
[grpc] Success: "/usr/local/lib/node_modules/gassistant-fhem/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc/grpc_node.node" is installed via remote

> grpc@1.22.2 install /usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using request for node-pre-gyp https download
[grpc] Success: "/usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc/grpc_node.node" is installed via remote
npm WARN gassistant-fhem@2.0.0 No repository field.

+ grpc@1.22.2
added 70 packages from 27 contributors, removed 3 packages, updated 12 packages and audited 500 packages in 313.934s
found 0 vulnerabilities

I assume there is no need to rebuild the full package again, as there are new binaries?


Seems to be the same error(s):

Zitat von: console
# sudo /usr/local/bin/gassistant-fhem -c ./gassistant-fhem.cfg
sudo: unable to resolve host Domotica: Name or service not known
Loading cli.js...
Loading version.js...
Loading server.js...
Loading user.js...
Loading logger.js...
Loading fhem.js...
Loading database.js...
Illegal instruction

Zitat von: gassistant log
/usr/local/lib/node_modules/gassistant-fhem/node_modules/sync-rpc/lib/index.js:80
    throw new Error(
    ^

Error: Timed out waiting for sync-rpc server to start (it should respond with "pong" when sent "ping"):

events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED 127.0.0.1:37351
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Emitted 'error' event at:
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)


    at waitForAlive (/usr/local/lib/node_modules/gassistant-fhem/node_modules/sync-rpc/lib/index.js:80:11)
    at start (/usr/local/lib/node_modules/gassistant-fhem/node_modules/sync-rpc/lib/index.js:40:3)
    at sendMessage (/usr/local/lib/node_modules/gassistant-fhem/node_modules/sync-rpc/lib/index.js:117:17)
    at createClient (/usr/local/lib/node_modules/gassistant-fhem/node_modules/sync-rpc/lib/index.js:157:27)
    at Object.<anonymous> (/usr/local/lib/node_modules/gassistant-fhem/node_modules/sync-request/lib/index.js:16:14)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787: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)
Loading cli.js...
Loading version.js...
Loading server.js...
Loading user.js...
Loading logger.js...
Loading fhem.js...
Loading database.js...

Zitat von: FHEM log
2019.07.21 23:58:12 1: Including fhem.cfg
2019.07.21 23:58:15 3: WEB: port 8083 opened
2019.07.21 23:58:16 3: telnetPort: port 7072 opened
2019.07.21 23:58:16 3: Opening CCD device /dev/ttyAMA0
2019.07.21 23:58:17 3: Setting CCD serial parameters to 38400,8,N,1
2019.07.21 23:58:17 3: CCD: Possible commands: mbCFiAZGMRTVWXefltux
2019.07.21 23:58:17 3: CCD device opened
2019.07.21 23:58:18 2: eventTypes: loaded 32 events from ./log/eventTypes.txt
2019.07.21 23:58:18 1: Including ./log/fhem.save
2019.07.21 23:58:19 2: gassistant: starting gassistant-fhem: /usr/local/bin/gassistant-fhem -c ./gassistant-fhem.cfg
2019.07.21 23:58:19 3: gassistant: starting
2019.07.21 23:58:19 3: gassistant: using logfile: ./log/gassistant-2019-07-21.log
2019.07.21 23:58:19 0: Featurelevel: 5.9
2019.07.21 23:58:19 0: Server started with 27 defined entities (fhem.pl:19805/2019-07-09 perl:5.028001 os:linux user:fhem pid:381)
« Letzte Änderung: 22 Juli 2019, 12:03:56 von Zaleo »

Offline dominik

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1284
Antw:Not getting a "gassistantFHEM.loginURL"
« Antwort #17 am: 22 Juli 2019, 00:06:07 »
No, no need to rebuild.

This one sounds strange
sudo: unable to resolve host Domotica: Name or service not known

I think you have some issues with your network parts of your installation. Have you set the hostname properly?
Module: 10_EQ3BT (EQ-3 Bluetooth Thermostat), 98_BOSEST (BOSE SoundTouch), 98_DLNARenderer (DLNA Renderer), 98_GOOGLECAST (Google Cast), 39_gassistant (Google Assistant)
Kaffeespende: https://paypal.me/todominik

Offline Zaleo

  • New Member
  • *
  • Beiträge: 19
Antw:Not getting a "gassistantFHEM.loginURL"
« Antwort #18 am: 22 Juli 2019, 00:19:46 »
Zitat
Have you set the hostname properly?

Code: (console) [Auswählen]
# hostname
Domotica

Yhea I have to change my DHCP server to set 192.168.1.1 as primary DNS server.
It is now using 1.1.1.1 as primary, and cloudfare does not know my local device names  ::)

Manually change the sequense in /etc/resolv.conf untill just now, but did forget it after the last boot.
Fixed it presently by adding my hostename in the /etc/hosts file.

The problem with starting and getting a loginURL by gassistantFHEM remains the same. Don't think this is related, but prove me wrong.
Would really love to control FS20 devices with my Google home.
« Letzte Änderung: 22 Juli 2019, 12:04:50 von Zaleo »

Offline dominik

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1284
Antw:Not getting a "gassistantFHEM.loginURL"
« Antwort #19 am: 22 Juli 2019, 21:51:09 »
I'm really running out of ideas. Can you please verify if the error in the gassistant-fhem log really appears before Loading cli.js? That would mean that the loading mechanism of the libraries is not working.
Module: 10_EQ3BT (EQ-3 Bluetooth Thermostat), 98_BOSEST (BOSE SoundTouch), 98_DLNARenderer (DLNA Renderer), 98_GOOGLECAST (Google Cast), 39_gassistant (Google Assistant)
Kaffeespende: https://paypal.me/todominik

Offline dominik

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1284
Antw:Not getting a "gassistantFHEM.loginURL"
« Antwort #20 am: 22 Juli 2019, 21:58:24 »
Please also try to run following code in a node console:
const path = require('path');
var request = require('sync-request');
var {NodeVM} = require('vm2');
Module: 10_EQ3BT (EQ-3 Bluetooth Thermostat), 98_BOSEST (BOSE SoundTouch), 98_DLNARenderer (DLNA Renderer), 98_GOOGLECAST (Google Cast), 39_gassistant (Google Assistant)
Kaffeespende: https://paypal.me/todominik

Offline Zaleo

  • New Member
  • *
  • Beiträge: 19
Antw:Not getting a "gassistantFHEM.loginURL"
« Antwort #21 am: 22 Juli 2019, 22:09:59 »
Can you please verify if the error in the gassistant-fhem log really appears before Loading cli.js?

Please have a look at the following..

root@Domotica:/home/pi# echo > /opt/fhem/log/gassistant-2019-07-22.log
root@Domotica:/home/pi# reboot

Waited, logged in again and this.....

root@Domotica:/home/pi# cat /opt/fhem/log/gassistant-2019-07-22.log

/usr/local/lib/node_modules/gassistant-fhem/node_modules/sync-rpc/lib/index.js:80
    throw new Error(
    ^

Error: Timed out waiting for sync-rpc server to start (it should respond with "pong" when sent "ping"):

events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED 127.0.0.1:44257
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Emitted 'error' event at:
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)


    at waitForAlive (/usr/local/lib/node_modules/gassistant-fhem/node_modules/sync-rpc/lib/index.js:80:11)
    at start (/usr/local/lib/node_modules/gassistant-fhem/node_modules/sync-rpc/lib/index.js:40:3)
    at sendMessage (/usr/local/lib/node_modules/gassistant-fhem/node_modules/sync-rpc/lib/index.js:117:17)
    at createClient (/usr/local/lib/node_modules/gassistant-fhem/node_modules/sync-rpc/lib/index.js:157:27)
    at Object.<anonymous> (/usr/local/lib/node_modules/gassistant-fhem/node_modules/sync-request/lib/index.js:16:14)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787: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)
Loading cli.js...
Loading version.js...
Loading server.js...
Loading user.js...
Loading logger.js...
Loading fhem.js...
Loading database.js...

Is that verified enough?

Offline Zaleo

  • New Member
  • *
  • Beiträge: 19
Antw:Not getting a "gassistantFHEM.loginURL"
« Antwort #22 am: 22 Juli 2019, 22:13:42 »
Please also try to run following code in a node console:
const path = require('path');
var request = require('sync-request');
var {NodeVM} = require('vm2');

root@Domotica:/usr/local/lib/node_modules/gassistant-fhem# node
> const path = require('path');
undefined
> var request = require('sync-request');
undefined
> var {NodeVM} = require('vm2');
undefined

But this only works if I am in the /usr/local/lib/node_modules/gassistant-fhem/ folder, not anywhere else.

root@Domotica:/home/pi# node
> const path = require('path');
undefined
> var request = require('sync-request');
Thrown:
{ Error: Cannot find module 'sync-request'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18) code: 'MODULE_NOT_FOUND' }
> var {NodeVM} = require('vm2');
Thrown:
{ Error: Cannot find module 'vm2'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18) code: 'MODULE_NOT_FOUND' }
>

So I tried something really different, just to see if nodeJs is working.
root@Domotica:/usr/local/lib/node_modules/gassistant-fhem# node
> 10+10
20

I find it really strange we only get the error once after a reboot, not when restarting gassistant/fhem-connection and not in the shell etc.
But that might just be me.
« Letzte Änderung: 22 Juli 2019, 23:58:14 von Zaleo »

Offline dominik

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1284
Antw:Not getting a "gassistantFHEM.loginURL"
« Antwort #23 am: 23 Juli 2019, 18:05:31 »
Can you do a require('cli') in node console within the gassistant-fhem/lib folder?
Module: 10_EQ3BT (EQ-3 Bluetooth Thermostat), 98_BOSEST (BOSE SoundTouch), 98_DLNARenderer (DLNA Renderer), 98_GOOGLECAST (Google Cast), 39_gassistant (Google Assistant)
Kaffeespende: https://paypal.me/todominik

Offline Zaleo

  • New Member
  • *
  • Beiträge: 19
Antw:Not getting a "gassistantFHEM.loginURL"
« Antwort #24 am: 23 Juli 2019, 18:41:02 »
Think we are now narrowing it down:

Code: (shell) [Auswählen]
root@Domotica:/usr/local/lib/node_modules/gassistant-fhem# node
> require('cli');
Thrown:
{ Error: Cannot find module 'cli'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18) code: 'MODULE_NOT_FOUND' }
>_
« Letzte Änderung: 23 Juli 2019, 18:59:39 von Zaleo »

Offline dominik

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1284
Antw:Not getting a "gassistantFHEM.loginURL"
« Antwort #25 am: 23 Juli 2019, 18:59:01 »
Please do it in the lib folder, not gassistant-fhem folder.
Module: 10_EQ3BT (EQ-3 Bluetooth Thermostat), 98_BOSEST (BOSE SoundTouch), 98_DLNARenderer (DLNA Renderer), 98_GOOGLECAST (Google Cast), 39_gassistant (Google Assistant)
Kaffeespende: https://paypal.me/todominik

Offline Zaleo

  • New Member
  • *
  • Beiträge: 19
Antw:Not getting a "gassistantFHEM.loginURL"
« Antwort #26 am: 23 Juli 2019, 19:04:49 »
Oeps, hope I did not mess anything up now, tried to install the cli module.

# npm install cli --unsafe-perm
But no luck, or should it be installed globally?

Anyway, now I get this:

root@Domotica:/usr/local/lib/node_modules/gassistant-fhem/lib# node
> require('cli');
Thrown:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:125:11)
    at Object.basename (path.js:1289:5)
    at Object.cli.setArgv (/usr/local/lib/node_modules/gassistant-fhem/node_modules/cli/cli.js:148:31)
>_
« Letzte Änderung: 23 Juli 2019, 19:35:52 von Zaleo »

Offline dominik

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1284
Antw:Not getting a "gassistantFHEM.loginURL"
« Antwort #27 am: 23 Juli 2019, 19:55:11 »
cli is a local js file, it's not a library which can be installed.

Can you please type within the gassistant-fhem directory just bin\gassistant-fhem and see the console output.
Module: 10_EQ3BT (EQ-3 Bluetooth Thermostat), 98_BOSEST (BOSE SoundTouch), 98_DLNARenderer (DLNA Renderer), 98_GOOGLECAST (Google Cast), 39_gassistant (Google Assistant)
Kaffeespende: https://paypal.me/todominik

Offline Zaleo

  • New Member
  • *
  • Beiträge: 19
Antw:Not getting a "gassistantFHEM.loginURL"
« Antwort #28 am: 23 Juli 2019, 20:03:34 »
Zitat
root@Domotica:/usr/local/lib/node_modules/gassistant-fhem# bin\gassistant-fhem
bash: bingassistant-fhem: command not found
root@Domotica:/usr/local/lib/node_modules/gassistant-fhem# bin/gassistant-fhem
Loading cli.js...
Loading version.js...
Loading server.js...
Loading user.js...
Loading logger.js...
Loading fhem.js...
Loading database.js...
Illegal instruction
root@Domotica:/usr/local/lib/node_modules/gassistant-fhem#

No error, but yhea.. Get it only the first time around..
« Letzte Änderung: 23 Juli 2019, 21:07:18 von Zaleo »

Offline Zaleo

  • New Member
  • *
  • Beiträge: 19
Antw:Not getting a "gassistantFHEM.loginURL"
« Antwort #29 am: 23 Juli 2019, 21:27:36 »
After a lot of support from dominik the issue did not seem to get resolved.  :-[

We narrowed it down to a corrupt installation of nodeJS.

Seems like I am using a RPi v2 with an armv6 processor and the nodeJS package that came with npm does not support this architechture.
When I put the same SDCard in a RPi v3 I had, gassistatn-FHEM suddenly worked.

 :) ;) :D
« Letzte Änderung: 25 Juli 2019, 20:53:58 von Zaleo »

 

decade-submarginal