Remote Procedure Call Support for Automate

Introduction

This extension provides XmlRPC API for external applications. Exported API is by default defined by automate.extensions.rpc.rpc.ExternalApi.

Installation

Install extras:

pip install automate[rpc]

Class definitions

class automate.extensions.rpc.RpcService[source]
view_tags = None

Tags that are displayed via get_websensors RPC function

api = None

If you want to define custom api (similar to, or derived from ExternalApi, it can be given here.

class automate.extensions.rpc.rpc.ExternalApi(system, tag)[source]
set_status(name, status)[source]

Set sensor name status to status.

get_status(name)[source]

Get status of object with name name.

set_object_status(statusdict)[source]

Set statuses from a dictionary of format {name: status}

toggle_object_status(objname)[source]

Toggle boolean-valued sensor status between True and False.

get_sensors()[source]

Get sensors as a dictionary of format {name: status}

get_websensors()[source]

Get sensors with defined tag as a dictionary of format {name: status}

get_actuators()[source]

Get actuators as a dictionary of format {name: status}

flush()[source]

Flush the system queue. If you have just set a status and then read a value, it might be necessary to flush queue first, such that related changes have been applied.

is_alive()[source]

Simple RPC command that returns always True.

log()[source]

Return recent log entries as a string.