fulup-bzh / AlsaJsonGateway

HTTP REST/JSON Gateway to ALSA mixer service for HTML5 UI
53 stars 5 forks source link

Fail to open file: [/home/pi/AJW/index.html] #17

Open emcniece opened 3 years ago

emcniece commented 3 years ago

Hello, just testing this on a Raspberry Pi, installation worked fine but running the daemon errors on requesting the page from a browser:

pi@music-stack-rpi:~ $ ajg-daemon --rootdir=$AJW_DIR --verbose --port=1234
AJG:notice: config at /home/pi/AJW/sessions/AJG-config.json: No such file or directory
AJG:notice checking session dir [/home/pi/AJW/sessions]
AJG:notice Init config done
AJG:notice Foreground mode
AJG:notice Waiting port=1234 rootdir=/home/pi/AJW
AJG:notice Browser URL= http://localhost:1234
AJG:notice entering httpd waiting loop
AJG:notice Use Ctrl-C to quitFail to open file: [/home/pi/AJW/index.html] error:No such file or directory
Fail to open file: [/home/pi/AJW/favicon.ico] error:No such file or directory

Some diagnostics:

pi@music-stack-rpi:~ $ echo $AJW_DIR
/home/pi/AJW

pi@music-stack-rpi:~ $ ll $AJW_DIR
total 16
drwxr-xr-x  3 pi pi 4096 Aug 13 12:13 .
drwxr-xr-x 16 pi pi 4096 Aug 13 12:12 ..
-rw-r--r--  1 pi pi  255 Aug 13 12:12 AJG-config.json
drwxr-xr-x  2 pi pi 4096 Aug 13 12:01 sessions

pi@music-stack-rpi:~ $ uname -a
Linux music-stack-rpi 5.4.51-v7+ #1333 SMP Mon Aug 10 16:45:19 BST 2020 armv7l GNU/Linux

pi@music-stack-rpi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 1: USB [Scarlett 18i8 USB], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

pi@music-stack-rpi:~ $ ifconfig wlan0 | grep inet
        inet 192.168.0.129  netmask 255.255.255.0  broadcast 192.168.0.255

Loading http://192.168.0.129:1234/index.html in browser renders this:

Alsa-Json-Gateway Unknown or Not readable file

Where does index.html get generated? I don't see any obvious errors during the build steps. Thanks for your help!