There are two kinds of Services in Automate: UserServices and SystemServices.

SystemServices are mainly designed to implement a practical way of writing an interface between your custom SystemObjects and their corresponding resources (devices for example). For example, RpioService provide access to Raspberry Pi GPIO pins for RpioActuator and RpioSensor objects, and ArduinoService, correspondingly, provides access to Arduino devices for ArduinoActuator and ArduinoSensors. (Arduino and RPIO support are provided by extensions, see Extensions).

UserServices, on the other hand, provide user interfaces to the system. For example, WebService provides access to the system via web browser, TextUIService via IPython shell and RpcService via XmlRPC (remote procedure call) interface for other applications.

If not automatically loaded (services with autoload set to True), they need to be instantiated (contrary to SystemObject) outside the System, and given in the initialization of the system (services). For example of initialization and configuring of WebService, see “Hello World” in Automate.

Services Class Definitions

class automate.service.AbstractService[source]

Base class for System and UserServices

autoload = False

If set to True, service is loaded automatically (if not explicitly prevented in automate.system.System.exclude_services). Overwrite this in subclasses,


Initialize service here. Define in subclasses.


Cleanup actions must be performed here. This must be blocking until service is fully cleaned up.

Define in subclasses.

class automate.service.AbstractUserService[source]

Baseclass for UserServices. These are set up on startup. They provide usually user interaction services.

class automate.service.AbstractSystemService[source]

Baseclass for SystemServices. These are set up by when first requested by Sensor or other object.

Builtin Services


Provides interface to log output. Used by WebService.

log_level = None

Log level

log_length = None

Log length

most_recent_line = None

The most recent log line is always updated here. t Subscription to this attribute can be used to follow new log entries.


Service which is responsible for scheduling dumping system into file periodically.

dump_interval = None

Dump saving interval, in seconds. Default 30 minutes.


Provides UML diagrams of the system as SVG images. Used by WebService.

PLantUMLService requires either PlantUML software (which is opensource software written in Java) to be installed locally (see or it is possible to use online service of In addition you need python package plantuml (available via PYPI).

url = None

URL of PlantUML Java Service. To use PlantUML online service, set this to ‘

arrow_colors = None

Arrow colors as HTML codes stored as a dictionary with keys: controlled_target, active_target, inactive_target, trigger

background_colors = None

Background colors as HTML codes, stored as a dictionary with keys: program, actuator, sensor


Writes PUML from the system. If filename is given, stores result in the file. Otherwise returns result as a string.


Returns PUML from the system as a SVG image. Requires plantuml library.


Provides interactive Python shell frontend to the System. Uses IPython if it is installed. Provides couple of functions to the System namespace.


List actuators, programs or sensors (what is string)


List actuators


List programs


List sensors

help(*args, **kwargs)[source]

Print Automate help if no parameter is given. Otherwise, act as


Start Text UI main loop