Class SmartHQPlatform
Implements
- DynamicPlatformPlugin
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
- log: Logging
- config: SmartHQPlatformConfig
- api: API
Returns SmartHQPlatform
Properties
accessories
Readonlyapi
Characteristic
config
debugMode
Readonlylog
platformConfig
platformLogging
platformPushRate
platformRefreshRate
platformUpdateRate
Service
version
Methods
configureAccessory
This function is invoked when homebridge restores cached accessories from disk at startup. It should be used to setup event handlers for characteristics and update respective values.
Parameters
- accessory: PlatformAccessory
Returns void
debugErrorLog
Parameters
- ...log: any[]
Returns Promise<void>
debugLog
Parameters
- ...log: any[]
Returns Promise<void>
debugSuccessLog
Parameters
- ...log: any[]
Returns Promise<void>
debugWarnLog
Parameters
- ...log: any[]
Returns Promise<void>
discoverDevices
This method is used to discover the your location and devices. Accessories are registered by either their DeviceClass, DeviceModel, or DeviceID
Returns Promise<void>
enablingPlatformLogging
Returns Promise<boolean>
errorLog
Parameters
- ...log: any[]
Returns Promise<void>
getPlatformConfigSettings
Returns Promise<void>
getPlatformLogSettings
Returns Promise<void>
getPlatformRateSettings
Returns Promise<void>
getVersion
Asynchronously retrieves the version of the plugin from the package.json file.
This method reads the package.json file located in the parent directory, parses its content to extract the version, and logs the version using the debug logger. The extracted version is then assigned to the
versionproperty of the class.Returns Promise<void>
A promise that resolves when the version has been retrieved and logged.
infoLog
If device level logging is turned on, log to log.warn Otherwise send debug logs to log.debug
Parameters
- ...log: any[]
Returns Promise<void>
loggingIsDebug
Returns Promise<boolean>
startRefreshTokenLogic
Returns Promise<void>
successLog
Parameters
- ...log: any[]
Returns Promise<void>
unregisterPlatformAccessories
Parameters
- existingAccessory: PlatformAccessory
Returns Promise<void>
validateAndCleanDisplayName
Validate and clean a string value for a Name Characteristic.
Parameters
- displayName: string
The display name of the accessory.
- name: string
The name of the characteristic.
- value: string
The value to be validated and cleaned.
Returns Promise<string>
The cleaned string value.
- displayName: string
verifyConfig
Verify the config passed to the plugin is valid
Returns Promise<void>
warnLog
Parameters
- ...log: any[]
Returns Promise<void>
HomebridgePlatform This class is the main constructor for your plugin, this is where you should parse the user config and discover/register accessories with Homebridge.