Options
All
  • Public
  • Public/Protected
  • All
Menu

equation-connect

Index

Variables

auth

auth: Auth | null = null

database

database: Database | null = null

installationsPath

installationsPath: "installations2" = "installations2"

Functions

Const deviceByIdPath

  • deviceByIdPath(id: string): string

Const deviceDataByIdPath

  • deviceDataByIdPath(id: string): string

Const getDevice

Const getInstallations

Const getUser

  • getUser(uid: string): Promise<any>
  • Parameters

    • uid: string

    Returns Promise<any>

Const getZone

Const getZonePreset

  • getZonePreset(installationId: string, id: string): Promise<null | DeviceStatus>
  • Returns the preset that's currently matching with the zone data as well as with the devices part of the zone otherwise returns null. This means if the zone has a DeviceStatus.Comfort, but only one of the device from the zone has a different value, the function would return null. Note that this would then query every single device of the zone.

    Parameters

    • installationId: string
    • id: string

    Returns Promise<null | DeviceStatus>

Const init

  • init(config?: FirebaseConfig): { app: FirebaseApp; auth: Auth; database: Database }
  • Initializes the firebase app then set and returns both app and auth global variables.

    Parameters

    Returns { app: FirebaseApp; auth: Auth; database: Database }

    • app: FirebaseApp
    • auth: Auth
    • database: Database

Const installationByIdPath

  • installationByIdPath(id: string): string

Const login

  • login(email: string, password: string): Promise<User>
  • Parameters

    • email: string
    • password: string

    Returns Promise<User>

Const logout

  • logout(): Promise<void>

Const setDeviceBacklight

  • setDeviceBacklight(id: string, backlight: number): void
  • Sets device backlight value, the higher the brighter. This backlight also applies when the device is off.

    Parameters

    • id: string
    • backlight: number

    Returns void

Const setDeviceBacklightOn

  • setDeviceBacklightOn(id: string, backlight: number): void
  • Sets device backlight value, the higher the brighter. This backlight only applies when the device is on.

    Parameters

    • id: string
    • backlight: number

    Returns void

Const setDeviceNominalPower

  • setDeviceNominalPower(id: string, nominal_power: number): void
  • Change radiator nominal power.

    Parameters

    • id: string
    • nominal_power: number

    Returns void

Const setDevicePower

  • setDevicePower(id: string, power: boolean): void
  • Turns radiator on or off.

    Parameters

    • id: string
    • power: boolean

      set true to turn on and false to turn off.

    Returns void

Const setDevicePowerOff

  • setDevicePowerOff(id: string): void
  • Turns radiator off.

    Parameters

    • id: string

    Returns void

Const setDevicePowerOn

  • setDevicePowerOn(id: string): void
  • Turns radiator on.

    Parameters

    • id: string

    Returns void

Const setDevicePreset

  • setDevicePreset(id: string, status: DeviceStatus): Promise<void>

Const setZonePower

  • setZonePower(installationId: string, id: string, power: boolean): Promise<void>
  • Turns zone on or off.

    Parameters

    • installationId: string
    • id: string
    • power: boolean

      set true to turn on and false to turn off.

    Returns Promise<void>

Const setZonePowerOff

  • setZonePowerOff(installationId: string, id: string): void
  • Turns zone off.

    Parameters

    • installationId: string
    • id: string

    Returns void

Const setZonePowerOn

  • setZonePowerOn(installationId: string, id: string): void
  • Turns zone on.

    Parameters

    • installationId: string
    • id: string

    Returns void

Const setZonePreset

  • setZonePreset(installationId: string, id: string, status: DeviceStatus): Promise<void>

Const updateDevice

  • updateDevice(id: string, data: any): void
  • Updates device raw data property.

    const id = '504DC27CB994706DC56BB993';
    const temp = 20;
    updateDevice(id, { temp });
    const power = false;
    updateDevice(id, { power });

    Parameters

    • id: string
    • data: any

    Returns void

Const updateDeviceTemperature

  • updateDeviceTemperature(id: string, temp: number): void

Const updateZone

  • updateZone(installationId: string, id: string, data: any): void
  • Parameters

    • installationId: string
    • id: string
    • data: any

    Returns void

Const userByUidPath

  • userByUidPath(uid: string): string

Const zoneByIdPath

  • zoneByIdPath(installationId: string, id: string): string
  • Parameters

    • installationId: string
    • id: string

    Returns string

Generated using TypeDoc