aboutsummaryrefslogtreecommitdiff
path: root/plugin.ts
blob: 04664e1876a1e0a3f2258e9b5cabf113531e4c26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import {
	API,
	AccessoryPlugin,
	Logger,
	AccessoryConfig,
	Service

} from 'homebridge';

import Lamp, { LampColor } from './lamp';

export default class BekenBridge implements AccessoryPlugin {
	private lamp: Lamp;
	private bulbService: Service;
	private infoService: Service;

	public name: string;

	constructor(
		public readonly log: Logger,
		public readonly config: AccessoryConfig,
		public readonly api: API,
	) {
		console.log("reached constructor"); //DEBUG
		// this.name = config.name;
		// this.lamp = new Lamp(config.address);

		// this.infoService = new this.api.hap.Service.AccessoryInformation()
		// 	.setCharacteristic(this.api.hap.Characteristic.Manufacturer, "Beken")
		// 	.setCharacteristic(this.api.hap.Characteristic.Model, "Beken LED");

		// this.bulbService = new this.api.hap.Service.Lightbulb(this.name);
	}
  
	getServices() {
		console.log("getting services"); //DEBUG
		return [
			// this.infoService,
			// this.bulbService
		];
	}
}