scsgate package¶
Subpackages¶
Submodules¶
scsgate.connection module¶
This module contains an helper class to initiate a connection with the SCSGate device
scsgate.messages module¶
This module contains the definition of all the messages known by SCSGate
-
class
scsgate.messages.AckMessage[source]¶ Bases:
scsgate.messages.SCSMessageAck message
-
class
scsgate.messages.CommandMessage(data)[source]¶ Bases:
scsgate.messages.SCSMessageMessage issued to turn on/off a switch
-
destination¶ The target of the message
-
entity¶ The ID of the subject of this message
-
source¶ The source of the message
-
status¶ Current status
-
-
class
scsgate.messages.RequestStatusMessage(data)[source]¶ Bases:
scsgate.messages.SCSMessageMessage sent to request the status of a switch
-
destination¶ The target of the message
-
entity¶ The ID of the subject of this message
-
source¶ The source of the message
-
-
class
scsgate.messages.SCSMessage(data)[source]¶ Bases:
objectBase class for all SCS messages
-
bytes¶ A list containing all the bytes of the message
-
data¶ The raw message
-
entity¶ The ID of the subject of this message
-
-
class
scsgate.messages.ScenarioTriggeredMessage(data)[source]¶ Bases:
scsgate.messages.SCSMessageMessage issued when a scenario switch is pressed
-
entity¶ The ID of the subject of this message
-
scenario¶ The scenario ID
-
source¶ The source of the message
-
-
class
scsgate.messages.StateMessage(data)[source]¶ Bases:
scsgate.messages.SCSMessageMessage issued to notify a change of state
-
entity¶ The ID of the subject of this message
-
source¶ The source of the message
-
status¶ Current status
-
toggled¶ True if the light is toggled, False otherwise
-
-
class
scsgate.messages.UnknownMessage(data)[source]¶ Bases:
scsgate.messages.SCSMessageMessage unknown
-
scsgate.messages.checksum_bytes(data)[source]¶ Returns a XOR of all the bytes specified inside of the given list
scsgate.reactor module¶
This module contains the definition of the Reactor class. This one is useful when dealing with concurrent access to the SCSGate device
-
class
scsgate.reactor.Reactor(connection, handle_message, logger=None)[source]¶ Bases:
threading.ThreadAllows concurrent access to the SCSGate device
scsgate.tasks module¶
This module contains all the possible messages to send via scsgate.Reactor
-
exception
scsgate.tasks.ExecutionError[source]¶ Bases:
BaseExceptionError raised when something goes wrong while executing a task
-
class
scsgate.tasks.GetStatusTask(target)[source]¶ Bases:
scsgate.tasks.BasicTaskRequests the current status of a device
-
class
scsgate.tasks.HaltRollerShutterTask(target)[source]¶ Bases:
scsgate.tasks.SetStatusTaskHalt a roller shutter
-
class
scsgate.tasks.LowerRollerShutterTask(target)[source]¶ Bases:
scsgate.tasks.SetStatusTaskLower a roller shutter
-
class
scsgate.tasks.MonitorTask(notification_endpoint)[source]¶ Bases:
scsgate.tasks.BasicTaskRead the buffer and invokes the notification endpoint if there’s a relevant message
-
class
scsgate.tasks.RaiseRollerShutterTask(target)[source]¶ Bases:
scsgate.tasks.SetStatusTaskRaise a roller shutter
-
class
scsgate.tasks.SetStatusTask(target, action)[source]¶ Bases:
scsgate.tasks.BasicTaskGeneric task to request a status change. To not be used directly
-
class
scsgate.tasks.ToggleStatusTask(target, toggled)[source]¶ Bases:
scsgate.tasks.SetStatusTaskChange the toggled status of a light or switch