tjaworski / AceMagic-S1-LED-TFT-Linux

ACEMAGIC S1 Mini TFT/LCD and LED Control for Linux
GNU General Public License v3.0
107 stars 11 forks source link

led_device port fails to open #21

Closed jgur-psyops closed 1 month ago

jgur-psyops commented 1 month ago

LEd device port fails to load which crashes the service. Can be fixed temporarily (to allow changing other settings) by commenting out line 70 in led_device.js:

            if (err) {

                console.log('led_device: error opening port ', err.message);        
              //  return reject();      
            }

Node v20.16.0 npm 10.8.1 Ubuntu 22.04.4 LTS

Full trace:

sudo ./main.js 2024-07-24 22:14:27.2727 [info] starting up /home/serverfish/acemagic/s1panel/main.js 2024-07-24 22:14:27.2727 [info] initialize: widget text loaded... 2024-07-24 22:14:27.2727 [info] initialize: widget custom_bar loaded... 2024-07-24 22:14:27.2727 [info] initialize: widget line_chart loaded... 2024-07-24 22:14:27.2727 [info] initialize: widget doughnut_chart loaded... 2024-07-24 22:14:27.2727 [info] initialize: widget bar_chart loaded... 2024-07-24 22:14:27.2727 [info] initialize: widget image loaded... 2024-07-24 22:14:27.2727 [info] initialize: widget iconify loaded... 2024-07-24 22:14:27.2727 [info] initialize: sensor clock loaded... 2024-07-24 22:14:27.2727 [info] initialize: sensor calendar loaded... 2024-07-24 22:14:27.2727 [info] initialize: cpu sensor max points are set to 300 2024-07-24 22:14:27.2727 [info] initialize: sensor cpu_usage loaded... 2024-07-24 22:14:27.2727 [info] initialize: cpu tempature max points are set to 300 2024-07-24 22:14:27.2727 [info] initialize: cpu temp set to use fahrenheit 2024-07-24 22:14:27.2727 [info] initialize: sensor cpu_temp loaded... 2024-07-24 22:14:27.2727 [info] initialize: cpu power max points are set to 300 2024-07-24 22:14:27.2727 [info] initialize: sensor cpu_power loaded... 2024-07-24 22:14:27.2727 [info] initialize: monitoring interface enp2s0 2024-07-24 22:14:27.2727 [info] initialize: network max points are set to 300 2024-07-24 22:14:27.2727 [info] initialize: sensor network_enp2s0 loaded... 2024-07-24 22:14:27.2727 [info] initialize: monitoring interface enp4s0 2024-07-24 22:14:27.2727 [info] initialize: network max points are set to 300 2024-07-24 22:14:27.2727 [info] initialize: sensor network_enp4s0 loaded... 2024-07-24 22:14:27.2727 [info] initialize: memory sensor max points are set to 300 2024-07-24 22:14:27.2727 [info] initialize: sensor memory loaded... 2024-07-24 22:14:27.2727 [info] initialize: device orientation is portrait 2024-07-24 22:14:27.2727 [info] initialize: gui started on 127.0.0.1:8686 2024-07-24 22:14:27.2727 [info] initialize: cpu temp max set to 221 2024-07-24 22:14:27.2727 [info] initialize: cpu temp max set to 70 2024-07-24 22:14:27.2727 [info] led_thread: started... 2024-07-24 22:14:27.2727 [info] lcd_thread: started... 2024-07-24 22:14:27.2727 [info] network_thread: started... for enp2s0 2024-07-24 22:14:27.2727 [info] network_thread: collector started for iface enp2s0 2024-07-24 22:14:27.2727 [info] network_thread: started... for enp4s0 led_device: error opening port Error: No such file or directory, cannot open /dev/ttyUSB0

node:internal/event_target:1094 process.nextTick(() => { throw err; }); ^ UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined". at throwUnhandledRejectionsMode (node:internal/process/promises:389:7) at processPromiseRejections (node:internal/process/promises:470:17) at process.processTicksAndRejections (node:internal/process/task_queues:96:32) Emitted 'error' event on Worker instance at: at [kOnErrorMessage] (node:internal/worker:326:10) at [kOnMessage] (node:internal/worker:337:37) at MessagePort. (node:internal/worker:232:57) at [nodejs.internal.kHybridDispatch] (node:internal/event_target:820:20) at MessagePort. (node:internal/per_context/messageport:23:28) { code: 'ERR_UNHANDLED_REJECTION' }

Node.js v20.16.0

tjaworski commented 1 month ago

fixed, thank you.