HomeyAPIV2

This class is returned by AthomCloudAPI.Homey#authenticate for a Homey with firmware >=2.0.0.

Extends

Classes

Properties

DISCOVERY_STRATEGIES

DISCOVERY_STRATEGIES

Possible Discovery Strategies

Properties

Name Type Description
DISCOVERY_STRATEGIES
object
CLOUD
string

Cloud HTTPS, e.g. https://abcdef.connect.athom.com.

MDNS
string

Local HTTP, e.g. http://homey-abcdef.local

LOCAL
string

Local HTTP, e.g. http://192.168.1.100.

LOCAL_SECURE
string

Local HTTPS, e.g. https://192-168-1-100.homey.homeylocal.com.

REMOTE_FORWARDED
string

Remote HTTPS, e.g. https://12-34-56-78.homey.homeylocal.com:12345.

}

Methods

__

__(input): string|null

Translates an i18n-object (e.g. { en: 'My String', nl: 'Mijn tekst' } to a string. Uses the language of Homey as defined in Homey.

Parameters

Name Type Description
input
object
en
string

English translation

nl
string

Dutch translation

}

Returns

  • The translated string, or null
string | null

Example

homeyApi.__({
  en: 'Hello',
  nl: 'Hallo',
  fr: 'Bonjour',
}); // returns "Hello" if Homey is set to English

isConnected

isConnected(): Boolean

If Homey is connected to Socket.io.

Returns

Boolean