ok i worked on the front door a lot and i got it physically decent with
the electric strike now working.
replaced the fried arduino, and made a DC power cable to the USB hub since
the 5V line on the beaglebone black got fried when the arduino got fried,
when the people taking out the old door presumably ripped everything out.
i changed the serial device name in index.js for doorjam, but for whatever
reason it doesn't autostart. if i run node index.js from the commandline
it works! but psy log doorjam returns nothing, ever, because psy is not
running it. why? I don't know. who knows?
when i run /etc/init.d/doorjam start, it says
root@omnidoor:/etc/init.d# ./doorjam start
Starting doorjam (via systemctl): doorjam.serviceJob failed. See system journal and
'systemctl status' for details.
so i edited /etc/init.d/doorjam to refer only to /root/doorjam/index.js
and NEVER to /opt/doorjam which I renamed so people stop using it already.
nobody uses /opt ok
so i tried this:
psy start --logfile /var/log/doorjam.log --name doorjam -- node /root/doorjam/index.js
and then in another window i ran psy log doorjam, here's what it said:
!!! PROCESS SPAWN: PID 1422
Error: Cannot find module '/opt/doorjam/index.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
!!! PROCESS EXIT: 8
!!! PROCESS SLEEP
over and over and over again. why is it looking for /opt/doorjam/index.js
?????????????????/ i don't know, my psy command (above) did not mention
so i ran screen, and in screen i ran "node index.js" and it's working.
oh, don't forget our git branch is "oldstyle" not master