Ewelink class
Constructors
-
Ewelink({String? email, String? password, String region = 'us', EwelinkCredentials? credentials, String? phoneNumber, Map<
String, dynamic> ? arpTable, Map<String, dynamic> ? devicesCache}) - Ewelink.fromPassword({required String email, required String password, required String region})
-
factory
- Ewelink.fromToken({required EwelinkCredentials credentials})
-
factory
Properties
- apiWebSocketUrl → String
-
Generate eWeLink WebSocket URL
no setter
- appId → String
-
final
- appSecret → String
-
final
-
arpTable
↔ Map<
String, dynamic> ? -
getter/setter pair
- credentials ↔ EwelinkCredentials?
-
getter/setter pair
-
devicesCache
↔ Map<
String, dynamic> ? -
getter/setter pair
- email ↔ String?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- otaUrl → String
-
Generate eWeLink OTA API URL
no setter
- password ↔ String?
-
getter/setter pair
- phoneNumber ↔ String?
-
getter/setter pair
- region ↔ String
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkLoginParameters(
) → dynamic -
getCredentials(
) → Future< EwelinkCredentials> - Returns user credentials information model
-
getDevice(
{required String deviceId}) → Future< EwelinkDevice> - Get information for a specific device
-
getDevices(
) → Future< List< EwelinkDevice> > - Get list of devices
-
getRegion(
) → String -
getZeroconfUrl(
String ip) → String - Generate Zeroconf URL
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setDevicePowerState(
{required String deviceId, required dynamic state, dynamic channel = 1}) → Future< bool> - Change power state for a specific device
-
toggleDevice(
{required String deviceId, int channel = 1}) → Future< bool> - Toggle the device
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited