Utility modules (pyobs.modules.utils)
Utilities TODO: write doc
FluentLogger
Kiosk
- class Kiosk(camera: ICamera | str, port: int = 37077, **kwargs: Any)
Bases:
Module,IStartStopA kiosk mode for a pyobs camera that takes images and published them via HTTP.
Initializes file cache.
- Parameters:
camera – Camera to use for kiosk mode.
port – Port for HTTP server.
- async image_handler(request: Request) Response[source]
Handles access to /* and returns a specified image.
- Parameters:
request – Request to respond to.
- Returns:
Response containing image.
- property opened: bool
Whether the server is started.
Matrix
- class Matrix(server: str, user_id: str, password: str, room_id: str, name: str = 'Bot', log_level: str = 'WARNING', **kwargs: Any)
Bases:
ModuleA matrix bot.
Initialize a new bot.
- Parameters:
server – Server to connect to.
user_id – ID of user to connect as.
password – Password for user.
room_id – Room ID to send messages to.
name – Name of bot.
log_level – Log level to use.
Telegram
Trigger
- class Trigger(triggers: list[dict[str, Any]], **kwargs: Any)
Bases:
Module,IAutonomousA module that can call another module’s methods when a specific event occurs.
Initialize a new trigger module.
- Parameters:
triggers – List of dictionaries defining the trigger. Must contain fields for event, module and method, may contain a sender.