diff --git a/lib/features/power/implementations/crelay/index.ts b/lib/features/power/implementations/crelay/index.ts index d141aac..e3606de 100644 --- a/lib/features/power/implementations/crelay/index.ts +++ b/lib/features/power/implementations/crelay/index.ts @@ -17,10 +17,11 @@ export class Crelay implements Power { async setup(): Promise { // install craly tooling try { + await execAsync('apk add make build-base'); await execAsync('cd /usr/app/ && git clone https://github.com/balena-io-hardware/crelay.git'); - await execAsync('cd /usr/app/crelay/src && make [DRV_CONRAD=n] [DRV_SAINSMART=n] [DRV_HIDAPI=n] && make install'); + await execAsync('cd /usr/app/crelay/src && make && make install'); await execAsync('cp /usr/app/crelay/src/crelay /usr/local/bin/crelay'); - + // this retrieves info about the relay being used, and its serial let info = await execAsync(`crelay -i ${this.relayId}`); console.log(`Crelay controlled relay being used for power, channel: ${this.relayId}.`);