NEWS
WLED - RGB Stripe - Farbe ändern und dimmen?
-
Hallo zusammen,
ich habe meine RGB-Stripes per WLED in ioBroker eingebunden.
Ich möchte gern jetzt von AUS über ROT nach HELLGELB die Farbe wechseln und auch gleichzeitig bis zur max. Helligkeit dimmen.
Das Dimmen habe ich mit Blockly schon hinbekommen, aber die Farben leider nicht.
Hier schon mal mein Blockly
-
@beowolf sagte in WLED - RGB Stripe - Farbe ändern und dimmen?:
ich habe meine RGB-Stripes per WLED in ioBroker eingebunden.
Welche Datenpunkte gibt es denn zum Steuern der Stripes? (Screenshot)
-
@beowolf Ausgehend davon das der stripe in RGB angesteuert wird ist es nicht trivial diesen Übergang zu erzeugen, da sich die Werte nicht über eine einfache Funktion berechnen lassen.
Unter der Bedingung das du bei Aus anfängst kann der Folgende Weg funktionieren:
- du erzeugst dir eine Variable für die Farben (Farbdimmliste)
- du erzeugst dir eine Variable als Index (index)
- die Farbdimmliste initialisierst du mit dem Baustein "Liste erstellen mit." Für jede gewünschte Farbstufe brauchst du einen Wert (RGB), den du per Ausprobieren selber ermitteln musst.
In der Folge nutzt du ein ähnliches Konstrukt wie beim dimmen der Helligkeit, aber
- vor dem Intervall die Variable Index auf 0 setzen
- im Intervall: Index um 1 erhöhen
- Den RGB Datenpunkt mit "Aus liste "Farbdimmliste" nimm das "index" element" ansteuern
- Falls index = länge von farbdimmliste das Intervall anhalten.
Fertig.
A.
-
Entweder Du nimmst JS oder wenn Du NodeRed nutzen würdest wäre es noch einfacher, da es ein NodeJS Modul gibt, dass Dir Farbgradienten bei 2 RGB Werten (Quelle und Ziel) errechnen lassen kannst:
https://www.npmjs.com/package/javascript-color-gradient
Das Ganze bekommst Du in einer definierten Anzahl an Farbpunkten in einem Array geliefert.
Ich habe die JS Bibliothek gerade ausprobiert und mal die Gradienten von Rot nach Hellgelb berechnen lassen mit NodeRed natürlich ;):
Ausgangspunkt war wie gewünscht rot nach hellgelb:
Nun muss Dir das noch jemand in JS umsetzen. Die Funktion der Bibliothek ist ziemlich einfach - hier mal der Code aus der function node
const gradientArray = new ColorGradient(); gradientArray.setColorGradient(msg.payload.start, msg.payload.ende); msg.payload = gradientArray.getColors(); return msg;
Um die Bibliothek einzubinden musst mit require oder import arbeiten. Da bin ich nicht so firm. Eventuell kann man das auch als Modul in den JS Adapter eintragen.
Wenn Du Dir die Beschreibung der Bibliothek anschaust, kann man sich auch mehr Punkte ausgeben zu lassen, um den Farbwechsel noch "smoother" zu machen:
So es funktioniert auch tatsächlich mit dem JS Adapter, damit sollte es Dir möglich sein, dass auch in Blockly einzubinden:
Habs sogar geschafft - die Bibliothek über die JS Funktion in Blockly einzubinden:
Du siehst die Farbwerte sind identisch von dem 1. Fenster aus dem NodeRed Debug Fenster. Das ganze schön machen und die Funktion von "etwas tun" in einen sinnvollen Namen zu verwandeln, dass überlasse ich Dir.
- Für mich war das nur mal wieder ein kurzer Versuch Q&D auszuprobieren, ob das mit den Blöcken so funktioniert, wie ich denke.
Ich weiß nicht, ob man beim Export von Blockly alles mitkommt - aber nun musst das selbst bearbeiten. Mir ist Blockly mit dem Puzzleteilchen zu suchen, einfach zu mühselig.
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="IOyN$rKD@}W3*+#o(*hf">start</variable> <variable id="Zw}R./HM^]k#4%BdRZh;">ende</variable> </variables> <block type="procedures_defcustomreturn" id="Ot|.arQ(|iHWUJ9#JEs9" x="-537" y="-87"> <mutation statements="false"> <arg name="start" varid="IOyN$rKD@}W3*+#o(*hf"></arg> <arg name="ende" varid="Zw}R./HM^]k#4%BdRZh;"></arg> </mutation> <field name="NAME">etwas tun</field> <field name="SCRIPT">Y29uc3QgR3JhZGllbnQgPSByZXF1aXJlICgiamF2YXNjcmlwdC1jb2xvci1ncmFkaWVudCIpOw0KDQpjb25zdCBncmFkaWVudEFycmF5ID0gbmV3IEdyYWRpZW50KCkNCiAgLnNldENvbG9yR3JhZGllbnQoc3RhcnQsIGVuZGUpDQogIC5nZXRDb2xvcnMoKTsNCg0KLy8gY29uc29sZS5sb2coZ3JhZGllbnRBcnJheSk7DQpyZXR1cm4gZ3JhZGllbnRBcnJheTs=</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="debug" id="|uG~068fBxE[KlIB}_X3" x="-512" y="-12"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="rLQ~#.J46XC[%(,0f[)1"> <field name="TEXT">test</field> </shadow> <block type="procedures_callcustomreturn" id="i~q5J@77%?A!v]ei:dTv"> <mutation name="etwas tun"> <arg name="start"></arg> <arg name="ende"></arg> </mutation> <value name="ARG0"> <block type="text" id="V*,UCFGrEQ$V[Fcw%RFF"> <field name="TEXT">#FF0000</field> </block> </value> <value name="ARG1"> <block type="text" id="Bh|!JQleBp;uVI*(NZT%"> <field name="TEXT">#FFFFCC</field> </block> </value> </block> </value> </block> </xml>
Falls die Funktion in dem Blockly nicht mitkommt: Hier mal der Code:
const Gradient = require ("javascript-color-gradient"); const gradientArray = new Gradient() .setColorGradient(start, ende) .getColors(); // console.log(gradientArray); return gradientArray;
Und das ganze funktioniert natürlich nur, wenn Du im JS Adapter die Bibliothek einbindest:
Falls man das wieder wegbringen will, weiß nicht, ob die Bibliothek gelöscht wird, wenn man sie aus der Adapterkonfiguration löscht.
Sie ist wird in folgendem Verzeichnis installiert:pi@MWHome:/opt/iobroker/node_modules/iobroker.javascript $ npm list javascript-color-gradient iobroker.javascript@5.7.0 /opt/iobroker/node_modules/iobroker.javascript └── javascript-color-gradient@2.4.4
folglich kann man das System auch wieder mit
npm remove javascript-color-gradient
bereinigen, wenn man in das Verzeichnis
/opt/iobroker/node_modules/iobroker.javascript
wechselt.
EDIT: Habe gerade festgestellt: Das Modul aus der Adapterkonfigutation rauszulöschen, löscht nicht das Modul, sondern muss mit remove wie oben geschrieben, manuell entfernt werden.
-
@beowolf eines ist mir boch eingefallen. Ggf kann man sich ha vielleicht das Dimmen sparen, da RGB Werte ja die Helligkeit mit beinhalten. Kannst ja mal schauen wenn Du Deine RGB LEDs auf schwarz einstellst. #000000
-
So, hier die Datenpunkte.
Ich muß erst einmal alles durchlesen was ihr so gechrieben habt. Erst mal vielen Dank für vielen Beiträge.
-
@mickym sagte in WLED - RGB Stripe - Farbe ändern und dimmen?:
Und das ganze funktioniert natürlich nur, wenn Du im JS Adapter die Bibliothek einbindest:
Ok, hier die erste "dumme" Frage.
Wie bekomme ich das dort hin?
Einfach per "npm install javascript-color-gradient" nstallieren?
-
@beowolf Nein in die Adapterkonfig so rein schreiben. Nach der Texteingabe ENTER drücken, dann entsteht diese Kachel. Der Adapter installiert das dann von selbst. Also die Instanz Deines Javascript Adapters mit dem Schraubenschlüssel öffnen.
-
@beowolf da gibts noch mehr Datenpunkte, der Screenshot ist ja unten abgeschnitten. Diese auch bitte nochmal zeigen.
-
@mickym
Hatte das jetzt so eingefügt "npm install javascript-color-gradient".Dann stand dort ,npm x, - ,install x, - , javascript-color-gradient x,
,npm x, und ,install x, habe ich durch klicken des "x" wieder entfernt. Ich hoffe ich habe mir jetzt kein Problem eingebaut.
-
@beowolf Nichts npm
Einfach in die Adapterkonfig wie abgebildet: javascript-color-gradient
reinschreiben. Fertig. Der Adapter startet sich neu und macht alles selbst. Nicht selber rumkonfigurieren, damit machst Du mehr kaputt ....Kein npm Kommando - nichts.
-
@mickym
Soll ich jetzt besser ein Backup wieder einspielen? -
@beowolf Nein lösch einfach nochmal alles raus trage das javascript-color-gradient ein. Ich glaube ich habe nirgends geschrieben, dass Du für die Installation irgendwelche npm Kommandos ausführen solltest.
Glaube nicht, dass Du schon was kaputt gemacht hast.
Du kannst in das Verzeichnis wechseln:
/opt/iobroker/node_modules/iobroker.javascript
und dort
npm list
eingeben. Dann siehst Du, ob das Modul bereits installiert wurde.
-
@mickym sagte in WLED - RGB Stripe - Farbe ändern und dimmen?:
Nein lösch einfach nochmal alles raus trage das javascript-color-gradient ein. Ich glaube ich habe nirgends geschrieben, dass Du für die Installation irgendwelche npm Kommandos ausführen solltest.
Ich hatte das so verstanden das ich das so dort eintragen muß "npm install javascript-color-gradient".
-
@beowolf sagte in WLED - RGB Stripe - Farbe ändern und dimmen?:
@mickym sagte in WLED - RGB Stripe - Farbe ändern und dimmen?:
Nein lösch einfach nochmal alles raus trage das javascript-color-gradient ein. Ich glaube ich habe nirgends geschrieben, dass Du für die Installation irgendwelche npm Kommandos ausführen solltest.
Ich hatte das so verstanden das ich das so dort eintragen muß "npm install javascript-color-gradient".
Nein bitte einfach nur javascript-color-gradient als benötigtes Modul eintragen, so wie in dem Screenshot.
-
@mickym sagte in WLED - RGB Stripe - Farbe ändern und dimmen?:
npm list
eingeben. Dann siehst Du, ob das Modul bereits installiert wurde.
Dann kommt das
pi@raspberrypi:/opt/iobroker/node_modules/iobroker.javascript $ npm list iobroker.javascript@5.7.0 /opt/iobroker/node_modules/iobroker.javascript ├── UNMET DEPENDENCY @iobroker/adapter-core@^2.6.0 ├── @types/node@14.18.18 ├── UNMET DEPENDENCY @types/request@^2.48.8 ├── UNMET DEPENDENCY coffee-compiler@^0.3.2 ├── UNMET DEPENDENCY coffee-script@^1.12.7 ├── UNMET DEPENDENCY javascript-color-gradient@^2.4.4 ├── UNMET DEPENDENCY jsonata@^1.8.6 ├── UNMET DEPENDENCY jszip@^3.9.1 ├── UNMET DEPENDENCY node-inspect@^2.0.0 ├── UNMET DEPENDENCY node-schedule@2.1.0 ├─┬ node-ssh@12.0.4 │ ├── is-stream@2.0.1 │ ├─┬ make-dir@3.1.0 │ │ └── semver@6.3.0 │ ├── sb-promise-queue@2.1.0 │ ├─┬ sb-scandir@3.1.0 │ │ └── sb-promise-queue@2.1.0 deduped │ ├── shell-escape@0.2.0 │ └─┬ ssh2@1.11.0 │ ├─┬ asn1@0.2.6 │ │ └── safer-buffer@2.1.2 │ ├─┬ bcrypt-pbkdf@1.0.2 │ │ └── tweetnacl@0.14.5 │ ├─┬ cpu-features@0.0.4 │ │ ├── buildcheck@0.0.3 │ │ └── nan@2.16.0 deduped │ └── nan@2.16.0 ├─┬ npm@8.13.1 │ ├── @isaacs/string-locale-compare@1.1.0 │ ├─┬ @npmcli/arborist@5.2.3 │ │ ├── @isaacs/string-locale-compare@1.1.0 deduped │ │ ├─┬ @npmcli/installed-package-contents@1.0.7 │ │ │ ├─┬ npm-bundled@1.1.2 │ │ │ │ └── npm-normalize-package-bin@1.0.1 deduped │ │ │ └── npm-normalize-package-bin@1.0.1 deduped │ │ ├── @npmcli/map-workspaces@2.0.3 deduped │ │ ├─┬ @npmcli/metavuln-calculator@3.1.0 │ │ │ ├── cacache@16.1.1 deduped │ │ │ ├── json-parse-even-better-errors@2.3.1 deduped │ │ │ ├── pacote@13.6.1 deduped │ │ │ └── semver@7.3.7 deduped │ │ ├─┬ @npmcli/move-file@2.0.0 │ │ │ ├── mkdirp@1.0.4 deduped │ │ │ └── rimraf@3.0.2 deduped │ │ ├── @npmcli/name-from-folder@1.0.1 │ │ ├── @npmcli/node-gyp@2.0.0 │ │ ├── @npmcli/package-json@2.0.0 deduped │ │ ├── @npmcli/run-script@4.1.3 deduped │ │ ├─┬ bin-links@3.0.1 │ │ │ ├─┬ cmd-shim@5.0.0 │ │ │ │ └── mkdirp-infer-owner@2.0.0 deduped │ │ │ ├── mkdirp-infer-owner@2.0.0 deduped │ │ │ ├── npm-normalize-package-bin@1.0.1 deduped │ │ │ ├── read-cmd-shim@3.0.0 │ │ │ ├── rimraf@3.0.2 deduped │ │ │ └── write-file-atomic@4.0.1 deduped │ │ ├── cacache@16.1.1 deduped │ │ ├── common-ancestor-path@1.0.1 │ │ ├── json-parse-even-better-errors@2.3.1 deduped │ │ ├── json-stringify-nice@1.1.4 │ │ ├── mkdirp@1.0.4 deduped │ │ ├── mkdirp-infer-owner@2.0.0 deduped │ │ ├── nopt@5.0.0 deduped │ │ ├── npm-install-checks@5.0.0 deduped │ │ ├── npm-package-arg@9.0.2 deduped │ │ ├── npm-pick-manifest@7.0.1 deduped │ │ ├── npm-registry-fetch@13.1.1 deduped │ │ ├── npmlog@6.0.2 deduped │ │ ├── pacote@13.6.1 deduped │ │ ├── parse-conflict-json@2.0.2 deduped │ │ ├── proc-log@2.0.1 deduped │ │ ├── promise-all-reject-late@1.0.1 │ │ ├── promise-call-limit@1.0.1 │ │ ├── read-package-json-fast@2.0.3 deduped │ │ ├── readdir-scoped-modules@1.1.0 deduped │ │ ├── rimraf@3.0.2 deduped │ │ ├── semver@7.3.7 deduped │ │ ├── ssri@9.0.1 deduped │ │ ├── treeverse@2.0.0 deduped │ │ └── walk-up-path@1.0.0 │ ├── @npmcli/ci-detect@2.0.0 │ ├─┬ @npmcli/config@4.1.0 │ │ ├── @npmcli/map-workspaces@2.0.3 deduped │ │ ├── ini@3.0.0 deduped │ │ ├── mkdirp-infer-owner@2.0.0 deduped │ │ ├── nopt@5.0.0 deduped │ │ ├── proc-log@2.0.1 deduped │ │ ├── read-package-json-fast@2.0.3 deduped │ │ ├── semver@7.3.7 deduped │ │ └── walk-up-path@1.0.0 deduped │ ├─┬ @npmcli/fs@2.1.0 │ │ ├── @gar/promisify@1.1.3 │ │ └── semver@7.3.7 deduped │ ├─┬ @npmcli/map-workspaces@2.0.3 │ │ ├── @npmcli/name-from-folder@1.0.1 deduped │ │ ├── glob@8.0.3 deduped │ │ ├─┬ minimatch@5.1.0 │ │ │ └─┬ brace-expansion@2.0.1 │ │ │ └── balanced-match@1.0.2 │ │ └── read-package-json-fast@2.0.3 deduped │ ├─┬ @npmcli/package-json@2.0.0 │ │ └── json-parse-even-better-errors@2.3.1 deduped │ ├─┬ @npmcli/run-script@4.1.3 │ │ ├── @npmcli/node-gyp@2.0.0 deduped │ │ ├─┬ @npmcli/promise-spawn@3.0.0 │ │ │ └── infer-owner@1.0.4 deduped │ │ ├── node-gyp@9.0.0 deduped │ │ └── read-package-json-fast@2.0.3 deduped │ ├── abbrev@1.1.1 │ ├── archy@1.0.0 │ ├─┬ cacache@16.1.1 │ │ ├── @npmcli/fs@2.1.0 deduped │ │ ├── @npmcli/move-file@2.0.0 deduped │ │ ├── chownr@2.0.0 deduped │ │ ├─┬ fs-minipass@2.1.0 │ │ │ └── minipass@3.1.6 deduped │ │ ├── glob@8.0.3 deduped │ │ ├── infer-owner@1.0.4 │ │ ├── lru-cache@7.9.0 │ │ ├── minipass@3.1.6 deduped │ │ ├─┬ minipass-collect@1.0.2 │ │ │ └── minipass@3.1.6 deduped │ │ ├─┬ minipass-flush@1.0.5 │ │ │ └── minipass@3.1.6 deduped │ │ ├── minipass-pipeline@1.2.4 deduped │ │ ├── mkdirp@1.0.4 deduped │ │ ├─┬ p-map@4.0.0 │ │ │ └─┬ aggregate-error@3.1.0 │ │ │ ├── clean-stack@2.2.0 │ │ │ └── indent-string@4.0.0 │ │ ├── promise-inflight@1.0.1 │ │ ├── rimraf@3.0.2 deduped │ │ ├── ssri@9.0.1 deduped │ │ ├── tar@6.1.11 deduped │ │ └─┬ unique-filename@1.1.1 │ │ └─┬ unique-slug@2.0.2 │ │ └── imurmurhash@0.1.4 deduped │ ├─┬ chalk@4.1.2 │ │ ├─┬ ansi-styles@4.3.0 │ │ │ └─┬ color-convert@2.0.1 │ │ │ └── color-name@1.1.4 │ │ └─┬ supports-color@7.2.0 │ │ └── has-flag@4.0.0 │ ├── chownr@2.0.0 │ ├─┬ cli-columns@4.0.0 │ │ ├─┬ string-width@4.2.3 │ │ │ ├── emoji-regex@8.0.0 │ │ │ ├── is-fullwidth-code-point@3.0.0 │ │ │ └── strip-ansi@6.0.1 deduped │ │ └─┬ strip-ansi@6.0.1 │ │ └── ansi-regex@5.0.1 │ ├─┬ cli-table3@0.6.2 │ │ ├── @colors/colors@1.5.0 │ │ └── string-width@4.2.3 deduped │ ├─┬ columnify@1.6.0 │ │ ├── strip-ansi@6.0.1 deduped │ │ └─┬ wcwidth@1.0.1 │ │ └─┬ defaults@1.0.3 │ │ └── clone@1.0.4 │ ├── fastest-levenshtein@1.0.12 │ ├─┬ glob@8.0.3 │ │ ├── fs.realpath@1.0.0 │ │ ├─┬ inflight@1.0.6 │ │ │ ├── once@1.4.0 deduped │ │ │ └── wrappy@1.0.2 │ │ ├── inherits@2.0.4 │ │ ├── minimatch@5.1.0 deduped │ │ └─┬ once@1.4.0 │ │ └── wrappy@1.0.2 deduped │ ├── graceful-fs@4.2.10 │ ├─┬ hosted-git-info@5.0.0 │ │ └── lru-cache@7.9.0 deduped │ ├── ini@3.0.0 │ ├─┬ init-package-json@3.0.2 │ │ ├── npm-package-arg@9.0.2 deduped │ │ ├─┬ promzard@0.3.0 │ │ │ └── read@1.0.7 deduped │ │ ├── read@1.0.7 deduped │ │ ├── read-package-json@5.0.1 deduped │ │ ├── semver@7.3.7 deduped │ │ ├─┬ validate-npm-package-license@3.0.4 │ │ │ ├─┬ spdx-correct@3.1.1 │ │ │ │ ├── spdx-expression-parse@3.0.1 deduped │ │ │ │ └── spdx-license-ids@3.0.11 │ │ │ └─┬ spdx-expression-parse@3.0.1 │ │ │ ├── spdx-exceptions@2.3.0 │ │ │ └── spdx-license-ids@3.0.11 deduped │ │ └── validate-npm-package-name@4.0.0 deduped │ ├─┬ is-cidr@4.0.2 │ │ └─┬ cidr-regex@3.1.1 │ │ └── ip-regex@4.3.0 │ ├── json-parse-even-better-errors@2.3.1 │ ├─┬ libnpmaccess@6.0.3 │ │ ├── aproba@2.0.0 │ │ ├── minipass@3.1.6 deduped │ │ ├── npm-package-arg@9.0.2 deduped │ │ └── npm-registry-fetch@13.1.1 deduped │ ├─┬ libnpmdiff@4.0.4 │ │ ├─┬ @npmcli/disparity-colors@2.0.0 │ │ │ └── ansi-styles@4.3.0 deduped │ │ ├── @npmcli/installed-package-contents@1.0.7 deduped │ │ ├── binary-extensions@2.2.0 │ │ ├── diff@5.0.0 │ │ ├── minimatch@5.1.0 deduped │ │ ├── npm-package-arg@9.0.2 deduped │ │ ├── pacote@13.6.1 deduped │ │ └── tar@6.1.11 deduped │ ├─┬ libnpmexec@4.0.8 │ │ ├── @npmcli/arborist@5.2.3 deduped │ │ ├── @npmcli/ci-detect@2.0.0 deduped │ │ ├── @npmcli/run-script@4.1.3 deduped │ │ ├── chalk@4.1.2 deduped │ │ ├── mkdirp-infer-owner@2.0.0 deduped │ │ ├── npm-package-arg@9.0.2 deduped │ │ ├── npmlog@6.0.2 deduped │ │ ├── pacote@13.6.1 deduped │ │ ├── proc-log@2.0.1 deduped │ │ ├── read@1.0.7 deduped │ │ ├── read-package-json-fast@2.0.3 deduped │ │ └── walk-up-path@1.0.0 deduped │ ├─┬ libnpmfund@3.0.2 │ │ └── @npmcli/arborist@5.2.3 deduped │ ├─┬ libnpmhook@8.0.3 │ │ ├── aproba@2.0.0 deduped │ │ └── npm-registry-fetch@13.1.1 deduped │ ├─┬ libnpmorg@4.0.3 │ │ ├── aproba@2.0.0 deduped │ │ └── npm-registry-fetch@13.1.1 deduped │ ├─┬ libnpmpack@4.1.2 │ │ ├── @npmcli/run-script@4.1.3 deduped │ │ ├── npm-package-arg@9.0.2 deduped │ │ └── pacote@13.6.1 deduped │ ├─┬ libnpmpublish@6.0.4 │ │ ├─┬ normalize-package-data@4.0.0 │ │ │ ├── hosted-git-info@5.0.0 deduped │ │ │ ├─┬ is-core-module@2.9.0 │ │ │ │ └─┬ has@1.0.3 │ │ │ │ └── function-bind@1.1.1 │ │ │ ├── semver@7.3.7 deduped │ │ │ └── validate-npm-package-license@3.0.4 deduped │ │ ├── npm-package-arg@9.0.2 deduped │ │ ├── npm-registry-fetch@13.1.1 deduped │ │ ├── semver@7.3.7 deduped │ │ └── ssri@9.0.1 deduped │ ├─┬ libnpmsearch@5.0.3 │ │ └── npm-registry-fetch@13.1.1 deduped │ ├─┬ libnpmteam@4.0.3 │ │ ├── aproba@2.0.0 deduped │ │ └── npm-registry-fetch@13.1.1 deduped │ ├─┬ libnpmversion@3.0.6 │ │ ├─┬ @npmcli/git@3.0.1 │ │ │ ├── @npmcli/promise-spawn@3.0.0 deduped │ │ │ ├── lru-cache@7.9.0 deduped │ │ │ ├── mkdirp@1.0.4 deduped │ │ │ ├── npm-pick-manifest@7.0.1 deduped │ │ │ ├── proc-log@2.0.1 deduped │ │ │ ├── promise-inflight@1.0.1 deduped │ │ │ ├── promise-retry@2.0.1 deduped │ │ │ ├── semver@7.3.7 deduped │ │ │ └── which@2.0.2 deduped │ │ ├── @npmcli/run-script@4.1.3 deduped │ │ ├── json-parse-even-better-errors@2.3.1 deduped │ │ ├── proc-log@2.0.1 deduped │ │ └── semver@7.3.7 deduped │ ├─┬ make-fetch-happen@10.1.8 │ │ ├─┬ agentkeepalive@4.2.1 │ │ │ ├─┬ debug@4.3.4 │ │ │ │ └── ms@2.1.2 │ │ │ ├── depd@1.1.2 │ │ │ └─┬ humanize-ms@1.2.1 │ │ │ └── ms@2.1.3 deduped │ │ ├── cacache@16.1.1 deduped │ │ ├── http-cache-semantics@4.1.0 │ │ ├─┬ http-proxy-agent@5.0.0 │ │ │ ├── @tootallnate/once@2.0.0 │ │ │ ├─┬ agent-base@6.0.2 │ │ │ │ └── debug@4.3.4 deduped │ │ │ └── debug@4.3.4 deduped │ │ ├─┬ https-proxy-agent@5.0.1 │ │ │ ├── agent-base@6.0.2 deduped │ │ │ └── debug@4.3.4 deduped │ │ ├── is-lambda@1.0.1 │ │ ├── lru-cache@7.9.0 deduped │ │ ├── minipass@3.1.6 deduped │ │ ├── minipass-collect@1.0.2 deduped │ │ ├─┬ minipass-fetch@2.1.0 │ │ │ ├─┬ encoding@0.1.13 │ │ │ │ └─┬ iconv-lite@0.6.3 │ │ │ │ └── safer-buffer@2.1.2 │ │ │ ├── minipass@3.1.6 deduped │ │ │ ├─┬ minipass-sized@1.0.3 │ │ │ │ └── minipass@3.1.6 deduped │ │ │ └── minizlib@2.1.2 deduped │ │ ├── minipass-flush@1.0.5 deduped │ │ ├── minipass-pipeline@1.2.4 deduped │ │ ├── negotiator@0.6.3 │ │ ├─┬ promise-retry@2.0.1 │ │ │ ├── err-code@2.0.3 │ │ │ └── retry@0.12.0 │ │ ├─┬ socks-proxy-agent@7.0.0 │ │ │ ├── agent-base@6.0.2 deduped │ │ │ ├── debug@4.3.4 deduped │ │ │ └─┬ socks@2.6.2 │ │ │ ├── ip@1.1.8 │ │ │ └── smart-buffer@4.2.0 │ │ └── ssri@9.0.1 deduped │ ├─┬ minipass@3.1.6 │ │ └── yallist@4.0.0 │ ├─┬ minipass-pipeline@1.2.4 │ │ └── minipass@3.1.6 deduped │ ├── mkdirp@1.0.4 │ ├─┬ mkdirp-infer-owner@2.0.0 │ │ ├── chownr@2.0.0 deduped │ │ ├── infer-owner@1.0.4 deduped │ │ └── mkdirp@1.0.4 deduped │ ├── ms@2.1.3 │ ├─┬ node-gyp@9.0.0 │ │ ├── env-paths@2.2.1 │ │ ├─┬ glob@7.2.3 │ │ │ ├── fs.realpath@1.0.0 deduped │ │ │ ├── inflight@1.0.6 deduped │ │ │ ├── inherits@2.0.4 deduped │ │ │ ├─┬ minimatch@3.1.2 │ │ │ │ └─┬ brace-expansion@1.1.11 │ │ │ │ ├── balanced-match@1.0.2 deduped │ │ │ │ └── concat-map@0.0.1 │ │ │ ├── once@1.4.0 deduped │ │ │ └── path-is-absolute@1.0.1 │ │ ├── graceful-fs@4.2.10 deduped │ │ ├── make-fetch-happen@10.1.8 deduped │ │ ├── nopt@5.0.0 deduped │ │ ├── npmlog@6.0.2 deduped │ │ ├── rimraf@3.0.2 deduped │ │ ├── semver@7.3.7 deduped │ │ ├── tar@6.1.11 deduped │ │ └── which@2.0.2 deduped │ ├─┬ nopt@5.0.0 │ │ └── abbrev@1.1.1 deduped │ ├─┬ npm-audit-report@3.0.0 │ │ └── chalk@4.1.2 deduped │ ├─┬ npm-install-checks@5.0.0 │ │ └── semver@7.3.7 deduped │ ├─┬ npm-package-arg@9.0.2 │ │ ├── hosted-git-info@5.0.0 deduped │ │ ├── semver@7.3.7 deduped │ │ └── validate-npm-package-name@4.0.0 deduped │ ├─┬ npm-pick-manifest@7.0.1 │ │ ├── npm-install-checks@5.0.0 deduped │ │ ├── npm-normalize-package-bin@1.0.1 │ │ ├── npm-package-arg@9.0.2 deduped │ │ └── semver@7.3.7 deduped │ ├─┬ npm-profile@6.1.0 │ │ ├── npm-registry-fetch@13.1.1 deduped │ │ └── proc-log@2.0.1 deduped │ ├─┬ npm-registry-fetch@13.1.1 │ │ ├── make-fetch-happen@10.1.8 deduped │ │ ├── minipass@3.1.6 deduped │ │ ├── minipass-fetch@2.1.0 deduped │ │ ├─┬ minipass-json-stream@1.0.1 │ │ │ ├── jsonparse@1.3.1 │ │ │ └── minipass@3.1.6 deduped │ │ ├─┬ minizlib@2.1.2 │ │ │ ├── minipass@3.1.6 deduped │ │ │ └── yallist@4.0.0 deduped │ │ ├── npm-package-arg@9.0.2 deduped │ │ └── proc-log@2.0.1 deduped │ ├── npm-user-validate@1.0.1 │ ├─┬ npmlog@6.0.2 │ │ ├─┬ are-we-there-yet@3.0.0 │ │ │ ├── delegates@1.0.0 │ │ │ └─┬ readable-stream@3.6.0 │ │ │ ├── inherits@2.0.4 deduped │ │ │ ├─┬ string_decoder@1.3.0 │ │ │ │ └── safe-buffer@5.2.1 │ │ │ └── util-deprecate@1.0.2 │ │ ├── console-control-strings@1.1.0 │ │ ├─┬ gauge@4.0.4 │ │ │ ├── aproba@2.0.0 deduped │ │ │ ├── color-support@1.1.3 │ │ │ ├── console-control-strings@1.1.0 deduped │ │ │ ├── has-unicode@2.0.1 │ │ │ ├── signal-exit@3.0.7 deduped │ │ │ ├── string-width@4.2.3 deduped │ │ │ ├── strip-ansi@6.0.1 deduped │ │ │ └─┬ wide-align@1.1.5 │ │ │ └── string-width@4.2.3 deduped │ │ └── set-blocking@2.0.0 │ ├── opener@1.5.2 │ ├─┬ pacote@13.6.1 │ │ ├── @npmcli/git@3.0.1 deduped │ │ ├── @npmcli/installed-package-contents@1.0.7 deduped │ │ ├── @npmcli/promise-spawn@3.0.0 deduped │ │ ├── @npmcli/run-script@4.1.3 deduped │ │ ├── cacache@16.1.1 deduped │ │ ├── chownr@2.0.0 deduped │ │ ├── fs-minipass@2.1.0 deduped │ │ ├── infer-owner@1.0.4 deduped │ │ ├── minipass@3.1.6 deduped │ │ ├── mkdirp@1.0.4 deduped │ │ ├── npm-package-arg@9.0.2 deduped │ │ ├─┬ npm-packlist@5.1.0 │ │ │ ├── glob@8.0.3 deduped │ │ │ ├─┬ ignore-walk@5.0.1 │ │ │ │ └── minimatch@5.1.0 deduped │ │ │ ├── npm-bundled@1.1.2 deduped │ │ │ └── npm-normalize-package-bin@1.0.1 deduped │ │ ├── npm-pick-manifest@7.0.1 deduped │ │ ├── npm-registry-fetch@13.1.1 deduped │ │ ├── proc-log@2.0.1 deduped │ │ ├── promise-retry@2.0.1 deduped │ │ ├── read-package-json@5.0.1 deduped │ │ ├── read-package-json-fast@2.0.3 deduped │ │ ├── rimraf@3.0.2 deduped │ │ ├── ssri@9.0.1 deduped │ │ └── tar@6.1.11 deduped │ ├─┬ parse-conflict-json@2.0.2 │ │ ├── json-parse-even-better-errors@2.3.1 deduped │ │ ├── just-diff@5.0.2 │ │ └── just-diff-apply@5.2.0 │ ├── proc-log@2.0.1 │ ├── qrcode-terminal@0.12.0 │ ├─┬ read@1.0.7 │ │ └── mute-stream@0.0.8 │ ├─┬ read-package-json@5.0.1 │ │ ├── glob@8.0.3 deduped │ │ ├── json-parse-even-better-errors@2.3.1 deduped │ │ ├── normalize-package-data@4.0.0 deduped │ │ └── npm-normalize-package-bin@1.0.1 deduped │ ├─┬ read-package-json-fast@2.0.3 │ │ ├── json-parse-even-better-errors@2.3.1 deduped │ │ └── npm-normalize-package-bin@1.0.1 deduped │ ├─┬ readdir-scoped-modules@1.1.0 │ │ ├── debuglog@1.0.1 │ │ ├─┬ dezalgo@1.0.4 │ │ │ ├── asap@2.0.6 │ │ │ └── wrappy@1.0.2 deduped │ │ ├── graceful-fs@4.2.10 deduped │ │ └── once@1.4.0 deduped │ ├─┬ rimraf@3.0.2 │ │ └─┬ glob@7.2.3 │ │ ├── fs.realpath@1.0.0 deduped │ │ ├── inflight@1.0.6 deduped │ │ ├── inherits@2.0.4 deduped │ │ ├─┬ minimatch@3.1.2 │ │ │ └─┬ brace-expansion@1.1.11 │ │ │ ├── balanced-match@1.0.2 deduped │ │ │ └── concat-map@0.0.1 deduped │ │ ├── once@1.4.0 deduped │ │ └── path-is-absolute@1.0.1 deduped │ ├─┬ semver@7.3.7 │ │ └─┬ lru-cache@6.0.0 │ │ └── yallist@4.0.0 deduped │ ├─┬ ssri@9.0.1 │ │ └── minipass@3.1.6 deduped │ ├─┬ tar@6.1.11 │ │ ├── chownr@2.0.0 deduped │ │ ├── fs-minipass@2.1.0 deduped │ │ ├── minipass@3.1.6 deduped │ │ ├── minizlib@2.1.2 deduped │ │ ├── mkdirp@1.0.4 deduped │ │ └── yallist@4.0.0 deduped │ ├── text-table@0.2.0 │ ├── tiny-relative-date@1.3.0 │ ├── treeverse@2.0.0 │ ├─┬ validate-npm-package-name@4.0.0 │ │ └─┬ builtins@5.0.1 │ │ └── semver@7.3.7 deduped │ ├─┬ which@2.0.2 │ │ └── isexe@2.0.0 │ └─┬ write-file-atomic@4.0.1 │ ├── imurmurhash@0.1.4 │ └── signal-exit@3.0.7 ├── UNMET DEPENDENCY request@^2.88.2 ├── UNMET DEPENDENCY semver@^7.3.7 ├── UNMET DEPENDENCY suncalc2@^1.8.1 ├── UNMET DEPENDENCY typescript@^4.6.4 ├── UNMET DEPENDENCY virtual-tsc@^0.6.2 ├── UNMET OPTIONAL DEPENDENCY vm2@^3.9.9 └── UNMET DEPENDENCY wake_on_lan@^1.0.0 npm ERR! missing: @iobroker/adapter-core@^2.6.0, required by iobroker.javascript@5.7.0 npm ERR! missing: @types/request@^2.48.8, required by iobroker.javascript@5.7.0 npm ERR! missing: coffee-compiler@^0.3.2, required by iobroker.javascript@5.7.0 npm ERR! missing: coffee-script@^1.12.7, required by iobroker.javascript@5.7.0 npm ERR! missing: javascript-color-gradient@^2.4.4, required by iobroker.javascript@5.7.0 npm ERR! missing: jsonata@^1.8.6, required by iobroker.javascript@5.7.0 npm ERR! missing: jszip@^3.9.1, required by iobroker.javascript@5.7.0 npm ERR! missing: node-inspect@^2.0.0, required by iobroker.javascript@5.7.0 npm ERR! missing: node-schedule@2.1.0, required by iobroker.javascript@5.7.0 npm ERR! missing: request@^2.88.2, required by iobroker.javascript@5.7.0 npm ERR! missing: semver@^7.3.7, required by iobroker.javascript@5.7.0 npm ERR! missing: suncalc2@^1.8.1, required by iobroker.javascript@5.7.0 npm ERR! missing: typescript@^4.6.4, required by iobroker.javascript@5.7.0 npm ERR! missing: virtual-tsc@^0.6.2, required by iobroker.javascript@5.7.0 npm ERR! missing: wake_on_lan@^1.0.0, required by iobroker.javascript@5.7.0 pi@raspberrypi:/opt/iobroker/node_modules/iobroker.javascript $
-
@mickym sagte in WLED - RGB Stripe - Farbe ändern und dimmen?:
@beowolf sagte in WLED - RGB Stripe - Farbe ändern und dimmen?:
@mickym sagte in WLED - RGB Stripe - Farbe ändern und dimmen?:
Nein lösch einfach nochmal alles raus trage das javascript-color-gradient ein. Ich glaube ich habe nirgends geschrieben, dass Du für die Installation irgendwelche npm Kommandos ausführen solltest.
Ich hatte das so verstanden das ich das so dort eintragen muß "npm install javascript-color-gradient".
Nein bitte einfach nur javascript-color-gradient als benötigtes Modul eintragen, so wie in dem Screenshot.
Ist jetzt drin.
-
@beowolf Hmm das npm list schaut nicht ganz sauber aus. Aber es scheint bereits was installiert worden zu sein. Du kannst ja erst mal prüfen, ob es funktioniert, wenn Du die Funktion definierst und siehst, ob Du die Gradienten siehst. Wenn das nicht hilft, dann müsste man das halt wieder rückgängig machen.
Ich habs jetzt gerade nochmal in die Adapterkonfig im JS Adapter eingegeben
Dann mir Speichern und Schließen wird der Adapter neu gestartet.
pi@MWHome:/opt/iobroker/node_modules/iobroker.javascript $ npm list iobroker.javascript@5.7.0 /opt/iobroker/node_modules/iobroker.javascript ├── @alcalzone/release-script-plugin-iobroker@3.5.9 ├── @alcalzone/release-script-plugin-license@3.5.9 ├── @alcalzone/release-script@3.5.9 ├── @iobroker/adapter-core@2.6.0 ├── @types/iobroker@4.0.4 ├── @types/node@16.11.41 ├── @types/request@2.48.8 ├── alcalzone-shared@4.0.1 ├── chai@4.3.6 ├── coffee-compiler@0.3.2 ├── coffee-script@1.12.7 ├── del@6.1.1 ├── eslint@7.32.0 ├── gulp-rename@2.0.0 ├── gulp-replace@1.1.3 ├── gulp@4.0.2 ├── javascript-color-gradient@2.4.4 ├── jsonata@1.8.6 ├── jszip@3.10.0 ├── mocha@9.2.2 ├── node-inspect@2.0.0 ├── node-schedule@2.1.0 ├── request@2.88.2 ├── semver@7.3.7 ├── suncalc2@1.8.1 ├── timekeeper@2.2.0 ├── typescript@4.7.4 ├── virtual-tsc@0.6.2 ├── vm2@3.9.9 └── wake_on_lan@1.0.0
Wenn es ganz sauber aussehen soll, dann sieht es wie bei mir jetzt aus.
Man kann bei den Fehlern die ich vorher gesehen habe in dem Verzeichnis /opt/iobroker/node_modules/iobroker.javascript
npm prune
eingeben - das bereinigt nicht aufgelöste Abhängigkeiten.
-
Ich habe jetzt das Blockly importiert. Es erscheint so wie in deinem Beitrag.
Ist dann alles richtig?
-
@beowolf Ja dann funktioniert das.