fhem im Docker-Container: echodevice läßt sich nicht aktivieren

Begonnen von rabehd, 11 Januar 2025, 18:06:35

Vorheriges Thema - Nächstes Thema

passibe

Bitte möglichst stumpf die Schritte 1–6 aus Beitrag #4 nachmachen.
(Bei Docker geht es nicht mit NPM_install.)

rabehd

root@22705468f3c5:/opt/fhem# npm install --unsafe-perm --production --prefix /opt/fhem/cache/alexa-cookie alexa-cookie2
npm warn config production Use `--omit=dev` instead.

up to date, audited 104 packages in 2s

17 packages are looking for funding
  run `npm fund` for details

2 low severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm notice
npm notice New major version of npm available! 10.9.0 -> 11.6.4
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.6.4
npm notice To update run: npm install -g npm@11.6.4
npm notice
root@22705468f3c5:/opt/fhem# npm install npm@11.6.4
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'npm@11.6.4',
npm warn EBADENGINE   required: { node: '^20.17.0 || >=22.9.0' },
npm warn EBADENGINE   current: { node: 'v18.20.4', npm: '10.9.0' }
npm warn EBADENGINE }

added 1 package in 3s

16 packages are looking for funding
  run `npm fund` for details
root@22705468f3c5:/opt/fhem# npm install --unsafe-perm --production --prefix /opt/fhem/cache/alexa-cookie alexa-cookie2
npm warn config production Use `--omit=dev` instead.

up to date, audited 104 packages in 1s

17 packages are looking for funding
  run `npm fund` for details

2 low severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
root@22705468f3c5:/opt/fhem# npm cache clean --force
npm warn using --force Recommended protections disabled.
root@22705468f3c5:/opt/fhem# chown -R fhem: /opt/fhem/cache/alexa-cookie
root@22705468f3c5:/opt/fhem#

Ich habe es in der Konsole es Containers (Portainer) gemacht. Vorher den Contaier neu erstellt.
Als Schritt 4 habe ich ein neues Device angelegt.
NPM-Login meldet weiterhin "Das alexa-cookie Modul wurde nicht gefunden. Bitte fuehrt am Amazon Account Device einen set "NPM_install" durch "

???
Auch funktionierende Lösungen kann man hinterfragen.

passibe

Komisch. Bei mir funktioniert das.
Kannst du mal bitte in der Konsole des Containers
ls -la /opt/fhem/cache/alexa-cookie/node_modules/alexa-cookie2/ausführen und das Ergebnis hier posten? Vielleicht hast du auch irgendwelche volumes vertauscht und bist zufälligerweise doch in einem Container gelandet, wo du alexa-cookie2 noch nicht installiert hattest?
Als Abgleich dann bitte auch mal
"ls -la /opt/fhem/cache/alexa-cookie/node_modules/alexa-cookie2/"(mit Anführungszeichen!) direkt in die FHEM-Befehlszeile eingeben und dann posten, welche Rückmeldung im FHEM-Log erscheint.

(Ansonsten: Was ich mit "stumpf nachmachen" meinte, ist, dass du auch nur die in den Schritten angegebenen Befehle befolgst, damit es reproduzierbar bleibst. Das npm update hier ist aber sowieso fehlgeschlagen und ändert deshalb nichts am Ergebnis. Und ich hätte das natürlich auch besser ausdrücken können, deshalb nur zur Information :D)

rabehd

Zitat von: passibe am 01 Dezember 2025, 21:03:11Kannst du mal bitte in der Konsole des Containers
total 48
drwxrwxrwx   4 fhem fhem  4096 Nov 30 22:02 .
drwxrwxrwx 100 fhem fhem  4096 Nov 30 22:01 ..
-rwxrwxrwx   1 fhem fhem   767 Nov 30 22:01 .eslintrc.json
-rwxrwxrwx   1 fhem fhem    65 Nov 30 22:01 .gitattributes
-rwxrwxrwx   1 fhem fhem    31 Nov 30 22:01 .releaseconfig.json
-rwxrwxrwx   1 fhem fhem  1102 Nov 30 22:01 LICENSE
-rwxrwxrwx   1 fhem fhem 10338 Nov 30 22:01 README.md
drwxrwxrwx   2 fhem fhem  4096 Nov 30 22:01 example
drwxrwxrwx   2 fhem fhem  4096 Nov 30 22:01 lib
-rwxrwxrwx   1 fhem fhem  1163 Nov 30 22:01 package.json

Zitat von: passibe am 01 Dezember 2025, 21:03:11direkt in die FHEM-Befehlszeile eingeben
total 48
drwxrwxrwx   4 fhem fhem  4096 Nov 30 22:02 .
drwxrwxrwx 100 fhem fhem  4096 Nov 30 22:01 ..
-rwxrwxrwx   1 fhem fhem   767 Nov 30 22:01 .eslintrc.json
drwxrwxrwx   2 fhem fhem  4096 Nov 30 22:01 example
-rwxrwxrwx   1 fhem fhem    65 Nov 30 22:01 .gitattributes
drwxrwxrwx   2 fhem fhem  4096 Nov 30 22:01 lib
-rwxrwxrwx   1 fhem fhem  1102 Nov 30 22:01 LICENSE
-rwxrwxrwx   1 fhem fhem  1163 Nov 30 22:01 package.json
-rwxrwxrwx   1 fhem fhem 10338 Nov 30 22:01 README.md
-rwxrwxrwx   1 fhem fhem    31 Nov 30 22:01 .releaseconfig.json

Ich sehe da erstmal keinen Unterschied.
Auch funktionierende Lösungen kann man hinterfragen.

passibe

Hm, aus irgendeinem Grund fehlt da alexa-cookie.js.

Vielleicht einfach nochmal neu installieren:
rm -rf /opt/fhem/cache/alexa-cookie
npm install --unsafe-perm --production --prefix /opt/fhem/cache/alexa-cookie alexa-cookie2
npm cache clean --force
chown -R fhem: /opt/fhem/cache/alexa-cookie

Und dann überprüfen, ob alexa-cookie.js auch wirklich da ist:
ls -la /opt/fhem/cache/alexa-cookie/node_modules/alexa-cookie2/alexa-cookie.js
Ist das der Fall, müsste set <DEVICE> NPM_login new funktionieren.

rabehd

Jetzt habe ich wieder ein connected.
Danke Dir.

root@22705468f3c5:/opt/fhem# rm -rf /opt/fhem/cache/alexa-cookie
root@22705468f3c5:/opt/fhem# npm install --unsafe-perm --production --prefix /opt/fhem/cache/alexa-cookie alexa-cookie2
npm warn config production Use `--omit=dev` instead.
npm warn deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

added 109 packages in 7s

18 packages are looking for funding
  run `npm fund` for details
root@22705468f3c5:/opt/fhem# npm cache clean --force
npm warn using --force Recommended protections disabled.
root@22705468f3c5:/opt/fhem# chown -R fhem: /opt/fhem/cache/alexa-cookie
root@22705468f3c5:/opt/fhem# ls -la /opt/fhem/cache/alexa-cookie/node_modules/alexa-cookie2/alexa-cookie.js
-rw-r--r-- 1 fhem fhem 42224 Dec  2 11:40 /opt/fhem/cache/alexa-cookie/node_modules/alexa-cookie2/alexa-cookie.js
root@22705468f3c5:/opt/fhem#
Auch funktionierende Lösungen kann man hinterfragen.