Skip to content

Usage Guide

JP IT edited this page Jan 22, 2026 · 1 revision

Usage Guide

URL Parameters

Parameter Values Description
mode dark, light Force theme mode
slim true Enable slim mode for minimal UI
header full, small, none Header display mode
pause true Show Pause/Resume button for polling
fast true Force fast mode (skip cache) and disable ping latency checks

Examples:

https://your-proxy.com/?mode=dark
https://your-proxy.com/?slim=true&header=none
https://your-proxy.com/?mode=light&header=small
https://your-proxy.com/?pause=true
https://your-proxy.com/?fast=true

Proxy Endpoint

Proxy external images through ohProxy (http/https only, with domain allowlist):

/proxy?url=https://allowed-domain.com/image.jpg

Configure allowed domains in proxyAllowlist:

proxyAllowlist: [
  'example.com',
  'camera.local:8080',
],

MJPEG Streams

For MJPEG camera streams, use a normal http/https URL in your openHAB sitemap (ohProxy will stream it via /proxy?url=). Ensure the host is in proxyAllowlist.

Image url="http://camera.local/stream"

RTSP Streaming

ohProxy can convert RTSP streams to browser-playable MP4 via FFmpeg. Use the Video widget in your sitemap:

Video url="rtsp://user:pass@camera-ip:554/stream"

The RTSP host must be in proxyAllowlist:

proxyAllowlist: [
  '192.168.1.40:554',  // camera IP:port
],

Features:

  • Low-latency streaming (~1-2s with 1s keyframes)
  • No transcoding (H264 passthrough)
  • Auto-reconnect on stream errors
  • FFmpeg process auto-terminates when client disconnects

Requirements:

  • FFmpeg must be installed on the server

Classic UI

Legacy openHAB Classic UI is proxied at /openhab.app, with a convenience redirect at /classic.

GPS Presence Map

The /presence endpoint displays a map showing recent GPS location history. This requires MySQL to be configured (see Configuration#mysql-configuration).

https://your-proxy.com/presence

Features:

  • Displays last 20 GPS positions on an OpenLayers map with OSM tiles
  • Most recent position marked with red marker, older positions in blue
  • Consecutive duplicate coordinates are deduplicated
  • Map centers on the most recent position at zoom level 15
  • 10-second query timeout with graceful fallback

Database Schema:

The endpoint queries a log_gps table with the following structure:

CREATE TABLE log_gps (
  id INT AUTO_INCREMENT PRIMARY KEY,
  lat DECIMAL(10, 7) NOT NULL,
  lon DECIMAL(10, 7) NOT NULL,
  -- Additional columns are ignored
);
Column Type Description
id INT Auto-increment primary key (used for ordering)
lat DECIMAL(10,7) Latitude coordinate
lon DECIMAL(10,7) Longitude coordinate

Error Responses:

  • 503 - Database connection unavailable (blank HTML page)
  • 504 - Query timeout or failure (blank HTML page)

Marker Images:

The map expects marker images at:

  • /images/marker-red.png - Current position
  • /images/marker-blue.png - Historical positions

Clone this wiki locally