diff --git a/doc/installPi.sh b/doc/installPi.sh index a46ba3a..e102106 100644 --- a/doc/installPi.sh +++ b/doc/installPi.sh @@ -165,5 +165,6 @@ if ! grep -w "logo.nologo" /boot/cmdline.txt; then fi chown itender:itender -R /home/itender/ +adduser itender gpio reboot now diff --git a/src/MyGPIO.ts b/src/MyGPIO.ts index 3f68790..275627a 100644 --- a/src/MyGPIO.ts +++ b/src/MyGPIO.ts @@ -1,5 +1,9 @@ import GPIO from "rpi-gpio"; import Container from "./database/Container"; +import debug from "debug"; +const log = debug("itender:gpio"); + +// Package is raspi-gpio in raspberrypi export class MyGPIO { static setup(pin: number, direction): Promise { @@ -35,6 +39,7 @@ export class MyGPIO { } static setupPins(): Promise { + log("Setting up GPIO-Pins..."); return new Promise(async resolve => { let containers = await Container.find({}); for (let c of containers) { diff --git a/src/main.ts b/src/main.ts index e8c8538..4082760 100644 --- a/src/main.ts +++ b/src/main.ts @@ -40,6 +40,7 @@ const wsApp = new WebsocketApp(); log("Check OK, starting..."); await init(); + log("Init OK"); setInterval(refresh, 1000 * 60); iTender.setStatus(iTenderStatus.READY);