DoozGateway class
Create a DoozGateway which allow you to connect to and communicate with your gateway
Constructors
- DoozGateway()
- Create a DoozGateway which allow you to connect to and communicate with your gateway
Properties
-
connectionState
→ Stream<
bool> -
A Stream that will notify any listener of any socket status update (opened/closed)
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isConnected → bool
-
A bool to know whether the
Peer
's connection is aliveno setter -
notifyState
→ Stream<
NotifyState> -
A Stream that will notify any listener of any status update (DooZ modules)
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
authenticate(
String login, String password) → Future< AuthResponse> - Use this to authenticate yourself on the gateway by using the given credentials.
-
clearLogs(
) → Future< ClearLogsResponse> - Clear ooPLA's log journal.
-
connect(
String id, {bool overWAN = false, String? host, int? port}) → Future< void> - Connect to the gateway.
-
disconnect(
) → Future< void> -
Destroy the WSS connection by calling
close
method on thePeer
object. -
discover(
) → Future< DiscoverNetworkResponse> - Get ooPLA's network topology
-
discoverGroups(
) → Future< DiscoverGroupsResponse> - Get the mesh group(s) defined by DooZ user
-
discoverRooms(
) → Future< DiscoverRoomsResponse> - Get the room(s) defined by DooZ user
-
discoverScenes(
) → Future< DiscoverScenesResponse> - Get the scene(s) defined by DooZ user
-
getConfig(
String address, int io, int index, int correlation) → Future< MagicConfigResponse> -
Get the config value of the device at
address
-
getEpoch(
String address, {int timeout = kScenarioCmdTimeout}) → Future< SetEpochResponse> -
Will request for the Epoch time stored on the device at
address
-
getHardwareVersion(
) → Future< HardwareVersionResponse> - Get ooPLA's hardware version
-
getLogs(
{LogLevel priority = LogLevel.warning}) → Future< GetLogsResponse> - Get log journal entries at the given LogLevel
-
getModulesVersion(
) → Future< ModulesVersionsResponse> - Get ooPLA's modules versions
-
getNodesInRoomName(
String roomName) → Future< GetNodesInRoomResponse> - Get nodes in the given room name
-
getScenario(
String address, int sceneID, {int output = 0, int timeout = kScenarioCmdTimeout}) → Future< SetScenarioResponse> -
Will request for the description of the scenario that has the given
sceneID
-
getSoftwareVersion(
) → Future< SoftwareVersionResponse> - Get ooPLA's software version
-
getState(
String address) → Future< GetStateResponse> -
Get the state of a device from its
address
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rebootGateway(
) → Future< RebootResponse> - Reboot ooPLA.
-
sendLevel(
String address, dynamic level, {int delay = 0, int transition = 0}) → Future< SendLevelResponse> -
Send the
level
to the device ataddress
-
sendRaw(
String address, dynamic raw, {int delay = 0, int transition = 0}) → Future< SendRawResponse> -
Send the
raw
level to the device ataddress
-
setConfig(
String address, int io, int index, int value, int correlation, {int version = 2}) → Future< MagicConfigResponse> -
Set the config value of the device at
address
-
setEpoch(
String address, {int io = 0, int timeout = kScenarioCmdTimeout}) → Future< SetEpochResponse> -
Will set the Epoch time stored on the device at
address
-
setLogLevel(
LogLevel priority, {String module = 'all'}) → Future< SetLogPriorityResponse> - Set logs priority for the chosen sotfware module at the given LogLevel.
-
setScenario(
String address, int sceneID, int level, {dynamic transition = 0, int output = 0, dynamic startAt = 0, dynamic duration = 0, List< String> daysInWeek = const <String>[], bool isActive = true, int timeout = kScenarioCmdTimeout}) → Future<SetScenarioResponse> -
A method to set a scenario on the device at
address
. -
startScenario(
int sceneID, {int timeout = kScenarioCmdTimeout}) → Future< SetScenarioResponse> -
Will start the scenario with the given ID (
0 <= sceneID < 511
) -
toggle(
String address) → Future< SetToggleResponse> -
Toggle the device at
address
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited