tuxeatpi_common.daemon module

Module defining Base Daemon for TuxEatPi daemons

class tuxeatpi_common.daemon.TepBaseDaemon(name, workdir, intents_folder, dialog_folder, logging_level=20)

Bases: object

Base Daemon for TuxEatPi

get_dialog(key, **kwargs)

Get dialog and render it

help_()

Return help for this daemon

main_loop()

Main loop

Could be ReImplemented for advanced component

publish(message, override_topic=None, qos=0)

Publish message to MQTT

reload()

Reload the daemon

set_config(config)

Save the configuration and reload the daemon

Returns:

  • True if the configuration looks good
  • False otherwise
shutdown()

Shutdown the daemon form mqtt message

signal_handler(signal_, frame)

Signal handler

start()

Startup function for main loop

wait_for_speaking(timeout=30)

Wait for start and end speech