foxxyz / loupedeck

Node.js API for Loupedeck Controllers
MIT License
87 stars 10 forks source link

Loupedeck CT V2 Support (product ID `0007` instead of `0003`) #27

Open elementalTIMING opened 12 months ago

elementalTIMING commented 12 months ago

Hi,

I tried to test your promising package. Unfortunately, I always get the message:

Device with product ID 7 not yet supported! Please file an issue at ...

Do you have a fix, please? I'm using a Loupedeck CT on a Mac.

Thx and best regards, Lars

foxxyz commented 12 months ago

Hm, that's strange. According to my research with Loupedeck CT, the USB device ID is 0003, not 0007, which is what the software is looking for.

I wonder if you have a newer device? When did you buy it?

Try manually instantiating the device if you know what type it is:

import { LoupedeckCT } from 'loupedeck'

const device = new LoupedeckCT({ path: '/dev/path/to/your/device', autoConnect: false })
await device.connect()
console.info('Connection successful!')

device.on('down', ({ id }) => {
    console.info(`Button pressed: ${id}`)
})

Let me know how that goes!

elementalTIMING commented 12 months ago

Hi,

indeed I bought the Loupedeck CT last week so maybe they changed the ID.

I will give t a try to manually connect it in the way you described above. However it would be great to have a more "general" method running to be flexible and independent of the current hardware environment.

Best regards, Lars

foxxyz commented 12 months ago

Interesting, maybe there's something different about the device. I will make a note of that.

If all the functionality works as intended using the manual instantiation, then we could just add that deviceID as an alias, so it gets found correctly.

However it would be great to have a more "general" method running to be flexible and independent of the current hardware environment.

What do you mean exactly?

elementalTIMING commented 12 months ago

However it would be great to have a more "general" method running to be flexible and independent of the current hardware environment.

What do you mean exactly?

Well, it would be nice to get to work on my computer with my hardware by selecting the correct ID manually. But what if another user wants to use my tool where the ID is different? on his computer. This is what I was meaning with "general method". Run through all ports and try to find the correct one... To be honest I have no idea how this could look like or if this possible. Until today I've tried not to deal with hardware :-)

BTW: I thought the USB ports are available via /dev/ttyUSBxxx. But not on Mac. There are over 100 ttys, but none which could be clearly identified as the USBs. Do you have an advice please?

Cheers, Lars

foxxyz commented 12 months ago

Well, it would be nice to get to work on my computer with my hardware by selecting the correct ID manually. But what if another user wants to use my tool where the ID is different? on his computer. This is what I was meaning with "general method".

I believe that's what the manual instantiation is for? Or maybe I don't understand well enough.

BTW: I thought the USB ports are available via /dev/ttyUSBxxx. But not on Mac. There are over 100 ttys, but none which could be clearly identified as the USBs. Do you have an advice please?

It should show up in there. On my Mac it shows up as /dev/tty.usbmodemxx. Try ls /dev/tty* | grep usb

elementalTIMING commented 12 months ago

ls /dev/tty* | grep usb

My mistake. I was looking for the USB tty but without having a device connected. Now I see it at /dev/tty.usbmodem101.

latenitefilms commented 12 months ago

I believe the new Loupedeck CT's have a new product ID, and also use the "Razer" style screen structure - ie one main screen instead of three.

See: https://github.com/CommandPost/CommandPost/commit/3acb433501ba7aa0d7d6c4a959db424c6ef056d5

foxxyz commented 12 months ago

@latenitefilms that's great info, thank you!

Looking at your code, it looks like you also do a firmware check. Does that mean that a V1 CT can also act like a V2 CT if it has newer firmware loaded? Or does the V1 CT refuse to load newer firmware?

It sounds like at the end of the day they are still identical devices even though they report different product ID's, and that their behavior depends more on the firmware version installed.

Is that a correct assumption?

latenitefilms commented 12 months ago

From what I understand, if a Loupedeck CT or Live is running Firmware v0.2.5 or later, then it uses the Razer/single screen method. There's so many different hardware versions of the devices, and what firmware they are allowed to update to seems pretty varied. However this is just an assumption - I'm GUESSING that that if they do need to update firmware for the older devices, they'll just increment the older version numbers - i.e. v0.2.4.1.

The Loupedeck CT V2 (with the new product number) seems identical function wise as the older model, but I think they improved some of the insides.

foxxyz commented 12 months ago

That's super useful information! Thank you!

I'll try to get my hands on a newer CT at some point so I can troubleshoot and add support.

elementalTIMING commented 6 months ago

Do you have any solution found?

Meanwhile I tried to use the Serial connection but get:

Loupedeck Serial Error: Error: Resource busy, cannot open /dev/tty.usbmodem101
elementalTIMING commented 6 months ago

Do you have any solution found?

Meanwhile I tried to use the Serial connection but get:

Loupedeck Serial Error: Error: Resource busy, cannot open /dev/tty.usbmodem101

My fault: I had the Loupedeck software open and running. So the USB port was already open.