Skip to content

OlivierZal/heatzy-api

Repository files navigation

Heatzy API for Node.js

Enumerations

DerogMode

Enumeration Members

Enumeration Member Value
boost 2
off 0
vacation 1

Mode

Enumeration Members

Enumeration Member Value
cft 0
cft1 4
cft2 5
eco 1
fro 2
stop 3

Switch

Enumeration Members

Enumeration Member Value
off 0
on 1

Classes

default

Constructors

new default()
new default(config: {
  logger: Logger;
  settingManager: SettingManager;
  shouldVerifySSL: boolean;
 }): default
Parameters
Parameter Type
config object
config.logger? Logger
config.settingManager? SettingManager
config.shouldVerifySSL? boolean
Returns

default

Source

src/lib/HeatzyAPI.ts:66

Methods

applyLogin()
applyLogin(data?: LoginCredentials): Promise<boolean>
Parameters
Parameter Type
data? LoginCredentials
Returns

Promise<boolean>

Source

src/lib/HeatzyAPI.ts:120

bindings()
bindings(): Promise<{
  data: Bindings;
}>
Returns

Promise<{ data: Bindings; }>

Member Type
data Bindings
Source

src/lib/HeatzyAPI.ts:135

control()
control(id: string, postData: DevicePostDataAny): Promise<{
  data: Data;
}>
Parameters
Parameter Type
id string
postData DevicePostDataAny
Returns

Promise<{ data: Data; }>

Member Type
data Data
Source

src/lib/HeatzyAPI.ts:139

deviceData()
deviceData(id: string): Promise<{
  data: DeviceData;
}>
Parameters
Parameter Type
id string
Returns

Promise<{ data: DeviceData; }>

Member Type
data DeviceData
Source

src/lib/HeatzyAPI.ts:146

login()
login(__namedParameters: LoginPostData): Promise<{
  data: LoginData;
}>
Parameters
Parameter Type
__namedParameters LoginPostData
Returns

Promise<{ data: LoginData; }>

Member Type
data LoginData
Source

src/lib/HeatzyAPI.ts:150

Interfaces

APISettings

Properties

Property Modifier Type
expireAt? readonly null | number
password? readonly null | string
token? readonly null | string
username? readonly null | string

BaseAttrs

Properties

Property Type
cft_tempH? number
cft_tempL? number
derog_mode? DerogMode
derog_time? number
lock_switch? Switch
mode? Mode
timer_switch? Switch

Bindings

Properties

Property Modifier Type
devices readonly readonly { dev_alias: string; did: string; product_key: string; product_name: string; }[]

DeviceData

Properties

Property Modifier Type
attr readonly never

DevicePostData

Properties

Property Modifier Type
attrs readonly BaseAttrs

ErrorData

Properties

Property Modifier Type
detail_message readonly null | string
error_message readonly null | string

FirstGenDevicePostData

Properties

Property Modifier Type
raw readonly [1, 1, Mode]

Logger

Properties

Property Modifier Type
error readonly (...data: any[]) => void(message?: any, ...optionalParams: any[]) => void
log readonly (...data: any[]) => void(message?: any, ...optionalParams: any[]) => void

LoginCredentials

Properties

Property Modifier Type
password readonly string
username readonly string

LoginData

Properties

Property Modifier Type
expire_at readonly number
token readonly string

LoginPostData

Properties

Property Modifier Type
password readonly string
username readonly string

SettingManager

Properties

Property Type
get <K>(key: K) => undefined | null | APISettings[K]
set <K>(key: K, value: APISettings[K]) => void

Type Aliases

Data

type Data: Record<string, never>;

Source

src/types.ts:23


DevicePostDataAny

type DevicePostDataAny: DevicePostData | FirstGenDevicePostData;

Source

src/types.ts:72

Variables

NUMBER_1

const NUMBER_1: 1 = 1;

Source

src/types.ts:1