montaofficial / node-red-contrib-uiohook-napi

0 stars 0 forks source link

Problems when Run Node-RED on Startup node-red-contrib-iohook-napi doesn't work #1

Open matheusmqr opened 8 months ago

matheusmqr commented 8 months ago

When I run Node-RED on Windows startup, the node-red-contrib-iohook-napi palette doesn't work properly. I noticed by looking at the task manager that when running node-red.cmd, three programs open: the Node.js JavaScript runtime, cmd.exe, and the console window host (conhost.exe). When I schedule a task to run only node-red.cmd, only the Node.js JavaScript runtime is running, and Node-RED works perfectly except for the node-red-contrib-iohook-napi palette, which doesn't capture any keyboard input.

Steven1408 commented 1 month ago

Same problem, but does not work in general now. Only worked like once. did you find a workaround or different solution?

When I run Node-RED on Windows startup, the node-red-contrib-iohook-napi palette doesn't work properly. I noticed by looking at the task manager that when running node-red.cmd, three programs open: the Node.js JavaScript runtime, cmd.exe, and the console window host (conhost.exe). When I schedule a task to run only node-red.cmd, only the Node.js JavaScript runtime is running, and Node-RED works perfectly except for the node-red-contrib-iohook-napi palette, which doesn't capture any keyboard input.

matheusmqr commented 1 month ago

I found a workaround for my application; perhaps it will work for you. I've created a .dat file that initializes Node-RED in the Windows startup folder.

cd "C:\Users\youruser\AppData\Roaming\npm\"
echo Iniciando Node-RED na porta 1880.
start /B node-red -u C:\flows -p 1880
echo Node-RED iniciado com sucesso na porta %PORT%.
pause
Steven1408 commented 1 month ago

Thank you, my issues kinda is, that the node does not work at all now. i even reinstalled the palette. Strange, thank you for the fast answere!

Steven1408 commented 1 month ago

So i figured it out. It looks like windows is ignoring my barcodescanner, when having an RFID-Scanner attached via USB also. Yes on windows iam using this capture node to get the barcodes, cuz USBHID-Nodes dont work, windows is not giving me access to keyboard USB HID devices via node-red.

matheusmqr commented 1 month ago

Great to hear you found the root of the issue. My application also involved a barcode scanner, and I didn’t face any issues receiving the readings. It might be a driver problem or even related to antivirus software.