Skip to content

Commit

Permalink
Janus installation helpdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Sep 1, 2024
1 parent 5efb6e4 commit 0ca2d65
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions moonraker_obico/webcam_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def start(self, webcam_configs):

(janus_bin_path, ld_lib_path) = build_janus_config(webcams_to_build_janus_config, self.app_config.server.auth_token, JANUS_WS_PORT, JANUS_ADMIN_WS_PORT)
if not janus_bin_path:
raise JanusNotFoundException('Janus not found or not configured correctly.')
raise JanusNotFoundException('Janus not found or not configured correctly. Click the link for troubleshooting guide.')

self.janus = JanusConn(JANUS_WS_PORT, self.app_config, self.server_conn, self.is_pro, self.sentry)
self.janus.start(janus_bin_path, ld_lib_path)
Expand Down Expand Up @@ -155,7 +155,7 @@ def start(self, webcam_configs):
except JanusNotFoundException as e:
streaming_error = str(e)
_logger.error(f'{e} Webcam is now streaming in 0.1FPS.', exc_info=True)
self.send_streaming_failed_event(streaming_error)
self.send_streaming_failed_event(streaming_error, info_url='https://obico.io/docs/user-guides/webcam-install-janus/')
self.shutdown()
# When Janus is not found, we will stream the primary camera in 0.1FPS. This provides a better user experience, and is compatible with old mobile app versions
normalized_webcams = [self.normalized_webcam_dict(webcam) for webcam in self.webcams if webcam.is_primary_camera]
Expand All @@ -177,12 +177,12 @@ def shutdown(self):
self.close_all_mjpeg_socks()
return ('ok', None) # return value expected for a passthru target

def send_streaming_failed_event(self, error=None):
def send_streaming_failed_event(self, error=None, info_url='https://obico.io/docs/user-guides/moonraker-obico/webcam/'):
self.server_conn.post_printer_event_to_server(
'moonraker-obico: Webcam Streaming Failed',
error if error else f'Make sure the webcam is properly configured in moonraker-obico.cfg.',
event_class='WARNING',
info_url='https://obico.io/docs/user-guides/moonraker-obico/webcam/',
info_url=info_url
)

def find_streaming_params(self):
Expand Down

0 comments on commit 0ca2d65

Please sign in to comment.