Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.go2rtc.server.Server Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass, str binary, *bool enable_ui=False)
 
None start (self)
 
None stop (self)
 

Private Member Functions

None _log_output (self, asyncio.subprocess.Process process)
 
None _log_server_output (self, int loglevel)
 
None _monitor_api (self)
 
None _monitor_process (self)
 
None _start (self)
 
None _stop (self)
 
None _stop_watchdog (self)
 
None _watchdog (self)
 

Private Attributes

 _api_ip
 
 _binary
 
 _hass
 
 _process
 
 _startup_complete
 
 _watchdog_task
 

Detailed Description

Go2rtc server.

Definition at line 77 of file server.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.go2rtc.server.Server.__init__ (   self,
HomeAssistant  hass,
str  binary,
*bool   enable_ui = False 
)
Initialize the server.

Definition at line 80 of file server.py.

Member Function Documentation

◆ _log_output()

None homeassistant.components.go2rtc.server.Server._log_output (   self,
asyncio.subprocess.Process  process 
)
private
Log the output of the process.

Definition at line 139 of file server.py.

◆ _log_server_output()

None homeassistant.components.go2rtc.server.Server._log_server_output (   self,
int  loglevel 
)
private
Log captured process output, then clear the log buffer.

Definition at line 153 of file server.py.

◆ _monitor_api()

None homeassistant.components.go2rtc.server.Server._monitor_api (   self)
private
Raise if the go2rtc process terminates.

Definition at line 206 of file server.py.

◆ _monitor_process()

None homeassistant.components.go2rtc.server.Server._monitor_process (   self)
private
Raise if the go2rtc process terminates.

Definition at line 198 of file server.py.

◆ _start()

None homeassistant.components.go2rtc.server.Server._start (   self)
private
Start the server.

Definition at line 103 of file server.py.

◆ _stop()

None homeassistant.components.go2rtc.server.Server._stop (   self)
private
Stop the server.

Definition at line 237 of file server.py.

◆ _stop_watchdog()

None homeassistant.components.go2rtc.server.Server._stop_watchdog (   self)
private
Handle watchdog stop request.

Definition at line 219 of file server.py.

◆ _watchdog()

None homeassistant.components.go2rtc.server.Server._watchdog (   self)
private
Keep respawning go2rtc servers.

A new go2rtc server is spawned if the process terminates or the API
stops responding.

Definition at line 159 of file server.py.

◆ start()

None homeassistant.components.go2rtc.server.Server.start (   self)
Start the server.

Definition at line 96 of file server.py.

◆ stop()

None homeassistant.components.go2rtc.server.Server.stop (   self)
Stop the server and abort the watchdog task.

Definition at line 231 of file server.py.

Member Data Documentation

◆ _api_ip

homeassistant.components.go2rtc.server.Server._api_ip
private

Definition at line 89 of file server.py.

◆ _binary

homeassistant.components.go2rtc.server.Server._binary
private

Definition at line 85 of file server.py.

◆ _hass

homeassistant.components.go2rtc.server.Server._hass
private

Definition at line 84 of file server.py.

◆ _process

homeassistant.components.go2rtc.server.Server._process
private

Definition at line 112 of file server.py.

◆ _startup_complete

homeassistant.components.go2rtc.server.Server._startup_complete
private

Definition at line 88 of file server.py.

◆ _watchdog_task

homeassistant.components.go2rtc.server.Server._watchdog_task
private

Definition at line 99 of file server.py.


The documentation for this class was generated from the following file: