Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TadoConnector

Class TadoConnector. Extends Connector class from bfmb-base-connector module.

Hierarchy

  • Connector
    • TadoConnector

Index

Constructors

constructor

  • The constructor only calls to parent class passing the network identification.

    Returns TadoConnector

Properties

Protected connections

connections: Array<Connection>

Private deviceIdRequiredMethods

deviceIdRequiredMethods: string[] = ["getMobileDevice", "getMobileDeviceSettings"]

This array is required for knowing which functions require the existence of device_id attribute.

Private homeIdRequiredMethods

homeIdRequiredMethods: string[] = ["getHome", "getWeather", "getDevices", "getInstallations","getUsers", "getState", "getMobileDevices", "getMobileDevice","getMobileDeviceSettings", "getZones", "getZoneState","getZoneCapabilities","getZoneOverlay", "getTimeTables","getAwayConfiguration", "getTimeTable", "clearZoneOverlay","setZoneOverlay"]

This array is required for knowing which functions require the existence of home_id attribute.

Protected name

name: string

Private powerTempRequiredMethods

powerTempRequiredMethods: string[] = ["setZoneOverlay"]

This array is required for knowing which functions require the existence of power, temperature and termination attributes.

Private timetableIdRequiredMethods

timetableIdRequiredMethods: string[] = ["getTimeTable"]

This array is required for knowing which functions require the existence of timetable_id attribute.

Private zoneIdRequiredMethods

zoneIdRequiredMethods: string[] = ["getZoneState", "getZoneCapabilities","getZoneOverlay","getTimeTables", "getAwayConfiguration", "getTimeTable","setZoneOverlay", "clearZoneOverlay"]

This array is required for knowing which functions require the existence of zone_id attribute.

Methods

addConnection

  • addConnection(options: any, callback: Function): void
  • This method adds a TadoConnection object to the connector.

    Parameters

    • options: any

      A not type-defined object. Requires the attributes username and password to be valid. Those values are the login data of Tadoº.

    • callback: Function

      Callback function which it gives the results or the failure of the task.

    Returns void

Private callHttpApiGetMethod

  • callHttpApiGetMethod(connection: TadoConnection, options: any, callback: Function): void
  • This method does the calling to Tado api.

    Parameters

    • connection: TadoConnection

      The connection to Tado api.

    • options: any

      A not type-defined object. Contains the parameters that the api endpoint require.

    • callback: Function

      Function which returns any result or error.

    Returns void

    Error May return an error object if there's some issues with the options object.

Private callHttpApiPutMethod

  • callHttpApiPutMethod(connection: TadoConnection, options: any, callback: Function): void
  • This method does the calling to Tado api.

    Parameters

    • connection: TadoConnection

      The connection to Tado api.

    • options: any

      A not type-defined object. Contains the parameters that the api endpoint require.

    • callback: Function

      Function which returns any result or error.

    Returns void

    Error May return an error object if there's some issues with the options object.

getConnection

  • getConnection(id: string): Connection

getConnectionIndex

  • getConnectionIndex(id: string): number

getMe

  • getMe(id: string, options?: any, callback: Function): void
  • This method calls to /me endpoint of Tadoº api.

    Parameters

    • id: string

      The uuid of the connection to do the call.

    • Default value options: any = {}

      A not type-defined object. Actually it's empty.

    • callback: Function

      Function which return response or error from the connection.

    Returns void

getName

  • getName(): string

receiveMessage

  • receiveMessage(id: string, options?: any, callback: Function): void
  • This method is the universal method for calling get methods of Tado client module.

    Parameters

    • id: string

      The uuid of the connection to do the call.

    • Default value options: any = {}

      A not type-defined object. Contains the parameters that the api endpoint require.

    • callback: Function

      Function which return response or error from the connection.

    Returns void

removeConnection

  • removeConnection(id: string, callback: Function): void

sendMessage

  • sendMessage(id: string, options?: any, callback: Function): void
  • This method is the universal method for calling put/post methods of Tado client module.

    Parameters

    • id: string

      The uuid of the connection to do the call.

    • Default value options: any = {}

      A not type-defined object. Contains the parameters that the api endpoint require.

    • callback: Function

      Function which return response or error from the connection.

    Returns void

Private verifyReceiveMessageBaseOptions

  • verifyReceiveMessageBaseOptions(options: any): Error
  • This method verifies that options object has the required attributes.

    Parameters

    • options: any

      A not type-defined object. Contains the parameters that the api endpoint require.

    Returns Error

    Error May return an error object if there's some issues with the options object.

Private verifySendMessageBaseOptions

  • verifySendMessageBaseOptions(options: any): Error
  • This method verifies that options object has the required attributes.

    Parameters

    • options: any

      A not type-defined object. Contains the parameters that the api endpoint require.

    Returns Error

    Error May return an error object if there's some issues with the options object.

Generated using TypeDoc