Danke!
Die simple-api.0 ist zugeordnet.
Ich lerne dazu, auch Dank deines Werkzeugkastens
Danke!
Die simple-api.0 ist zugeordnet.
Ich lerne dazu, auch Dank deines Werkzeugkastens
Hallo Thomas, ich bin begeistert!
Mit deiner Anleitung konnte ich die api aktivieren.
In der Anleitung hat sich an zwei Stellen ein Schreibfehler (...apt statt ...api) eingeschlichen
Dann hatte ich noch die Fehlermeldung.
pi@iobroker:~/sonoshttp $ sudo systemctl start sonoshttp.service
pi@iobroker:~/sonoshttp $ systemctl status sonoshttp.service
● sonoshttp.service - Sonos http API
Loaded: loaded (/lib/systemd/system/sonoshttp.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2023-11-23 23:13:29 CET; 3s ago
Process: 3655161 ExecStart=/usr/local/bin/node-sonos-http-api/sonoshttp.sh (code=exited, status=1/FAILURE)
Main PID: 3655161 (code=exited, status=1/FAILURE)
CPU: 3.965s
Nov 23 23:13:28 iobroker sonoshttp.sh[3655369]: playMode: { shuffle: true, repeat: 'all', crossfade: false },
Nov 23 23:13:28 iobroker sonoshttp.sh[3655369]: pauseOthers: false
Nov 23 23:13:28 iobroker sonoshttp.sh[3655369]: }
Nov 23 23:13:28 iobroker sonoshttp.sh[3655369]: }
Nov 23 23:13:29 iobroker sonoshttp.sh[3655369]: 2023-11-23T22:13:29.588Z ERROR Port 5005 seems to be in use already. Make sure the sonos->
Nov 23 23:13:29 iobroker sonoshttp.sh[3655369]: already running, or that no other server uses that port. You can specify an alternati>
Nov 23 23:13:29 iobroker sonoshttp.sh[3655369]: with property "port" in settings.json
Nov 23 23:13:29 iobroker systemd[1]: sonoshttp.service: Main process exited, code=exited, status=1/FAILURE
Nov 23 23:13:29 iobroker systemd[1]: sonoshttp.service: Failed with result 'exit-code'.
Nach der Änderung des Ports in der settings.js auf den Port 5015 war der Aufruf erfolgreich.
pi@iobroker:/usr/local/bin/node-sonos-http-api $ sudo nano settings.js
pi@iobroker:/usr/local/bin/node-sonos-http-api $ sudo systemctl start sonoshttp.service
pi@iobroker:/usr/local/bin/node-sonos-http-api $ systemctl status sonoshttp.service
● sonoshttp.service - Sonos http API
Loaded: loaded (/lib/systemd/system/sonoshttp.service; disabled; vendor preset: enabled)
Active: active (running) since Thu 2023-11-23 23:21:47 CET; 25s ago
Main PID: 3671575 (sonoshttp.sh)
Tasks: 24 (limit: 3933)
CPU: 4.416s
CGroup: /system.slice/sonoshttp.service
├─3671575 /bin/bash /usr/local/bin/node-sonos-http-api/sonoshttp.sh
├─3671576 npm start
├─3671610 sh -c node server.js
└─3671611 node server.js
Nov 23 23:21:49 iobroker sonoshttp.sh[3671611]: { roomName: 'Kitchen', volume: 10 },
Nov 23 23:21:49 iobroker sonoshttp.sh[3671611]: { roomName: 'Office', volume: 10 },
Nov 23 23:21:49 iobroker sonoshttp.sh[3671611]: { roomName: 'Bedroom', volume: 10 },
Nov 23 23:21:49 iobroker sonoshttp.sh[3671611]: { roomName: 'TV Room', volume: 15 }
Nov 23 23:21:49 iobroker sonoshttp.sh[3671611]: ],
Nov 23 23:21:49 iobroker sonoshttp.sh[3671611]: playMode: { shuffle: true, repeat: 'all', crossfade: false },
Nov 23 23:21:49 iobroker sonoshttp.sh[3671611]: pauseOthers: false
Nov 23 23:21:49 iobroker sonoshttp.sh[3671611]: }
Nov 23 23:21:49 iobroker sonoshttp.sh[3671611]: }
Nov 23 23:21:51 iobroker sonoshttp.sh[3671611]: 2023-11-23T22:21:51.011Z INFO http server listening on 0.0.0.0 port 5015
Hast du vielleicht noch einen Vorschlag wie ich feststellen kann was den Port 5005 belegt? Vielleicht habe ich mit meinen vorherigen Versuchen hier etwas durcheinandergebracht.
Nochmals: Herzlichen Dank für deine Unterstützung!
Das finde ich super! DANKE erst mal....
Dann versuche ich es mal in dem Verzeichnis /usr/local/bin und zwar ohne sudo
Die Vorlage für die Installation ist auf folgendem link: https://github.com/jishi/node-sonos-http-api/wiki/Step-by-Step---RPi3-Install-of-Sonos-http-api
pi@iobroker:/usr/local/bin $ git clone https://github.com/jishi/node-sonos-http-api.git
fatal: could not create work tree dir 'node-sonos-http-api': Permission denied
Was nun???
Danke für die schnelle Antwort. Ich hatte die Installion bereits vorher ohne sudo mit den gleichen Fehlern versucht. Daher dachte ich sudo könnte helfen...
Das Ziel ist, die Integration der SONOS in den ioBroker.
Ich versuche auf meinem Raspi4 das sonos-http-api zu installieren.
npm audit zeigt nach der Installation und sudo npm audit fix --force noch einige Fehlermeldungen:
pi@iobroker:~/node-sonos-http-api $ npm audit
# npm audit report
minimist <=0.2.3
Severity: critical
Prototype Pollution in minimist - https://github.com/advisories/GHSA-vh95-rmgr-6w4m
Prototype Pollution in minimist - https://github.com/advisories/GHSA-xvch-5gv4-984h
fix available via `npm audit fix`
node_modules/minimist
optimist >=0.6.0
Depends on vulnerable versions of minimist
node_modules/optimist
node-static *
Severity: high
Denial of Service in node-static - https://github.com/advisories/GHSA-8r4g-cg4m-x23c
node-static and @nubosoftware/node-static vulnerable to Directory Traversal - https://github.com/advisories/GHSA-5g97-whc9-8g7j
No fix available
node_modules/node-static
request *
Severity: moderate
Server-Side Request Forgery in Request - https://github.com/advisories/GHSA-p8p7-x288-28g6
Depends on vulnerable versions of tough-cookie
No fix available
node_modules/request
anesidora *
Depends on vulnerable versions of request
node_modules/anesidora
tough-cookie <4.1.3
Severity: moderate
tough-cookie Prototype Pollution vulnerability - https://github.com/advisories/GHSA-72xf-g2v4-qvf3
No fix available
node_modules/tough-cookie
6 vulnerabilities (3 moderate, 1 high, 2 critical)
To address issues that do not require attention, run:
npm audit fix
Some issues need review, and may require choosing
a different dependency.
Nach einem reboot versuche ich: sudo npm start
pi@iobroker:~/node-sonos-http-api $ sudo npm start
> sonos-http-api@1.6.9 start
> node server.js
2023-11-22T13:54:24.718Z INFO Could not find file /home/pi/node-sonos-http-api/settings.json
2023-11-22T13:54:25.212Z INFO Presets loaded: {
example: {
players: [
{ roomName: 'Bathroom', volume: 10 },
{ roomName: 'Kitchen', volume: 10 },
{ roomName: 'Office', volume: 10 },
{ roomName: 'Bedroom', volume: 10 },
{ roomName: 'TV Room', volume: 15 }
],
playMode: { shuffle: true, repeat: 'all', crossfade: false },
pauseOthers: false
}
}
node:internal/modules/cjs/loader:446
throw err;
^
Error: Cannot find module '/home/pi/node-sonos-http-api/node_modules/request-promise/lib/tp.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:438:19)
at Module._findPath (node:internal/modules/cjs/loader:680:18)
at Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/home/pi/node-sonos-http-api/lib/actions/musicSearch.js:2:17)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:119:18)
at /home/pi/node-sonos-http-api/lib/helpers/require-dir.js:18:8
at Array.forEach (<anonymous>)
at module.exports (/home/pi/node-sonos-http-api/lib/helpers/require-dir.js:17:6) {
code: 'MODULE_NOT_FOUND',
path: '/home/pi/node-sonos-http-api/node_modules/request-promise/package.json',
requestPath: 'request-promise'
}
Node.js v18.18.2
Mit meinen Linux Kenntnissen kann ich das Problem nicht lösen.
Kann mir jemand weiterhelfen?
@bananajoe Danke für den Tipp. Ich werde meine Lösung entsprechend umsetzen.
In meiner Visualisierung vis (v1.4.15) nutze ich das "basic- HTML" widget um die Inhalte von Datenpunkten in einer Tabelle auszugeben. Hierbei stelle ich fest, dass das Auflösen der Bindings nach 50 Datenpunkten nicht mehr erfolgt.
Als Beispiel habe ich die Ausgabe von 60 Datenpunkten angehängt.
Ich könnte die Ausgaben auf mehrere HTML Tabellen verteilen, möchte aber lieber die relevanten Daten in einer Tabelle mit bis zu 90 Datenpunkten ausgeben.
Welche Möglichkeiten gibt es um die Einschränkung auf 50 Datenpunkte zu erhöhen?
Danke für eure Unterstützung
Heinz
Beim Löschen von Datenpunkten, ... besteht anscheinend mit dem Admin Adapter ein Problem siehe: https://forum.iobroker.net/topic/58249/skript-löschen-geht-nicht-permissionerror/147
Hallo allerseits, ich hatte auch den "permissionError" im neu aufgesetztem System mit aktualisierten Adaptern. Es ist mir beim löschen von Datenpunkten aufgefallen.
Nach der Änderung der admin Version auf 6.2.12 (nach folgender Anleitung) ist das Löschen nun wieder möglich.
iob stop admin
iob upgrade admin@6.2.12
iob start admin
Vielleicht hilft das bei der weiteren Fehleranalyse