Closed G47S53 closed 2 years ago
Yes, are you sure you followed the instructions for linux in the readme ?
Thanks for your reply. There were missing files in my Rpi.
I execute: sudo apt-get install libusb-1.0-0-dev sudo apt-get install libudev-dev
With that, it's works fine.
On a pi it says "Error opening Stream Deck device Error: No stream decks are connected". This is on the node-red start.
I did create the rules file and reloaded.
And you installed libusb ?
yes
Error opening Stream Deck device Error: No Stream Decks are connected.
at openStreamDeck (/home/joe/.node-red/node_modules/elgato-stream-deck/dist/index.js:70:19)
at streamDeckInit (/home/joe/.node-red/node_modules/node-red-contrib-streamdeck/streamdeck.js:9:22)
at new StreamDeckOut (/home/joe/.node-red/node_modules/node-red-contrib-streamdeck/streamdeck.js:39:5)
at Object.createNode (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/util.js:87:27)
at Flow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:206:48)
at start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/index.js:371:33)
Is there a device that I should be looking for? For instance, there are no USB devices in /dev
Also, I am trying it with a pi zero W as I was hoping to just hide it in the Deck's stand. I do not think it is the issue but I will try a different Pi just to make sure. The Pi W does reboot when I plug the Deck in even though I am running it with a 3A power supply.
What is the output of lsusb on your device with the Streamdeck connected?
Bus 001 Device 002: ID 0fd9:0080 Elgato Systems GmbH Stream Deck MK.2
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Seems like there was an update in the upstream library to support the mk2. I will update the node-red node today and we'll see if it fixes the issue.
Cool. I am looking at the code right now. But now knowing the structure I cannot locate what needs to be changed.
If all goes well it should simply be bumping the elgato-streamdeck version in package.json. Hopefully they’re won’t be breaking changes.
-- lecaude.com studioimaginaire.com
Le 12 déc. 2021 à 10:15, Joe Morris @.***> a écrit :
Cool. I am looking at the code right now. But now knowing the structure I cannot locate what needs to be changed.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
LOL, sounds good.
Can you try installing from git and tell me if it works ? If so I'll publish a new package:
npm install -g natcl/node-red-contrib-streamdeck
it cant find the file
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -2
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/natcl/node-red-contrib-streamdeck.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
Oh, you need to install git: sudo apt-get install git
-- lecaude.com studioimaginaire.com
Le 12 déc. 2021 à 09:58, Joe Morris @.***> a écrit :
Bus 001 Device 002: ID 0fd9:0080 Elgato Systems GmbH Stream Deck MK.2 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
haha, sorry. that is funny. I had just assumed it was installed. I will report back soon...
Sorry, I am getting a build error. I am also running it with Sudo
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.18.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp"
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/node-red-contrib-streamdeck/node_modules/node-hid/build'
gyp ERR! System Linux 5.10.63+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/node-red-contrib-streamdeck/node_modules/node-hid
gyp ERR! node -v v14.18.1
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
Do I really want to be installing it globally?
getting closer. I installed it non-globally and am getting this error when trying to use it in NR:
Error opening Stream Deck device TypeError: cannot open device with path 0001:0002:00
at new HID (/home/joe/.node-red/node_modules/node-hid/nodehid.js:49:17)
at new StreamDeckBase (/home/joe/.node-red/node_modules/node-red-contrib-streamdeck/node_modules/elgato-stream-deck/dist/models/base.js:13:23)
at new StreamDeckGen2Base (/home/joe/.node-red/node_modules/node-red-contrib-streamdeck/node_modules/elgato-stream-deck/dist/models/base-gen2.js:10:1)
at new StreamDeckOriginalMK2 (/home/joe/.node-red/node_modules/node-red-contrib-streamdeck/node_modules/elgato-stream-deck/dist/models/original-mk2.js:16:9)
at openStreamDeck (/home/joe/.node-red/node_modules/node-red-contrib-streamdeck/node_modules/elgato-stream-deck/dist/index.js:84:12)
at streamDeckInit (/home/joe/.node-red/node_modules/node-red-contrib-streamdeck/streamdeck.js:9:22)
at new StreamDeckIn (/home/joe/.node-red/node_modules/node-red-contrib-streamdeck/streamdeck.js:25:5)
at Object.createNode (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/util.js:87:27)
at Flow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:206:48)
at start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/index.js:371:33)
Locally works fine too. Perhaps a permission issue ? Can you try starting Node-RED with sudo ?
I run it using systemd. So I normally run it with
sudo systemctl start nodered.service
but I just tried
Sudo node-red-start
same issue
Hmm I'll need to upgrade to version 5 of the library but that might take a little more time as they changed their API. Hopefully that can make it work for you... will keep you updated.
cool. thanks for the help!!
Can you try this version ?
npm install --save natcl/node-red-contrib-streamdeck#mk2support
Same problem. I noticed that the package.json still called for elgato-stream-deck 4.0.1. Should that be 5.1.2? Also, the jpeg-turbo current version is 1.1.1. Should that be updated as well?
I program in node.js but I have never created any packages so I am unsure how to change it or I would try.
Hmm it seems like it didn't install the correct branch, let me check.
do i need to do an uninstall first?
That would probably be better yes.
-- lecaude.com studioimaginaire.com
Le 13 déc. 2021 à 09:50, Joe Morris @.***> a écrit :
do i need to do an uninstall first?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
ok, trying again...
ok, i uninstalled and now am getting this error
npm WARN checkPermissions Missing write access to /home/joe/.node-red/node_modules/elgato-stream-deck
npm ERR! code ELOOP
npm ERR! syscall access
npm ERR! path /home/joe/.node-red/node_modules/elgato-stream-deck
npm ERR! errno -40
npm ERR! ELOOP: too many symbolic links encountered, access '/home/joe/.node-red/node_modules/elgato-stream-deck'
Seems like something went wrong with the permissions, perhaps something was installed with sudo ? Can you try deleting the folder before ?
-- lecaude.com studioimaginaire.com
Le 13 déc. 2021 à 09:57, Joe Morris @.***> a écrit :
ok, i uninstalled and now am getting this error
npm WARN checkPermissions Missing write access to /home/joe/.node-red/node_modules/elgato-stream-deck npm ERR! code ELOOP npm ERR! syscall access npm ERR! path /home/joe/.node-red/node_modules/elgato-stream-deck npm ERR! errno -40 npm ERR! ELOOP: too many symbolic links encountered, access '/home/joe/.node-red/node_modules/elgato-stream-deck' — You are receiving this because you were assigned. Reply to this email directly, view it on GitHub, or unsubscribe.
I did try deleting all 3 folders. There is an elgato-stream-deck and an @elgato-stream-deck. Plus your contrib.
Also, every folder in node_modules is owned by me and has the same mod settings
Hmm could you try in a new local folder to see if you get the same issue ?
-- lecaude.com studioimaginaire.com
Le 13 déc. 2021 à 10:02, Joe Morris @.***> a écrit :
Also, every folder in node_modules is owned by me and has the same mod settings
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub, or unsubscribe.
sure
ok, it installed with this warning
> prebuild-install -r napi || cmake-js compile --target jpegturbo
npm WARN saveError ENOENT: no such file or directory, open '/home/joe/test/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/joe/test/package.json'
npm WARN test No description
npm WARN test No repository field.
npm WARN test No README data
npm WARN test No license field.
+ node-red-contrib-streamdeck@1.0.2
added 202 packages from 256 contributors and audited 202 packages in 432.508s
If I can ignore the warning I will reburn the SD card and start over rather than trying to figure out the link error. This is the only purpose for this pi W.
Also, FYI, the install did not create an elgato-stream-deck. Only the @ version of it.
That’s normal, the package was renamed. The log seems to say it worked, if you install node-red too in that folder and start node-red with npx node-red -v -u . Does the node work now ?
-- lecaude.com studioimaginaire.com
Le 13 déc. 2021 à 10:19, Joe Morris @.***> a écrit :
Also, FYI, the install did not create an elgato-stream-deck. Only the @ version of it.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub, or unsubscribe.
I did a full reinstall. Still getting error. I also did verify that the package.json is correct
Error opening Stream Deck device TypeError: cannot open device with path 0001:0002:00
at new HID (/home/joe/.node-red/node_modules/node-hid/nodehid.js:49:17)
at new NodeHIDDevice (/home/joe/.node-red/node_modules/@elgato-stream-deck/node/dist/device.js:13:23)
at openStreamDeck (/home/joe/.node-red/node_modules/@elgato-stream-deck/node/dist/index.js:73:20)
at streamDeckInit (/home/joe/.node-red/node_modules/node-red-contrib-streamdeck/streamdeck.js:10:24)
at Object.<anonymous> (/home/joe/.node-red/node_modules/node-red-contrib-streamdeck/streamdeck.js:20:1)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
If it helps, the device open address is 0001:0002:00 from the error
The result from lsusb is Bus 001 Device 002: ID 0fd9:0080
Hmm, best thing would be that you raise an issue here:
https://github.com/julusian/node-elgato-stream-deck
Seems like the upstream library still has issues with mk2 even if they say it's supported...
ok, will do
Thanks for your help. Here is all of the info that I have gathered and tried. In the elgato-stream-deck they set the driver type to libusb with a warning:
* The original StreamDeck uses packet sizes too large for the hidraw driver which is
* the default on linux. https://github.com/node-hid/node-hid/issues/249
*/
HID.setDriverType('libusb');
If I do two things I can get it working. I needed to 1) chmod /dev/hidraw0 to 666 and 2) comment out the line in elgato-stream-deck that sets the device type. At this point the device will open and I can see data coming from it. But I was concerned about the warning in elgate-stream-deck. So I tried to install node-hib@0.5.7 as documented in the above issue and got tons of errors. Too many to mention. So I then tried to build node-hib with the --driver=libusb. I had to install:
install libudev-dev
install libusb-1.0-0-dev
install libusb-1.0-0
to make that build work. But it did not solve the original issue. Is the --driver option still relevant?
So for now I am going to try and work with the above solution that is working using hidraw. Hopefully I will not run into the packet size issue.
update: After much effort I believe it may be working. The build instructions for node-hid were incorrect. After building and using the MK2 release I am getting some results. Let me do a few more days of testing and I will confirm.
Another update: If I send the output node a message that causes any sort of error I then constantly get an error response back of "Stream Deck connection issue". The only way I have found to resolve that is to restart node-red.
I assume that’s with the new branch ? If so there’s still more work to do to make it more stable as the whole API is now promise based which changes some of the logic.
-- lecaude.com studioimaginaire.com
Le 16 déc. 2021 à 11:53, Joe Morris @.***> a écrit :
Another update: If I send the output node a message that causes any sort of error I then constantly get an error response back of "Stream Deck connection issue". The only way I have found to resolve that is to restart node-red.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.
Yes, with the new branch. The current main branch would not work at all.
I would be more than happy to continue to help you with the new branch if you need it.
Sure :) Let me just clean up the mess I did last week first :p
-- lecaude.com studioimaginaire.com
Le 16 déc. 2021 à 12:47, Joe Morris @.***> a écrit :
Yes, with the new branch. The current main branch would not work at all.
I would be more than happy to continue to help you with the new branch if you need it.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.
Hello,
this node is a good idea, but I can't install it on raspberry. Is it compatible with an ARM architecture?
Best regards