natcl / node-red-contrib-streamdeck

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

Raspberry (or other arm) compatibility? #1

Closed G47S53 closed 2 years ago

G47S53 commented 4 years ago

Hello,

this node is a good idea, but I can't install it on raspberry. Is it compatible with an ARM architecture?

Best regards

jmorris644 commented 2 years ago

FYI, I can do a pull if you wish, but you need to add the following to the docs.

SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0080", MODE:="666", GROUP="plugdev"
natcl commented 2 years ago

Can you try pulling my branch again ? I believe I fixed the issue with the out node, if it this doesn't work, let me know what command you are executing that fails. I also updated the readme.

jmorris644 commented 2 years ago

I uninstalled node-red-contrib-streamdeck, node-hid, and elgato-streamdeck. I then installed the MK2 version of streamdeck. Restarted node-red. It cannot access the device on startup.

natcl commented 2 years ago

hmm but is this related to the tweaks you had to do to node-hid ?

jmorris644 commented 2 years ago

No. I don't think so. Node-hid did not have a pre-built binary for ubuntu/arm8. And their build instructions were in error. Once we figured that out then node-hid does a build on install.

natcl commented 2 years ago

Ok what error are you getting now ? It seems to work fine here with my mk1

jmorris644 commented 2 years ago

I am rebooting again, by the rules that I have created it should be creating a /dev/hidraw0 and it is not. So something is going funky with the rules, I think. [the reboot did not help]

Here is what I have:

SUBSYSTEM=="input", GROUP="input", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0080", MODE:="666", GROUP="plugdev"
KERNAL=="hidraw*", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0080", MODE:="0666", GROUP="plugdev"
natcl commented 2 years ago

Shouldn't it be KERNEL and not KERNAL ?

jmorris644 commented 2 years ago

haha, funny. Yes, it should be. I changed it and reloaded but it still did not work. Hmmm.

natcl commented 2 years ago

but you were able to make it work previously right ?

jmorris644 commented 2 years ago

yes, last night. And my lsusb looks good too:

Bus 001 Device 005: ID 0fd9:0080 Elgato Systems GmbH
Bus 001 Device 004: ID 0424:7800 Microchip Technology, Inc. (formerly SMSC)
Bus 001 Device 003: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
jmorris644 commented 2 years ago

But by working, very intermittently.

jmorris644 commented 2 years ago

here is the specific error text when starting NR:

Initialiazing Stream Deck...
Initialiazing Stream Deck...
Error opening Stream Deck device TypeError: cannot open device with path 0001:0005: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:32)
    at new StreamDeckIn (/home/joe/.node-red/node_modules/node-red-contrib-streamdeck/streamdeck.js:26:7)
    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)

I also did a udevadm monitor when I started NR. Here is that output:

KERNEL[948.200708] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:0FD9:0080.0003/input/input2/event0 (input)
UDEV  [948.212769] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:0FD9:0080.0003/input/input2/event0 (input)
KERNEL[948.216457] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:0FD9:0080.0003/input/input2 (input)
KERNEL[948.216646] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:0FD9:0080.0003/hidraw/hidraw0 (hidraw)
KERNEL[948.216777] unbind   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:0FD9:0080.0003 (hid)
KERNEL[948.216913] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:0FD9:0080.0003 (hid)
KERNEL[948.217046] unbind   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
UDEV  [948.223590] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:0FD9:0080.0003/input/input2 (input)
UDEV  [948.227171] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:0FD9:0080.0003/hidraw/hidraw0 (hidraw)
UDEV  [948.233434] unbind   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:0FD9:0080.0003 (hid)
UDEV  [948.238041] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:0FD9:0080.0003 (hid)
UDEV  [948.242965] unbind   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
natcl commented 2 years ago

Hmm from what I see it seems the Stream Deck init is happening 2 times, I'm not sure why as on my system it's doing it only once. Can you try with a flow that has only the input or only the output ?

jmorris644 commented 2 years ago

I had 2 flows that used the in and out nodes.

Also, i ran the show-devices in the nod-hid/src dir and it returned an empty array. I unplugged the MK2 and plugged it back in. I now am getting the MK2 in the array.

It is starting up correctly now.

jmorris644 commented 2 years ago

I added a 2nd IN node and am getting the open error again on NR start

I deleted the 2nd IN node and added a 2nd OUT node. NR started fine.

hope that helps.

natcl commented 2 years ago

I was able to reproduce on my side with 2 in nodes. In the mean time can you use a single in node and use link nodes for you other flows ?

jmorris644 commented 2 years ago

of course! It is NR afterall. :)

jmorris644 commented 2 years ago

LOL, want to hear something really funny!

I was doing some debugging because the images were not showing on the buttons that I was telling it to show on. Now, to my excuse, I was only using symbols as my images.

I finally figured out that I had the deck upside down. :) HAHA

natcl commented 2 years ago

Haha that doesn't help :)

jmorris644 commented 2 years ago

I wanted to show you what I am working on. It is control for the home theater. My house is equipped with smart switches and infrared xmitters/receivers that all use MQTT commands for control. So the buttons, through node-red send the appropriate commands to the needed devices. Even IR! Working great. And the bottom right button switches between a blank set of buttons and the images that you see in the pic. Thanks for your efforts.

20211218_155606086_iOS

natcl commented 2 years ago

Oops never got back to you ! Thanks for showing me the result and glad it worked ! :)