diff --git a/config.schema.json b/config.schema.json index a5129bc..2e38408 100644 --- a/config.schema.json +++ b/config.schema.json @@ -15,18 +15,6 @@ "title": "API key", "type": "string", "required": true - }, - "enabledTypes": { - "title": "Enabled devices", - "type": "array", - "uniqueItems": true, - "items": { - "title": "Type", - "type": "string", - "enum": [ - "Switch" - ] - } } } } diff --git a/src/api-client.ts b/src/api-client.ts index c80e423..5344f84 100644 --- a/src/api-client.ts +++ b/src/api-client.ts @@ -46,7 +46,7 @@ export class SinricProApiClient { this.axiosClient.get('/devices'), ]); - this.log.debug(`${initData[0].data.devices.length} device(s) found!`); + this.log.debug(`[getDevices()]: ${initData[0].data.devices.length} device(s) found!`); for (const device of initData[0].data.devices) { const sinricproDevice: SinricProDevice = { diff --git a/src/constants.ts b/src/constants.ts index b325b60..a13ceb8 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -7,7 +7,7 @@ export const SINRICPRO_HOMEBRIDGE_CLIENT_ID = 'api_interaction'; export const SINRICPRO_API_ENDPOINT_BASE_URL = 'https://api.sinric.pro/api/v1'; -export const SINRICPRO_SSE_ENDPOINT_BASE_URL = 'https://sse.sinric.pro/sse/stream?accessToken=%s'; +export const SINRICPRO_SSE_ENDPOINT_BASE_URL = 'https://portal.sinric.pro/sse/stream?accessToken=%s'; export abstract class ModelConstants { static readonly MANUFACTURER = 'SinricPro'; diff --git a/src/model/sinricpro-device.ts b/src/model/sinricpro-device.ts index 3431dad..cb0c798 100644 --- a/src/model/sinricpro-device.ts +++ b/src/model/sinricpro-device.ts @@ -12,14 +12,14 @@ export interface SinricProDevice { id: number; name: string; deviceType: SinricProDeviceType; - powerState: string | undefined; // On or Off - rangeValue: number | undefined; - garageDoorState: number | undefined; - brightness: number | undefined; - powerLevel: number | undefined; - temperature: number | undefined; - thermostatMode: string | undefined; - contactState: string | undefined; - humidity: number | undefined; - lastMotionState: string | undefined; + powerState?: string; + rangeValue?: number; + garageDoorState?: number; + brightness?: number; + powerLevel?: number; + temperature?: number; + thermostatMode?: string; + contactState?: string; + humidity?: number; + lastMotionState?: string; } \ No newline at end of file