dotbot.edge_gateway module#

Interface of the Dotbot Edge Gateway.

class dotbot.edge_gateway.EdgeGateway(settings)[source]#

Bases: object

Edge gateway class.

Parameters:

settings (EdgeGatewaySettings)

handle_byte(byte)[source]#

Called on each byte received over UART.

on_connect(_, flags, rc, properties)[source]#
on_disconnect(_, packet, exc=None)[source]#
on_message(_, topic, payload, qos, properties)[source]#

Called when a message is received from the controller.

on_subscribe(client, mid, qos, properties)[source]#
async run()[source]#

Launch the controller.

send_frame(frame)[source]#

Sends a command in an HDLC frame over serial.

Parameters:

frame (Frame)

class dotbot.edge_gateway.EdgeGatewaySettings(port, baudrate, dotbot_address, gw_address, verbose=False)[source]#

Bases: object

Data class that holds controller settings.

Parameters:
  • port (str)

  • baudrate (int)

  • dotbot_address (str)

  • gw_address (str)

  • verbose (bool)

baudrate: int#
dotbot_address: str#
gw_address: str#
port: str#
verbose: bool = False#