Skip to content

thwinter-ch/frixos-gui

Repository files navigation

Frixos Dashboard

A web-based control panel for the Frixos daylight projection clock. Control your clock's display, brightness, and day/night settings directly from your browser - no Home Assistant required.

Frixos Dashboard

Features

  • Live Status Monitoring - Real-time display of device status, uptime, light level, and system logs
  • Scroll Message Control - Set custom messages with support for dynamic tokens like [temp], [rise], [set]
  • Brightness Control - Separate day and night brightness settings (0-100%)
  • Day/Night Threshold - Visual configuration of automatic dimming thresholds with hysteresis
  • Power Control - Adjust maximum LED power (1-1023)
  • Device Management - Restart your clock remotely

Quick Start

1. Clone the Repository

git clone https://github.com/thwinter-ch/frixos-gui.git
cd frixos-gui

2. Install Dependencies

pip install -r requirements.txt

3. Configure Your Clock's IP Address

Copy the example environment file and edit it with your Frixos clock's IP address:

cp .env.example .env

Edit .env:

FRIXOS_IP=192.168.1.132

4. Run the Dashboard

python dashboard.py

Open your browser to http://localhost:5000

Or use the batch file (Windows):

dashboard.bat

Configuration

The IP address of your Frixos clock is configured via the .env file:

FRIXOS_IP=192.168.1.132

The configuration is loaded in this priority order:

  1. FRIXOS_IP environment variable (if set)
  2. .env file in the project directory
  3. Default fallback: 192.168.1.132

Dashboard Controls

Device Info

Displays real-time information:

  • Version - Firmware version
  • Uptime - How long the clock has been running
  • Light - Current ambient light level in lux
  • IP - Device IP address

Scroll Message

Set the text that scrolls across your clock display. Supports dynamic tokens:

Token Description
[device] Device hostname
[greeting] Time-based greeting (Good Morning, etc.)
[day] Current day name
[date] Current date
[mon] Current month
[temp] Current temperature
[hum] Current humidity
[high] Today's high temperature
[low] Today's low temperature
[rise] Sunrise time
[set] Sunset time
[ha] Home Assistant data (if configured)
[stock] Stock price (if Finnhub configured)

Example: Hello World | [temp] | sun [rise]-[set]

Brightness

Control LED brightness separately for day and night modes:

  • Day - Brightness when ambient light is above the day threshold (0-100%)
  • Night - Brightness when ambient light is below the night threshold (0-100%)

Day/Night Threshold

Configure automatic dimming based on ambient light:

  • Threshold - The center point in lux for day/night switching
  • Sensitivity - Creates a hysteresis band to prevent flickering

The clock switches modes based on:

  • Night mode: ambient light < threshold - sensitivity
  • Day mode: ambient light > threshold + sensitivity
  • Hysteresis zone: in between (stays in current mode)

The visual display shows:

  • Dark purple zone (night)
  • Gradient transition zone (hysteresis)
  • Bright zone (day)
  • Red dot indicating current light level
  • White marker at threshold point

Power

Set the maximum LED power (1-1023). Higher values = brighter display but more power consumption.

Restart

Remotely restart your Frixos clock.

Python Client Library

The frixos_client.py module provides a Python API for controlling your clock programmatically:

from frixos_client import FrixosClient

# Connect to your clock (uses IP from .env by default)
client = FrixosClient()

# Or specify IP directly
client = FrixosClient("192.168.1.100")

# Get device status
status = client.get_status()
print(f"Light level: {status['lux']} lux")

# Set scroll message
client.set_message("Hello World | [temp]")

# Set brightness (day%, night%)
client.set_brightness(100, 30)

# Set day/night thresholds
client.set_thresholds(threshold=5, sensitivity=4)

# Set max power
client.set_power(750)

# Restart device
client.restart()

Command Line Interface

# Show device status
python frixos_client.py status

# Set scroll message
python frixos_client.py message "Hello World!"

# Set brightness
python frixos_client.py brightness 100 30

# Restart device
python frixos_client.py restart

Additional Scripts

The additional_scripts/ folder contains utility scripts for advanced use cases:

Python Scripts

Script Description
logs.py View or stream device logs
watcher.py Watch a text file and auto-update the clock display when it changes
status_log.py Maintain and push status messages to the clock
configure_frixos.py Configure Home Assistant integration
mock_ha_server.py Mock Home Assistant server for testing

Batch Files (Windows)

Script Description
view_logs.bat Show current device logs
stream_logs.bat Stream logs continuously
status.bat Show device status
restart_clock.bat Restart the clock
set_message.bat Set a scroll message
set_brightness.bat Set brightness levels
watch_file.bat Start the file watcher

Log Viewer

# Show current logs
python additional_scripts/logs.py

# Stream logs continuously
python additional_scripts/logs.py stream

File Watcher

Automatically update the clock display when a text file changes:

# Watch default file (status.txt)
python additional_scripts/watcher.py

# Watch a specific file
python additional_scripts/watcher.py myfile.txt

This is useful for:

  • Displaying build status from CI/CD pipelines
  • Showing system monitoring alerts
  • Integrating with other automation tools

API Reference

The Frixos clock exposes a REST API:

Endpoint Method Description
/api/status GET Device status, uptime, light level, logs
/api/settings GET All device settings
/api/settings POST Update device settings
/api/reset POST Restart device

Settings Parameters

Parameter Type Description
p04 string Day font
p05 string Night font
p12 string Day message color (hex)
p15 string Night message color (hex)
p16 string Scroll message
p20 int Light sensitivity (lux)
p21 int Day threshold (lux)
p23 [int, int] Brightness [day%, night%]
p25 string Home Assistant URL
p26 string Home Assistant token
p27 int Home Assistant refresh interval (minutes)
p43 int Max power (1-1023)

Requirements

  • Python 3.8+
  • Flask >= 2.0.0
  • Requests >= 2.28.0

Project Structure

frixos/
├── dashboard.py          # Web dashboard (main application)
├── frixos_client.py      # Python client library
├── dashboard.bat         # Windows launcher
├── requirements.txt      # Python dependencies
├── .env                  # Configuration (your clock's IP)
├── .env.example          # Configuration template
├── .gitignore            # Git ignore rules
├── README.md             # This file
└── additional_scripts/   # Utility scripts
    ├── logs.py           # Log viewer
    ├── watcher.py        # File watcher
    ├── status_log.py     # Status logger
    ├── configure_frixos.py   # HA configuration
    ├── mock_ha_server.py     # Mock HA server
    └── *.bat             # Windows batch files

License

MIT License

Links

About

Helper GUI for the https://buyfrixos.com/ Projection clock.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages