Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device not found #5

Open
Florvis opened this issue Jan 9, 2019 · 20 comments
Open

Device not found #5

Florvis opened this issue Jan 9, 2019 · 20 comments

Comments

@Florvis
Copy link

Florvis commented Jan 9, 2019

Hi

I'm using this usb - dmx cable : https://www.steinigke.de/en/mpn51860118-eurolite-usb-dmx512-interface-update-adaptor.html

First I had troubles installing the node, but after folowing the instructions on https://github.com/tessel/node-usb#readme
I was able to install the node.

But now, I've tried restaring node-red, and also my raspberry pi, but node-red doesn't find my device, is there maybe something I still have to do?

Thanks in advance for the help.

@Florvis
Copy link
Author

Florvis commented Jan 9, 2019

image

This is de device id of my dongle, it's not the same as the one you are looking for, did I do something wrong with the installation, or is this not a good dongle?

@smadds
Copy link
Owner

smadds commented Jan 9, 2019

Your device is not the same as the one this node is written for. If I do a lsusb of my server this is what I get:
udmx_lsusb

If you want the node to recognise your device you need to edit line 7 in udmx.js to the USB ID of your device. Change it from
var udev = usb.findByIds(0x16c0, 0x5dc);
to
var udev = usb.findByIds(0x0403, 0x6001);

I can't guarantee it will work in the same way, but at least it will recognise the USB device.

@Florvis
Copy link
Author

Florvis commented Jan 10, 2019

Hi

Thanks for the quick response. I'll try that later today.
If that would not work, do you have a link were I could order the same device as you have?

KR
Floris

@Florvis
Copy link
Author

Florvis commented Jan 12, 2019

Hi

Thanks, for the links.
I changed the code in udmx.js as you said, but I stil get the "not found" feedback.

@ozett
Copy link

ozett commented Feb 12, 2019

nanodmx

i did it like you advised, changed the vendor-id and product-id for my nano-dmx usb-dongle and it showed: connected.

thankx,
i will now test if it is working...

@ozett
Copy link

ozett commented Feb 12, 2019

12 Feb 20:40:21 - [error] [udmx:ae2ad85f.494a98] Error: LIBUSB_TRANSFER_STALL
12 Feb 20:40:21 - [red] Uncaught Exception:
12 Feb 20:40:21 - TypeError: this.status is not a function
    at Device.<anonymous> (/home/olaf/.node-red/node_modules/node-red-contrib-udmx/udmx.js:19:25)
    at Transfer.<anonymous> (/home/olaf/.node-red/node_modules/usb/usb.js:133:15)

😿

nano-error

the end...

@NickvanZon
Copy link

f you want the node to recognise your device you need to edit line 7 in udmx.js to the USB ID of your device. Change it from
var udev = usb.findByIds(0x16c0, 0x5dc);
to
var udev = usb.findByIds(0x0403, 0x6001);

I can't guarantee it will work in the same way, but at least it will recognise the USB device.

how do i change the udmx.js?

@PizzaProgram
Copy link

PizzaProgram commented Oct 11, 2021

how do i change the udmx.js?

Dear @NickvanZon ,

  1. You need to locate your .node-red directory. On linux tipically :
    /home/YOUR_USER_NAME/.node-red/node_modules/node-red-contrib-udmx
  2. make a copy from the udmx.js file first,
  3. edit it,
  4. save it back to that directory, overwrite old one
  5. restart node-red. (In the terminal, type: sudo node-red-stop , than sudo node-red-start)
  6. reload the page in the browser [F5], or even click Deploy FULL.

@McBene
Copy link

McBene commented Feb 13, 2022

Thanks for your instructions. It seems to work.
But I can´t see any output at the DMX Port of The USB-Gateway.
At node-red it looks like (Screenshot).
Can i get any diagnostic for the Node?

image

@smadds
Copy link
Owner

smadds commented Feb 13, 2022

Are you using this under Linux? Maybe try the lsusb command to find the id of your device?

@ozett
Copy link

ozett commented Feb 14, 2022

Can i get any diagnostic for the Node?

there is a log output: node-red-log
https://nodered.org/docs/user-guide/runtime/logging

@McBene
Copy link

McBene commented Feb 14, 2022

Yes, using Linux at a Raspberry Pi4 :
image
Here is the lsusb:
image
image

Before the change from 0x16c0, 0x5dc to 0x0403, 0x6001 the Node show not the state "connect" or "CH001:219"

@proffalken
Copy link

FWIW, I'm getting close to an answer for this running in Docker at https://www.reddit.com/r/AlpineLinux/comments/165t1th/running_mdev_s_to_scan_for_devices_on_container/

I'm wondering if a config box could be created to allow for input of the device/vendor ID in future as many of the USB dongles from Amazon etc appear to be the 0x0403, 0x6001 variants these days rather than the original intended.

Better yet, the ability to select from a drop-down of plugged-in USB devices would be fantastic!

@christophengelmayer
Copy link

christophengelmayer commented Aug 31, 2023

The USB Dongle you are using (Manufacturer: FTDI) is not compatible with the uDMX driver.
Instead you have to use the OpenDMX driver to "talk" to that device.

Try the https://github.com/node-dmx/dmx package, especially the enttec-open-usb-dmx.js driver.

const DMX = require('dmx');
const dmx = new DMX();
const universe = dmx.addUniverse('demo', 'enttec-open-usb-dmx', '/dev/tty.usbserial-A50285BI');

universe.updateAll(255);

(Replace /dev/tty.usbserial-A50285BI with your device mountpoint.)

I am not aware of any node-red node that supports the OpenDMX driver out of the box. You could use the code above to get started and write your own.

@proffalken
Copy link

Amazing, thanks @christophengelmayer !

@proffalken
Copy link

FWIW I worked around this by switching from Docker to a raspberry Pi, installing OLA from the standard APT repositories, enabling USB FTDI in the OLA config and then using NodeRed OLA to send messages to the OLA server.

This isn't as "nice" as being able to talk directly to my cheap chinese USB DMX dongle, but it is working well, so I figured I'd put this here in case someone who also has a cheap chinese dongle tries to use nodered uDMX.

@christophengelmayer
Copy link

@proffalken Thanks for your update. How is the "performance" using OLA with the USB FTDI Stick?

My solution works but it is only capable of updating DMX values at about 30 times/second.
If I fade a light from 0 to 255 in 500ms it "stutters" a little bit.

I'm wondering if the 30Hz limit comes from the FTDI-Stick or the driver?
@proffalken Have you tried fading lights? How is your performance?

@proffalken
Copy link

@christophengelmayer - I only got it working this morning, and haven't tried more than alternating colours once a second so far.

I'll try the gradient stuff later on today if I get a chance - my goal is to use this to react to messages on an MQTT bus and change the lights accordingly for an Escape Room-style setup.

@proffalken
Copy link

@christophengelmayer try the below, there's a delay of just 5ms between steps and my cheap chinese light seems to fade up without jitter:

[
    {
        "id": "9c99abb435339285",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "78cb4b068737cc2c",
        "type": "function",
        "z": "9c99abb435339285",
        "name": "Fade",
        "func": "var colour = [0,0,0];\nvar brightness = 0;\nvar total_fade_length = 1;\nvar step_size = 1;\n\nfunction sleep(ms) {\n    return new Promise(resolve => setTimeout(resolve, ms));\n}\n\nif (msg.payload.total_fade_length){\n    total_fade_length = msg.payload.total_fade_length;\n    node.warn(\"Fade length set to \" + total_fade_length + \"based on message\");\n}\n\nif (msg.payload.colour){\n    colour = msg.payload.colour;\n}\n\nstep_size = 255 / total_fade_length;\n\nnode.warn(step_size);\n\nfor (let seconds_passed = 0; seconds_passed < total_fade_length; seconds_passed++) {\n  brightness = brightness + step_size;\n  msg.payload = {\n    \"channels\":[ {\n            \"channel\": 13,\n            \"value\": brightness,\n        },\n        {\n            \"channel\": 14,\n            \"value\": colour[0],\n        },\n        {\n            \"channel\": 15,\n            \"value\": colour[1],\n        },\n        {\n            \"channel\": 16,\n            \"value\": colour[2],\n        }\n        ]\n    };\n    node.send(msg);\n    await sleep(5);\n}\nreturn;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 990,
        "y": 500,
        "wires": [
            [
                "93075025a6189a9a",
                "360b821f24d7d0df"
            ]
        ]
    },
    {
        "id": "93075025a6189a9a",
        "type": "debug",
        "z": "9c99abb435339285",
        "name": "Payload",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1380,
        "y": 420,
        "wires": []
    },
    {
        "id": "637d47e8196ba65e",
        "type": "inject",
        "z": "9c99abb435339285",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"colour\":[123,0,123],\"total_fade_length\":255}",
        "payloadType": "json",
        "x": 750,
        "y": 500,
        "wires": [
            [
                "78cb4b068737cc2c"
            ]
        ]
    },
    {
        "id": "360b821f24d7d0df",
        "type": "ola",
        "z": "9c99abb435339285",
        "name": "",
        "host": "127.0.0.1",
        "port": 9090,
        "universe": 1,
        "size": 512,
        "x": 1370,
        "y": 520,
        "wires": []
    }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants