natcl / node-red-contrib-streamdeck

A Node-RED node to interact with the Elgato Stream Deck products
Apache License 2.0
13 stars 4 forks source link

wont install #4

Closed Wink5 closed 2 years ago

Wink5 commented 4 years ago

I'm running node-red through home assistant on a virtual machine, it will not let me install it via the manage palette, it fails every time

2020-08-31T23:57:46.453Z Install : node-red-contrib-streamdeck 1.0.1

2020-08-31T23:57:46.270Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix="~" --production node-red-contrib-streamdeck@1.0.1 2020-08-31T23:58:00.558Z [out] 2020-08-31T23:58:00.558Z [out] > node-hid@1.3.0 install /config/node-red/node_modules/node-hid 2020-08-31T23:58:00.558Z [out] > prebuild-install || node-gyp rebuild 2020-08-31T23:58:00.558Z [out] 2020-08-31T23:58:01.167Z [err] prebuild-install 2020-08-31T23:58:01.170Z [err] WARN install No prebuilt binaries found (target=12.18.3 runtime=node arch=x64 libc=musl platform=linux) 2020-08-31T23:58:01.802Z [err] /bin/sh: pkg-config: not found 2020-08-31T23:58:01.802Z [err] gyp: Call to 'pkg-config libusb-1.0 --cflags-only-I | sed s/-I//g' returned exit status 0 while in binding.gyp. while trying to load binding.gyp 2020-08-31T23:58:01.815Z [err] gyp ERR! configure error 2020-08-31T23:58:01.815Z [err] gyp ERR! stack Error: gyp failed with exit code: 1 2020-08-31T23:58:01.815Z [err] gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16) 2020-08-31T23:58:01.815Z [err] gyp ERR! stack at ChildProcess.emit (events.js:315:20) 2020-08-31T23:58:01.815Z [err] gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) 2020-08-31T23:58:01.815Z [err] gyp 2020-08-31T23:58:01.816Z [err] ERR! System Linux 5.4.56 2020-08-31T23:58:01.816Z [err] gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 2020-08-31T23:58:01.816Z [err] gyp ERR! cwd /config/node-red/node_modules/node-hid 2020-08-31T23:58:01.816Z [err] gyp ERR! node -v v12.18.3 2020-08-31T23:58:01.816Z [err] gyp ERR! node-gyp -v v5.1.0 2020-08-31T23:58:01.816Z [err] gyp ERR! not ok 2020-08-31T23:58:02.341Z [err] npm 2020-08-31T23:58:02.341Z [err]
2020-08-31T23:58:02.341Z [err] ERR! 2020-08-31T23:58:02.341Z [err]
2020-08-31T23:58:02.341Z [err] code 2020-08-31T23:58:02.342Z [err] ELIFECYCLE 2020-08-31T23:58:02.342Z [err] npm 2020-08-31T23:58:02.342Z [err]
2020-08-31T23:58:02.342Z [err] ERR! 2020-08-31T23:58:02.342Z [err]
2020-08-31T23:58:02.342Z [err] errno 2020-08-31T23:58:02.342Z [err] 1 2020-08-31T23:58:02.345Z [err] npm 2020-08-31T23:58:02.345Z [err]
2020-08-31T23:58:02.345Z [err] ERR! 2020-08-31T23:58:02.345Z [err] node-hid@1.3.0 install: prebuild-install || node-gyp rebuild 2020-08-31T23:58:02.345Z [err] npm 2020-08-31T23:58:02.345Z [err]
2020-08-31T23:58:02.345Z [err] ERR! 2020-08-31T23:58:02.346Z [err] Exit status 1 2020-08-31T23:58:02.346Z [err] npm 2020-08-31T23:58:02.346Z [err]
2020-08-31T23:58:02.346Z [err] ERR! 2020-08-31T23:58:02.346Z [err]
2020-08-31T23:58:02.346Z [err] npm 2020-08-31T23:58:02.346Z [err]
2020-08-31T23:58:02.346Z [err] ERR! 2020-08-31T23:58:02.346Z [err] Failed at the node-hid@1.3.0 install script. 2020-08-31T23:58:02.346Z [err] npm 2020-08-31T23:58:02.346Z [err]
2020-08-31T23:58:02.346Z [err] ERR! 2020-08-31T23:58:02.346Z [err] This is probably not a problem with npm. There is likely additional logging output above. 2020-08-31T23:58:02.361Z [err] 2020-08-31T23:58:02.361Z [err] npm ERR! A complete log of this run can be found in: 2020-08-31T23:58:02.361Z [err] npm ERR! /root/.npm/_logs/2020-08-31T23_58_02_357Z-debug.log 2020-08-31T23:58:02.367Z rc=1

natcl commented 4 years ago

What OS is your virtual machine running ? You probably need build tools installed.

-- lecaude.com studioimaginaire.com

Le 31 août 2020 à 20:01, Wink5 notifications@github.com a écrit :

 I'm running node-red through home assistant on a virtual machine, it will not let me install it via the manage palette, it fails every time

2020-08-31T23:57:46.453Z Install : node-red-contrib-streamdeck 1.0.1

2020-08-31T23:57:46.270Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix="~" --production node-red-contrib-streamdeck@1.0.1 2020-08-31T23:58:00.558Z [out] 2020-08-31T23:58:00.558Z [out] > node-hid@1.3.0 install /config/node-red/node_modules/node-hid 2020-08-31T23:58:00.558Z [out] > prebuild-install || node-gyp rebuild 2020-08-31T23:58:00.558Z [out] 2020-08-31T23:58:01.167Z [err] prebuild-install 2020-08-31T23:58:01.170Z [err] WARN install No prebuilt binaries found (target=12.18.3 runtime=node arch=x64 libc=musl platform=linux) 2020-08-31T23:58:01.802Z [err] /bin/sh: pkg-config: not found 2020-08-31T23:58:01.802Z [err] gyp: Call to 'pkg-config libusb-1.0 --cflags-only-I | sed s/-I//g' returned exit status 0 while in binding.gyp. while trying to load binding.gyp 2020-08-31T23:58:01.815Z [err] gyp ERR! configure error 2020-08-31T23:58:01.815Z [err] gyp ERR! stack Error: gyp failed with exit code: 1 2020-08-31T23:58:01.815Z [err] gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16) 2020-08-31T23:58:01.815Z [err] gyp ERR! stack at ChildProcess.emit (events.js:315:20) 2020-08-31T23:58:01.815Z [err] gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) 2020-08-31T23:58:01.815Z [err] gyp 2020-08-31T23:58:01.816Z [err] ERR! System Linux 5.4.56 2020-08-31T23:58:01.816Z [err] gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 2020-08-31T23:58:01.816Z [err] gyp ERR! cwd /config/node-red/node_modules/node-hid 2020-08-31T23:58:01.816Z [err] gyp ERR! node -v v12.18.3 2020-08-31T23:58:01.816Z [err] gyp ERR! node-gyp -v v5.1.0 2020-08-31T23:58:01.816Z [err] gyp ERR! not ok 2020-08-31T23:58:02.341Z [err] npm 2020-08-31T23:58:02.341Z [err] 2020-08-31T23:58:02.341Z [err] ERR! 2020-08-31T23:58:02.341Z [err] 2020-08-31T23:58:02.341Z [err] code 2020-08-31T23:58:02.342Z [err] ELIFECYCLE 2020-08-31T23:58:02.342Z [err] npm 2020-08-31T23:58:02.342Z [err] 2020-08-31T23:58:02.342Z [err] ERR! 2020-08-31T23:58:02.342Z [err] 2020-08-31T23:58:02.342Z [err] errno 2020-08-31T23:58:02.342Z [err] 1 2020-08-31T23:58:02.345Z [err] npm 2020-08-31T23:58:02.345Z [err] 2020-08-31T23:58:02.345Z [err] ERR! 2020-08-31T23:58:02.345Z [err] node-hid@1.3.0 install: prebuild-install || node-gyp rebuild 2020-08-31T23:58:02.345Z [err] npm 2020-08-31T23:58:02.345Z [err] 2020-08-31T23:58:02.345Z [err] ERR! 2020-08-31T23:58:02.346Z [err] Exit status 1 2020-08-31T23:58:02.346Z [err] npm 2020-08-31T23:58:02.346Z [err] 2020-08-31T23:58:02.346Z [err] ERR! 2020-08-31T23:58:02.346Z [err] 2020-08-31T23:58:02.346Z [err] npm 2020-08-31T23:58:02.346Z [err] 2020-08-31T23:58:02.346Z [err] ERR! 2020-08-31T23:58:02.346Z [err] Failed at the node-hid@1.3.0 install script. 2020-08-31T23:58:02.346Z [err] npm 2020-08-31T23:58:02.346Z [err] 2020-08-31T23:58:02.346Z [err] ERR! 2020-08-31T23:58:02.346Z [err] This is probably not a problem with npm. There is likely additional logging output above. 2020-08-31T23:58:02.361Z [err] 2020-08-31T23:58:02.361Z [err] npm ERR! A complete log of this run can be found in: 2020-08-31T23:58:02.361Z [err] npm ERR! /root/.npm/_logs/2020-08-31T23_58_02_357Z-debug.log 2020-08-31T23:58:02.367Z rc=1

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Wink5 commented 4 years ago

Ubuntu (64-bit)

natcl commented 4 years ago

Try running sudo apt-get install build-essential

-- lecaude.com studioimaginaire.com

Le 31 août 2020 à 20:11, Wink5 notifications@github.com a écrit :

 Ubuntu (64-bit)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

MDAR commented 3 years ago

Hi

I'm having the same issue, it just refuses to install on a DietPi - Buster

Node-Red is Version 1.2.9

I have build essentials installed

build-essential is already the newest version (12.6).

Error log looks like this..

Installation of module node-red-contrib-streamdeck failed:
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /mnt/dietpi_userdata/node-red/node_modules/node-hid
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild
npm ERR! prebuild-install WARN install No prebuilt binaries found (target=15.8.0 runtime=node arch=arm64 libc= platform=linux)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@15.8.0 | linux | arm64
npm ERR! gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
npm ERR! gyp http GET https://nodejs.org/download/release/v15.8.0/node-v15.8.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v15.8.0/node-v15.8.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v15.8.0/SHASUMS256.txt
npm ERR! gyp http 200 
Error: Install failed

Do you have any suggestions as to what to try next?


Update


I've just tried to install it onto a different machine, running Ubuntu with Node-Red version 1.1.2 and this is the error log

-----------------------------------------------------------
2021-02-09T16:13:47.654Z Install : node-red-contrib-streamdeck 1.0.1

2021-02-09T16:13:47.739Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix="~" --production node-red-contrib-streamdeck@1.0.1
2021-02-09T16:14:13.020Z [out] 
2021-02-09T16:14:13.020Z [out] > node-hid@1.3.2 install /root/.node-red/node_modules/node-hid
2021-02-09T16:14:13.020Z [out] > prebuild-install || node-gyp rebuild
2021-02-09T16:14:13.020Z [out] 
2021-02-09T16:14:13.837Z [err] prebuild-install
2021-02-09T16:14:13.837Z [err]  WARN install No prebuilt binaries found (target=12.19.0 runtime=node arch=arm libc= platform=linux)
2021-02-09T16:14:16.359Z [err] /bin/sh: 1: pkg-config: not found
2021-02-09T16:14:16.359Z [err] gyp: Call to 'pkg-config libusb-1.0 --cflags-only-I | sed s/-I//g' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
2021-02-09T16:14:16.375Z [err] gyp
2021-02-09T16:14:16.375Z [err]  ERR! 
2021-02-09T16:14:16.375Z [err] configure error 
2021-02-09T16:14:16.376Z [err] gyp
2021-02-09T16:14:16.376Z [err]  ERR! 
2021-02-09T16:14:16.377Z [err] stack Error: `gyp` failed with exit code: 1
2021-02-09T16:14:16.377Z [err] gyp 
2021-02-09T16:14:16.377Z [err] ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
2021-02-09T16:14:16.377Z [err] gyp
2021-02-09T16:14:16.377Z [err]  ERR! stack
2021-02-09T16:14:16.377Z [err]      at ChildProcess.emit (events.js:314:20)
2021-02-09T16:14:16.377Z [err] gyp ERR! 
2021-02-09T16:14:16.377Z [err] stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
2021-02-09T16:14:16.377Z [err] gyp
2021-02-09T16:14:16.378Z [err]  ERR! System Linux 4.14.180-178
2021-02-09T16:14:16.378Z [err] gyp
2021-02-09T16:14:16.378Z [err]  ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2021-02-09T16:14:16.378Z [err] gyp ERR!
2021-02-09T16:14:16.378Z [err]  cwd /root/.node-red/node_modules/node-hid
2021-02-09T16:14:16.378Z [err] gyp ERR! 
2021-02-09T16:14:16.378Z [err] node -v v12.19.0
2021-02-09T16:14:16.378Z [err] gyp
2021-02-09T16:14:16.378Z [err]  ERR! node-gyp -v
2021-02-09T16:14:16.378Z [err]  v5.1.0
2021-02-09T16:14:16.378Z [err] gyp 
2021-02-09T16:14:16.378Z [err] ERR! not ok 
2021-02-09T16:14:17.098Z [err] npm
2021-02-09T16:14:17.098Z [err]  ERR! code ELIFECYCLE
2021-02-09T16:14:17.098Z [err] npm ERR!
2021-02-09T16:14:17.098Z [err]  errno 1
2021-02-09T16:14:17.111Z [err] npm 
2021-02-09T16:14:17.111Z [err] ERR! node-hid@1.3.2 install: `prebuild-install || node-gyp rebuild`
2021-02-09T16:14:17.111Z [err] npm ERR! Exit status 1
2021-02-09T16:14:17.111Z [err] npm
2021-02-09T16:14:17.111Z [err]  ERR! 
2021-02-09T16:14:17.111Z [err] npm 
2021-02-09T16:14:17.112Z [err] ERR! Failed at the node-hid@1.3.2 install script.
2021-02-09T16:14:17.112Z [err] npm 
2021-02-09T16:14:17.112Z [err] ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-02-09T16:14:17.179Z [err] 
2021-02-09T16:14:17.179Z [err] npm ERR! A complete log of this run can be found in:
2021-02-09T16:14:17.179Z [err] npm ERR!     /root/.npm/_logs/2021-02-09T16_14_17_159Z-debug.log
2021-02-09T16:14:17.210Z rc=1
natcl commented 3 years ago

Seems like an upstream package is deprecated, I will have a look soon !

MDAR commented 3 years ago

Seems like an upstream package is deprecated, I will have a look soon !

That's fabulous, thank you so much.

If there is anything I can do to test, please let me know.

natcl commented 3 years ago

I updated the dependencies, can you try by pulling from this repo ? npm install -g natcl/node-red-contrib-streamdeck Let me know if it works, I'll update the package on npm then.

natcl commented 3 years ago

If that doesn't work, I just checked and node-hid doesn't seem to support node 15, please try with node 14 instead.

MDAR commented 3 years ago

I updated the dependencies, can you try by pulling from this repo ? npm install -g natcl/node-red-contrib-streamdeck Let me know if it works, I'll update the package on npm then.

Hi

Thanks for looking into this so quickly.

I tried this command and got this -----

 ─────────────────────────────────────────────────────
 DietPi v6.34.3 : 11:04 - Wed 10/02/21
 ─────────────────────────────────────────────────────
 - Device model : Odroid C2 (aarch64)
 - CPU temp : 38'C : 100'F (Cool runnings)
 - LAN IP : 192.168.178.23 (eth0)
 - MOTD : Pi-hole users, please run "pihole -up" to fix security issues in dnsma                                                                              sq:
          https://pi-hole.net/2021/01/19/pi-hole-ftl-v5-5-released-update-today/
 ─────────────────────────────────────────────────────

 DietPi Team     : MichaIng (lead), Daniel Knight (founder), Joulinar (support)
 Image           : DietPi Core Team (pre-image: Meveric)
 Web             : https://dietpi.com | https://twitter.com/DietPi_
 Donate          : https://dietpi.com/#donate
 DietPi Hosting  : Powered by https://myvirtualserver.com

 dietpi-launcher : All the DietPi programs in one place.
 dietpi-config   : Feature rich configuration tool for your device.
 dietpi-software : Select optimized software for installation.
 htop            : Resource monitor.
 cpu             : Shows CPU information and stats.

root@LiveStream:~# npm install -g natcl/node-red-contrib-streamdeck
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://git                                                                              hub.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/node-red-contrib-streamdeck/node_modul                                                                              es/node-hid
npm ERR! command failed
npm ERR! command sh -c prebuild-install --runtime napi || node-gyp rebuild
npm ERR! prebuild-install WARN install EACCES: permission denied, access '/root/                                                                              .npm'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@15.8.0 | linux | arm64
npm ERR! gyp info find Python using Python version 3.7.3 found at "/usr/bin/pyth                                                                              on3"
npm ERR! gyp WARN EACCES current user ("dietpi") does not have permission to acc                                                                              ess the dev dir "/root/.cache/node-gyp/15.8.0"
npm ERR! gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.                                                                              node-gyp"
npm ERR! gyp http GET https://nodejs.org/download/release/v15.8.0/node-v15.8.0-h                                                                              eaders.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v15.8.0/node-v15.8.0-h                                                                              eaders.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v15.8.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v15.8.0/SHASUMS256.txt
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/nod                                                                              e-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/node-red-contrib-str                                                                              eamdeck/node_modules/node-hid/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/nod                                                                              e-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/tmp/.node-gyp/15.8.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/tmp/.node-gyp/15.8.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/n                                                                              ode_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/tmp/.node-gyp/15.8.0/<(target_a                                                                              rch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/usr/local/lib/node_modules/no                                                                              de-red-contrib-streamdeck/node_modules/node-hid',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Package libusb-1.0 was not found in the pkg-config search path.
npm ERR! Perhaps you should add the directory containing `libusb-1.0.pc'
npm ERR! to the PKG_CONFIG_PATH environment variable
npm ERR! No package 'libusb-1.0' found
npm ERR! gyp: Call to 'pkg-config libusb-1.0 --cflags-only-I | sed s/-I//g' retu                                                                              rned exit status 0 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_module                                                                              s/npm/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:378:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:interna                                                                              l/child_process:290:12)
npm ERR! gyp ERR! System Linux 3.16.85+
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm                                                                              /node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /usr/local/lib/node_modules/node-red-contrib-streamdeck/no                                                                              de_modules/node-hid
npm ERR! gyp ERR! node -v v15.8.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-02-10T11_05_35_508Z-debug.log

2021-02-10T11_05_35_508Z-debug.log

MDAR commented 3 years ago

If that doesn't work, I just checked and node-hid doesn't seem to support node 15, please try with node 14 instead.

I'm sorry, I have no idea what that mean.

hid - Human Interface Device?

and how do I know if it's using node15 or node14?


Okay, so what about this?

 node -v
v15.8.0

So this website lists versions of Node

https://nodejs.org/en/download/releases/

Using information from here, https://stackoverflow.com/questions/47008159/how-to-downgrade-node-version I think I have managed to install 14.15.5

root@LiveStream:~# node -v
v15.8.0
root@LiveStream:~# npm install -g n

added 1 package, and audited 2 packages in 3s

found 0 vulnerabilities
root@LiveStream:~# n 14.15.5
  installing : node-v14.15.5
       mkdir : /usr/local/n/versions/node/14.15.5
       fetch : https://nodejs.org/dist/v14.15.5/node-v14.15.5-linux-arm64.tar.xz
   installed : v14.15.5 (with npm 6.14.11)
root@LiveStream:~# n use 14.15.5
Welcome to Node.js v14.15.5.
Type ".help" for more information.
> x
Uncaught ReferenceError: x is not defined
>
(To exit, press Ctrl+C again or Ctrl+D or type .exit)
>
root@LiveStream:~# node -v
v14.15.5

Running this command npm install -g natcl/node-red-contrib-streamdeck

returned this ---

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

> node-hid@2.1.1 install /usr/local/lib/node_modules/node-red-contrib-streamdeck/node_modules/node-hid
> prebuild-install --runtime napi || node-gyp rebuild

prebuild-install WARN install EACCES: permission denied, access '/root/.npm'
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/14.15.5"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/node-red-contrib-streamdeck/node_modules/node-hid/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/node-red-contrib-streamdeck/node_modules/node-hid/.node-gyp'
gyp ERR! System Linux 3.16.85+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/node-red-contrib-streamdeck/node_modules/node-hid
gyp ERR! node -v v14.15.5
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-hid@2.1.1 install: `prebuild-install --runtime napi || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-hid@2.1.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-02-10T11_21_09_439Z-debug.log

2021-02-10T11_21_09_439Z-debug.log

natcl commented 3 years ago

There seems to be something wrong with your permissions, try sudo before the npm command.

MDAR commented 3 years ago

There seems to be something wrong with your permissions, try sudo before the npm command.

Unfortunately, no change there

root@LiveStream:~# sudo npm install -g natcl/node-red-contrib-streamdeck
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

> node-hid@2.1.1 install /usr/local/lib/node_modules/node-red-contrib-streamdeck/node_modules/node-hid
> prebuild-install --runtime napi || node-gyp rebuild

prebuild-install WARN install EACCES: permission denied, access '/root/.npm'
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/14.15.5"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/node-red-contrib-streamdeck/node_modules/node-hid/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/node-red-contrib-streamdeck/node_modules/node-hid/.node-gyp'
gyp ERR! System Linux 3.16.85+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/node-red-contrib-streamdeck/node_modules/node-hid
gyp ERR! node -v v14.15.5
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-hid@2.1.1 install: `prebuild-install --runtime napi || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-hid@2.1.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-02-10T13_55_11_107Z-debug.log
root@LiveStream:~#

Is it this line that is hinting at the issue?

gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/14.15.5"

natcl commented 3 years ago

Sadly this seems to be an issue with node/npm on your computer and not the node itself. Perhaps look at these: https://github.com/nodejs/node-gyp/issues/1236

I tried installing it on both arm and x86 linux and it works fine over here.

MDAR commented 3 years ago

Sadly this seems to be an issue with node/npm on your computer and not the node itself. Perhaps look at these: nodejs/node-gyp#1236

I tried installing it on both arm and x86 linux and it works fine over here.

Right...

Thanks for helping me get this far.

At least I have something to go looking for now.

Best wishes, Stuart

MDAR commented 3 years ago

Sadly this seems to be an issue with node/npm on your computer and not the node itself. Perhaps look at these: nodejs/node-gyp#1236

I tried installing it on both arm and x86 linux and it works fine over here.

It looks like the script is trying to get into the folder for Node 4.15.5 which just doesn't exist on this machine.

I tried to install it and got a 404 error.

root@LiveStream:~# n 14.5.5
  installing : node-v14.5.5
curl: (22) The requested URL returned error: 404

  Error: download preflight failed for '14.5.5' (https://nodejs.org/dist/v14.5.5/node-v14.5.5-linux-arm64.tar.xz)

I've installed Node 4.15.5 but it doesn't seem to have installed the folder that is called during the script

cd /root/.cache/node-gyp/14.15.5
bash: cd: /root/.cache/node-gyp/14.15.5: No such file or directory

Likewise with the alternative folder

/usr/local/lib/node_modules/node-red-contrib-streamdeck/node_modules/node-hid/.node-gyp

The only thing I can think of is that I'm running DietPi, which doesn't use the standard install script for Node-RED.

I will try swapping to Ubuntu and see if that is any better / different.

Thanks for your help.

MDAR commented 3 years ago

Hi

I have seen that you have updated something to make your StreamDeck node now at version 1.0.2

This wasn't available from my palette manager, so I have updated Node-RED to V1.2.9

Trying to install your node from the palette manager failed, so I tried the global install again, but got the follow error again.

As per the last message, I will try to run a Ubuntu image on this Odroid C2 and see what happens.

Thanks in advance for your support and efforts.

As you say that it is working fine with ARM and x86 for you, would you be kind enough to elaborate on which systems these are on? For example, I'm trying to run this on a HardKernel Odroid C2 which uses a Amlogic S905 (ARM® Cortex®-A53(ARMv8) 1.5Ghz quad core CPU), with 2Gbyte DDR3 SDRAM and ARM Mali™-450 MP3 GPU (OpenGL ES 2.0/1.1 for Linux and Android), running DietPi v6.34.3

Using username "root".

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
 ─────────────────────────────────────────────────────
 DietPi v6.34.3 : Update available
 ─────────────────────────────────────────────────────
 - Device model : Odroid C2 (aarch64)
 - CPU temp : 41'C : 105'F (Optimal temperature)
 - LAN IP : 192.168.178.23 (eth0)
 - MOTD : Enjoy our new DietPi v7.0 <3
 ─────────────────────────────────────────────────────

 DietPi Team     : MichaIng (lead), Daniel Knight (founder), Joulinar (support)
 Image           : DietPi Core Team (pre-image: Meveric)
 Web             : https://dietpi.com | https://twitter.com/DietPi_
 Donate          : https://dietpi.com/#donate
 DietPi Hosting  : Powered by https://myvirtualserver.com

 dietpi-update   : Run now to update DietPi from v6.34.3 to v6.35.0.

 dietpi-launcher : All the DietPi programs in one place.
 dietpi-config   : Feature rich configuration tool for your device.
 dietpi-software : Select optimized software for installation.
 htop            : Resource monitor.
 cpu             : Shows CPU information and stats.

root@LiveStream:/dev# lsusb
Bus 001 Device 003: ID 0fd9:0063 Elgato Systems GmbH
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@LiveStream:/dev# nano /etc/udev/rules.d/50-elgato.rules

root@LiveStream:/dev# sudo udevadm control --reload-rules

root@LiveStream:/dev# npm install -g node-red-contrib-streamdeck

npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/node-red-contrib-streamdeck/node_modules/node-hid
npm ERR! command failed
npm ERR! command sh -c prebuild-install --runtime napi || node-gyp rebuild
npm ERR! prebuild-install WARN install EACCES: permission denied, access '/root/.npm'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@15.10.0 | linux | arm64
npm ERR! gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
npm ERR! gyp WARN EACCES current user ("dietpi") does not have permission to access the dev dir "/root/.cache/node-gyp/15.10.0"
npm ERR! gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp"
npm ERR! gyp http GET https://nodejs.org/download/release/v15.10.0/node-v15.10.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v15.10.0/node-v15.10.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v15.10.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v15.10.0/SHASUMS256.txt
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/node-red-contrib-streamdeck/node_modules/node-hid/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/tmp/.node-gyp/15.10.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/tmp/.node-gyp/15.10.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/tmp/.node-gyp/15.10.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/usr/local/lib/node_modules/node-red-contrib-streamdeck/node_modules/node-hid',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Package libusb-1.0 was not found in the pkg-config search path.
npm ERR! Perhaps you should add the directory containing `libusb-1.0.pc'
npm ERR! to the PKG_CONFIG_PATH environment variable
npm ERR! No package 'libusb-1.0' found
npm ERR! gyp: Call to 'pkg-config libusb-1.0 --cflags-only-I | sed s/-I//g' returned exit status 0 while in binding.gyp. while trying to load                                binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:378:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 3.16.85+
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /usr/local/lib/node_modules/node-red-contrib-streamdeck/node_modules/node-hid
npm ERR! gyp ERR! node -v v15.10.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-03-02T12_26_37_753Z-debug.log
root@LiveStream:/dev#
MichaIng commented 3 years ago

[err] /bin/sh: 1: pkg-config: not found

Is pkg-config actually installed? apt install pkg-config

And/or, since it looks for the libusb-1.0 package: apt install libusb-1.0-0

But note the following:

With recent DietPi v7.0 release, we switched the Node-RED install to be a local one right from the start. So all initially installed modules are located at /mnt/dietpi_userdata/node-red, giving the service user (hence web interface) full control over the pre-installed core modules as well, i.e. it can update and uninstall those. This doesn't affect existing installs, just reinstalls and fresh installs for Node-RED through our dietpi-software tool.

Consequently, this means that you should do the following when installing Node-RED plugins:

cd /mnt/dietpi_userdata/node-red
sudo -u nodered npm i natcl/node-red-contrib-streamdeck

Again, from all I know a global module can be used by the web interface just as good, but it cannot update or uninstall it, e.g. via the palette manager.

MDAR commented 3 years ago

@MichaIng

Is pkg-config actually installed? apt install pkg-config

yes, that is installed

But WOW... 😄

What a difference that apt install libusb-1.0-0 made to the install

root@LiveStream:/dev# npm install -g node-red-contrib-streamdeck
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

added 138 packages, and audited 139 packages in 1m

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

found 0 vulnerabilities

I now have the two StreamDeck nodes in the palette

image

I've just got to work out what to do with them,,,,

@MichaIng @natcl Thank you gentlemen 😄

MichaIng commented 3 years ago

Great! The readme seems to explain those quite well: https://github.com/natcl/node-red-contrib-streamdeck#usage

Just to verify that it works as local module as well, does the following work fine as well?

cd /mnt/dietpi_userdata/node-red
sudo -u nodered npm i node-red-contrib-streamdeck

The Node-RED instance will then use the local instance, hence theoretically the global one could be uninstalled:

npm r -g node-red-contrib-streamdeck

Generally I would recommend to use the Node-RED web UI palette manager to search and install plugins/modules, which guarantees it can manage them as intended 🙂.

natcl commented 3 years ago

I'll update the readme to make it clear libusb is needed !

MichaIng commented 3 years ago

On Debian and Ubuntu, the package is btw called libusb-1.0-0 with the trailing -0. Even on light DietPi images, it is actually pre-installed together with usbutils, but good to be explicit with dependencies 🙂.

@MDAR the library was sufficient, the development headers libusb-1.0-0-dev were not required right?

MDAR commented 3 years ago

On Debian and Ubuntu, the package is btw called libusb-1.0-0 with the trailing -0. Even on light DietPi images, it is actually pre-installed together with usbutils, but good to be explicit with dependencies .

@MDAR the library was sufficient, the development headers libusb-1.0-0-dev were not required right?

Thanks for taking so much of an interest and providing this support.

I can confirm that all I needed to do was to run apt install libusb-1.0-0 before tryuing to install the nodes.

Am I brave enough to remove it and try from the palette manager.....

No. I don't think I am..

But only becuase of that golden rule... "If it ain't broke, don't fix it"

It's working now, so all I need to do is work out all the combinations for the out node to get pretty pictures and changing colours.

@natcl

Could you make a point in the ReadMe that you have gone to the trouble of making a great example flow?

(I only found it because I went looking before asking....)

natcl commented 3 years ago

Good idea I’ll put a screenshot !

-- lecaude.com studioimaginaire.com

Le 2 mars 2021 à 12:11, MDAR Ltd notifications@github.com a écrit :

 On Debian and Ubuntu, the package is btw called libusb-1.0-0 with the trailing -0. Even on light DietPi images, it is actually pre-installed together with usbutils, but good to be explicit with dependencies .

@MDAR the library was sufficient, the development headers libusb-1.0-0-dev were not required right?

Thanks for taking so much of an interest and providing this support.

I can confirm that all I needed to do was to run apt install libusb-1.0-0 before tryuing to install the nodes.

Am I brave enough to remove it and try from the palette manager.....

No. I don't think I am..

But only becuase of that golden rule... "If it ain't broke, don't fix it"

It's working now, so all I need to do is work out all the combinations for the out node to get pretty pictures and changing colours.

@natcl

Could you make a point in the ReadMe that you have gone to the trouble of making a great example flow?

(I only found it because I went looking before asking....)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

MDAR commented 3 years ago

Good idea I’ll put a screenshot !

Yeah, make it a BIG picture for people like me who miss the obvious.

I've had some fun playing with your node already, so thank you so much.

My next step is working out how to correctly size images for buttons and the whole panel, but so far... it's great.

@natcl Thank you so much for making this all possible

MDAR commented 3 years ago

Slightly off topic, but if anyone is following this thread this might be useful.

According to Elgato support, the button image resolution is 72px by 72px

https://help.elgato.com/hc/en-us/articles/360028237271-Elgato-Stream-Deck-Customizing-Key-Icons#:~:text=You%20can%20configure%20your%20actions,Use%2072%20x%2072%20pixels%20.

There is mention of GIF support, so I'll experiment to see if I can host small gifs on my machine and load them into the StreamDeck

and in a hunt for information about the whole panel image size, I found this that suggests there is a 16PX gap between buttons, if I want a quick and dirty way to load one image as a setup

https://www.reddit.com/r/ElgatoGaming/comments/6bq6ld/stream_deck_pixel_width_of_space_between_buttons/

MDAR commented 3 years ago

Good idea I’ll put a screenshot !

Yeah, make it a BIG picture for people like me who miss the obvious.

I've had some fun playing with your node already, so thank you so much.

My next step is working out how to correctly size images for buttons and the whole panel, but so far... it's great.

@natcl Thank you so much for making this all possible

@natcl

In your honor, I have created this small tribute as a way to show that I have understood what you have created.

[
    {
        "id": "8c50df4c.4852b",
        "type": "change",
        "z": "439b2003.a458b8",
        "name": "randomColor",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "{\t   'command': 'fillColor',\t   'value': [\t       $random() * 255 ~> $floor(),\t       $random() * 255 ~> $floor(),\t       $random() * 255 ~> $floor()\t   ]\t\t}",
                "tot": "jsonata"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 530,
        "y": 300,
        "wires": [
            [
                "62f51b11.c2584c"
            ]
        ]
    },
    {
        "id": "f05fb6b8.20ffe8",
        "type": "change",
        "z": "439b2003.a458b8",
        "name": "Button 0 to Blue",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "{\t   'command': 'fillColor',\t   'value': [\t    0,\t    0,\t    255\t   ]\t\t}",
                "tot": "jsonata"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "0",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 540,
        "y": 180,
        "wires": [
            [
                "62f51b11.c2584c"
            ]
        ]
    },
    {
        "id": "a6501297.8b281",
        "type": "change",
        "z": "439b2003.a458b8",
        "name": "Button 1 to White",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "{\t   'command': 'fillColor',\t   'value': [\t    255,\t    255,\t    255\t   ]\t\t}",
                "tot": "jsonata"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "1",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 550,
        "y": 220,
        "wires": [
            [
                "62f51b11.c2584c"
            ]
        ]
    },
    {
        "id": "bf02dd77.a7105",
        "type": "change",
        "z": "439b2003.a458b8",
        "name": "Button 2 to Red",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "{\t   'command': 'fillColor',\t   'value': [\t    255,\t    0,\t    0\t   ]\t\t}",
                "tot": "jsonata"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "2",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 540,
        "y": 260,
        "wires": [
            [
                "62f51b11.c2584c"
            ]
        ]
    },
    {
        "id": "6581fd6.cf47c04",
        "type": "switch",
        "z": "439b2003.a458b8",
        "name": "5",
        "property": "topic",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "5",
                "vt": "num"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 230,
        "y": 140,
        "wires": [
            [
                "f05fb6b8.20ffe8",
                "a6501297.8b281",
                "bf02dd77.a7105",
                "83faf560.5bc5c8",
                "3c99a08e.f34c2",
                "2837372f.804348"
            ],
            [
                "8c50df4c.4852b"
            ]
        ]
    },
    {
        "id": "83faf560.5bc5c8",
        "type": "change",
        "z": "439b2003.a458b8",
        "name": "Button 3 to Blue",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "{\t   'command': 'fillColor',\t   'value': [\t    0,\t    0,\t    255\t   ]\t\t}",
                "tot": "jsonata"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "3",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 920,
        "y": 160,
        "wires": [
            [
                "62f51b11.c2584c"
            ]
        ]
    },
    {
        "id": "3c99a08e.f34c2",
        "type": "change",
        "z": "439b2003.a458b8",
        "name": "Button 4 to White",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "{\t   'command': 'fillColor',\t   'value': [\t    255,\t    255,\t    255\t   ]\t\t}",
                "tot": "jsonata"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "4",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 930,
        "y": 200,
        "wires": [
            [
                "62f51b11.c2584c"
            ]
        ]
    },
    {
        "id": "2837372f.804348",
        "type": "change",
        "z": "439b2003.a458b8",
        "name": "Button 5 to Red",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "{\t   'command': 'fillColor',\t   'value': [\t    255,\t    0,\t    0\t   ]\t\t}",
                "tot": "jsonata"
            },
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "5",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 920,
        "y": 240,
        "wires": [
            [
                "62f51b11.c2584c"
            ]
        ]
    },
    {
        "id": "76d10e7e.807768",
        "type": "streamdeck-in",
        "z": "439b2003.a458b8",
        "name": "",
        "x": 140,
        "y": 80,
        "wires": [
            [
                "563716af.4e39d",
                "6581fd6.cf47c04"
            ]
        ]
    },
    {
        "id": "563716af.4e39d",
        "type": "debug",
        "z": "439b2003.a458b8",
        "name": "{     \"payload\": \"pressed\",     \"topic\": 0 }",
        "active": true,
        "tosidebar": false,
        "console": false,
        "tostatus": true,
        "complete": "'key ' & topic & ' state ' & payload",
        "targetType": "jsonata",
        "statusVal": "'key ' & topic & ' state ' & payload",
        "statusType": "auto",
        "x": 600,
        "y": 80,
        "wires": []
    },
    {
        "id": "62f51b11.c2584c",
        "type": "streamdeck-out",
        "z": "439b2003.a458b8",
        "name": "",
        "x": 1340,
        "y": 440,
        "wires": []
    }
]
natcl commented 3 years ago

Hehe Nice ! glad you are enjoying it :) For GIFs it doesn't support it natively but it should be possible to use a library that supports GIFs and then send raw frames to the keys.

MDAR commented 3 years ago

@MichaIng

I'm not sure what has happened, but my palette manager has vanished and any command line NPM instructions come back with

root@LiveStream:~# npm
node:internal/modules/cjs/loader:926
  throw err;
  ^

Error: Cannot find module 'readable-stream'
Require stack:
- /usr/local/lib/node_modules/npm/node_modules/are-we-there-yet/tracker-stream.js
- /usr/local/lib/node_modules/npm/node_modules/are-we-there-yet/tracker-group.js
- /usr/local/lib/node_modules/npm/node_modules/are-we-there-yet/index.js
- /usr/local/lib/node_modules/npm/node_modules/npmlog/log.js
- /usr/local/lib/node_modules/npm/lib/cli.js
- /usr/local/lib/node_modules/npm/bin/npm-cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:923:15)
    at Function.Module._load (node:internal/modules/cjs/loader:768:27)
    at Module.require (node:internal/modules/cjs/loader:995:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/are-we-there-yet/tracker-stream.js:3:14)
    at Module._compile (node:internal/modules/cjs/loader:1091:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1120:10)
    at Module.load (node:internal/modules/cjs/loader:971:32)
    at Function.Module._load (node:internal/modules/cjs/loader:812:14)
    at Module.require (node:internal/modules/cjs/loader:995:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/node_modules/npm/node_modules/are-we-there-yet/tracker-stream.js',
    '/usr/local/lib/node_modules/npm/node_modules/are-we-there-yet/tracker-group.js',
    '/usr/local/lib/node_modules/npm/node_modules/are-we-there-yet/index.js',
    '/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js',
    '/usr/local/lib/node_modules/npm/lib/cli.js',
    '/usr/local/lib/node_modules/npm/bin/npm-cli.js'
  ]
}

I'm tempted to pop in a new eMMC card and start from a fresh slate, unless you have a trick up your sleeve?

FYI

The status of node-red comes back as

Mar 03 17:48:38 LiveStream systemd[1]: Started Node-RED (DietPi).
Mar 03 17:48:40 LiveStream node-red[10285]: 3 Mar 17:48:40 - [info]
Mar 03 17:48:40 LiveStream node-red[10285]: Welcome to Node-RED
Mar 03 17:48:40 LiveStream node-red[10285]: ===================
Mar 03 17:48:40 LiveStream node-red[10285]: 3 Mar 17:48:40 - [info] Node-RED version: v1.2.9
Mar 03 17:48:40 LiveStream node-red[10285]: 3 Mar 17:48:40 - [info] Node.js  version: v15.10.0
Mar 03 17:48:40 LiveStream node-red[10285]: 3 Mar 17:48:40 - [info] Linux 3.16.85+ arm64 LE
Mar 03 17:48:40 LiveStream node-red[10285]: 3 Mar 17:48:40 - [info] Palette editor disabled : npm command not found
Mar 03 17:48:40 LiveStream node-red[10285]: 3 Mar 17:48:40 - [info] Loading palette nodes
MichaIng commented 3 years ago

Looks like npm is broken somehow. Did you check for file system errors?

dmesg -l emerg,alert,crit,err

If nothing related pops up there, try to reinstall Node:

dietpi-software reinstall 9
MDAR commented 3 years ago

dietpi-software reinstall 9

Thanks Michal

That did the trick.