Skip to content

Commit 431204e

Browse files
committed
docs: Update README and add Configuration Updates document to reflect new app-based settings management
1 parent c064c38 commit 431204e

2 files changed

Lines changed: 170 additions & 58 deletions

File tree

README.md

Lines changed: 57 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -176,34 +176,35 @@ The Mobileraker Companion is designed to support multiple printers. If you are u
176176
Alternatively, you can manually edit the `mobileraker.conf` file to add a new `[printer <Name>]` section for each printer. Refer to the following section for detailed information about the configuration format.
177177

178178
# Companion - Config
179-
By default, you don't need to create a config file. However, if you want to use multiple printers with a single Companion instance, enforce logins via Moonraker, or modify the notification behavior, you can customize the configuration. Below is an overview of the available sections and configurations
179+
180+
The Companion is designed to work with minimal configuration, prioritizing settings from the Mobileraker app when available. For a detailed guide on the new configuration system, please see [Configuration Updates](docs/Configuration_Updates.md).
181+
182+
## Configuration Sources
183+
184+
Settings are now applied in the following order of priority:
185+
186+
1. **Device-specific settings** from the Mobileraker app
187+
2. **Global app settings** (if device inherits global settings)
188+
3. **Configuration file** (fallback for older app versions)
189+
4. **Default values**
190+
191+
## Configuration File
192+
193+
While most settings can now be managed through the app, you can still use the configuration file for basic setup. The configuration file supports the following sections and options:
180194

181195
```properties
182196
[general]
183-
language: en
184-
# !!! DEPRECATED. The app now syncs the app's language to the companion
185-
# one of the supported languages defined in i18n.py#languages (de,en,...)
186-
# !!! For users from the UK: entering 'uk' will resolve to Ukrainian language, not English. Use 'en' for English!
187-
# Default: en
188197
timezone: Europe/Berlin
189198
# correct timezone e.g. Europe/Berlin for Berlin time or US/Central.
190199
# For more values see https://gist.github.com/heyalexej/8bf688fd67d7199be4a1682b3eec7568
191200
# Default: Tries to use system timezone
192201
# Optional
193-
eta_format: %%d.%%m.%%Y, %%H:%%M:%%S
194-
# Format used for eta and adaptive_eta placeholder variables
195-
# For available options see https://strftime.org/
196-
# Note that you will have to escape the % char by using a 2nd one e.g.: %d/%m/%Y -> %%d/%%m/%%Y
197-
# Default: %%d.%%m.%%Y, %%H:%%M:%%S
198-
# Optional
199202
include_snapshot: True
200-
# !! SUPPORTER ONLY - This feature requires beeing a supporter of Mobileraker as of now!
203+
# !! SUPPORTER ONLY - This feature requires being a supporter of Mobileraker as of now!
201204
# Include a snapshot of the webcam in any print status/progress update notifications
202205
# Default: True
203206
# Optional
204207
205-
206-
207208
# Add a [printer ...] section for every printer you want to add
208209
[printer <NAME OF YOUR PRINTER: optional>]
209210
moonraker_uri: ws://127.0.0.1:7125/websocket
@@ -214,63 +215,61 @@ moonraker_api_key: False
214215
# Moonraker API key if force_logins or trusted clients is active!
215216
# Default value: False
216217
# Optional
217-
snapshot_uri: http://127.0.0.1/webcam/?action=snapshot
218-
# !! SUPPORTER ONLY - This feature requires beeing a supporter of Mobileraker as of now!
219-
# The ABSOLUT url to the webcam, the companion should make a screenshot of.
220-
# Default:
221-
# Optional
222-
snapshot_rotation: 0
223-
# The rotation applied to the image. Valid values : 0, 90, 180, 270
224-
# Default: 0
225-
# Optional
226-
ignore_filament_sensors:
227-
# Comma separated list of filament sensors to ignore, ignored filament sensors do not trigger
228-
# a notification if they are triggered. This is useful if you have a filament sensor that is used
229-
# in a MMU setup like ERCF.
230-
# IMPORTANT, do not include the sensor type. E.g. if your sensor is configured
231-
# like: [filament_switch_sensor printhead_sensor] add `printhead_sensor` to the list.
232-
# Default: empty
233-
# Optional
234-
235218
```
236-
> [!IMPORTANT]
237-
> Please note that the configuration entry for the printer's Moonraker endpoint is `moonraker_uri`, not `moonraker_url`. It's a common mistake to confuse these two. Ensure you're using the correct key in your configuration.
238219

220+
## Settings Managed in the App
239221

240-
The Companion searches for a `Mobileraker.conf` file in the following locations (in order of precedence):
241-
1. `~/Mobileraker.conf`
242-
2. `<mobileraker_companion DIR>/mobileraker.conf`
243-
3. `~/printer_data/config/mobileraker.conf`
244-
4. `~/klipper_config/mobileraker.conf`
222+
The following settings are now managed through the Mobileraker app (v2.8.8+) rather than the configuration file:
223+
224+
- **Language**: Set in app Settings > App > Language
225+
- **Time Format**: Choose between 12h and 24h formats
226+
- **Webcam Selection**: Select from webcams configured in Moonraker
227+
- **Filament Sensor Exclusions**: Configure which sensors to ignore per device
245228

229+
## Backward Compatibility
230+
231+
For compatibility with older app versions, the following configuration options are still supported in the configuration file, but will be overridden by app settings when available:
246232

247-
A single Companion instance can support multiple printers. To configure multiple printers, add more `[printer ...]` sections to your config. Here's an example of a multi-printer config:
248-
Example multi-printer config:
249233
```properties
250-
[printer V2.1111]
251-
moonraker_uri: ws://127.0.0.1:7125/websocket
252-
# Define the uri to the moonraker instance.
253-
# Default value: ws://127.0.0.1:7125/websocket
254-
moonraker_api_key: False
255-
# Moonraker API key if force_logins or trusted clients is active!
234+
[general]
235+
language: en
236+
# !!! DEPRECATED. The app now syncs the app's language to the companion
237+
# For users from the UK: entering 'uk' will resolve to Ukrainian language, not English. Use 'en' for English!
238+
# Default: en
239+
eta_format: %%d.%%m.%%Y, %%H:%%M:%%S
240+
# !!! DEPRECATED. Now derived from the time format preference in the app
241+
# Format used for eta and adaptive_eta placeholder variables
242+
# Default: %%d.%%m.%%Y, %%H:%%M:%%S
256243
257-
[printer Ratty]
258-
moonraker_uri: ws://ratrig.home:7125/websocket
259-
# Define the uri to the moonraker instance.
260-
# Default value: ws://127.0.0.1:7125/websocket
261-
moonraker_api_key: False
262-
# Moonraker API key if force_logins is active!
263-
ignore_filament_sensors: printhead_sensor, sensor_name2
244+
[printer <NAME>]
245+
snapshot_uri: http://127.0.0.1/webcam/?action=snapshot
246+
# !!! DEPRECATED. Now uses webcam selection from app with Moonraker webcam API
247+
# The ABSOLUTE url to the webcam for snapshots
248+
snapshot_rotation: 0
249+
# !!! DEPRECATED. Now uses rotation from webcam configuration in Moonraker
250+
# Valid values: 0, 90, 180, 270
251+
# Default: 0
252+
ignore_filament_sensors:
253+
# !!! DEPRECATED. Now configured per device in the Mobileraker app
254+
# Comma separated list of filament sensors to ignore
264255
```
265256

257+
The Companion searches for a `Mobileraker.conf` file in the following locations (in order of precedence):
258+
1. Path provided via `-c` parameter
259+
2. `~/Mobileraker.conf`
260+
3. `<mobileraker_companion DIR>/mobileraker.conf`
261+
4. `~/printer_data/config/mobileraker.conf`
262+
5. `~/klipper_config/mobileraker.conf`
263+
264+
> [!IMPORTANT]
265+
> Please note that the configuration entry for the printer's Moonraker endpoint is `moonraker_uri`, not `moonraker_url`. It's a common mistake to confuse these two. Ensure you're using the correct key in your configuration.
266+
266267
> [!NOTE]
267-
> Please restart the system service to ensure the new config values are used.
268-
> You can do this by running the following terminal command:
268+
> Please restart the system service after editing the configuration file:
269269
> ```bash
270270
> sudo systemctl restart mobileraker.service
271271
> ```
272272

273-
274273
# Moonraker - Update manager
275274
In order to get moonrakers update manager working with the companion add the following section to your `moonraker.conf`.
276275
```

docs/Configuration_Updates.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Mobileraker Configuration Updates
2+
3+
The v0.5.0 version of Mobileraker Companion introduces significant improvements to how configuration is managed, moving away from relying on the configuration file and instead using settings from the Mobileraker app. This document explains these changes and how they affect your setup.
4+
5+
## Table of Contents
6+
- [Mobileraker Configuration Updates](#mobileraker-configuration-updates)
7+
- [Table of Contents](#table-of-contents)
8+
- [Overview of Changes](#overview-of-changes)
9+
- [New Settings in the App](#new-settings-in-the-app)
10+
- [Configuration Priority](#configuration-priority)
11+
- [Simplified Configuration File](#simplified-configuration-file)
12+
- [Migration Guide](#migration-guide)
13+
- [Webcam Integration](#webcam-integration)
14+
- [Frequently Asked Questions](#frequently-asked-questions)
15+
16+
## Overview of Changes
17+
18+
Mobileraker Companion now prioritizes settings from the app over the `Mobileraker.conf` file, providing a more streamlined user experience. The following settings have been moved from the configuration file to the app:
19+
20+
1. **Language**: Set in the app and synced to the companion
21+
2. **Time Format**: Choose between 12h and 24h formats in the app
22+
3. **Webcam Selection**: Select from configured webcams in Moonraker
23+
4. **Filament Sensor Exclusions**: Configure which sensors to ignore per device
24+
25+
This change enables device-specific configurations, allowing different devices to have different settings for the same printer.
26+
27+
## New Settings in the App
28+
29+
The following settings are now managed through the Mobileraker app:
30+
31+
| Setting | Description | Location in App |
32+
|---------|-------------|----------------|
33+
| Language | Interface language | Settings > App > Language |
34+
| Time Format | 12h or 24h time display | Settings > App > Time Format |
35+
| Webcam Selection | Choose specific webcam for notifications | Settings > Printer > Notifications > Webcam |
36+
| Filament Sensor Exclusions | Ignore specific filament sensors | Settings > Printer > Notifications > Excluded Sensors |
37+
38+
## Configuration Priority
39+
40+
Settings are now applied in the following order of priority:
41+
42+
1. **Device-specific settings** from the app
43+
2. **Global app settings** (if device is set to inherit global settings)
44+
3. **Configuration file** (as fallback for older app versions)
45+
4. **Default values**
46+
47+
This ensures backward compatibility while providing the benefits of device-specific settings.
48+
49+
## Simplified Configuration File
50+
51+
With many settings now managed in the app, your `Mobileraker.conf` file can be simplified to include only necessary information. Here's an example of a minimal configuration:
52+
53+
```ini
54+
[general]
55+
timezone: Europe/Berlin
56+
include_snapshot: True
57+
58+
[printer My Printer]
59+
moonraker_uri: ws://192.168.1.10:7125/websocket
60+
moonraker_api_key: False
61+
```
62+
63+
The following settings can now be removed from your configuration file as they're managed in the app:
64+
65+
- `language`
66+
- `eta_format` (derived from time format preference)
67+
- `snapshot_uri` (derived from webcam selection)
68+
- `snapshot_rotation` (derived from webcam configuration)
69+
- `ignore_filament_sensors` (managed per device in app)
70+
71+
## Migration Guide
72+
73+
To migrate to the new configuration system:
74+
75+
1. **Update Mobileraker Companion** to the latest version
76+
2. **Update the Mobileraker App** to version 2.8.8 or later
77+
3. **Configure your webcams** in Mainsail or Fluidd
78+
4. **Set your preferences** in the Mobileraker app
79+
5. (Optional) **Simplify your configuration file** by removing settings now managed in the app
80+
81+
Your existing configuration file will continue to work as a fallback, so this migration doesn't require immediate changes.
82+
83+
## Webcam Integration
84+
85+
The companion now integrates directly with Moonraker's webcam API, providing several advantages:
86+
87+
- **Configuration Sync**: Webcam settings (rotation, flipping) are automatically synced from Mainsail/Fluidd
88+
- **Multiple Webcams**: Different devices can use different webcams for the same printer
89+
- **No URI Management**: No need to manually specify webcam URIs - just select from configured webcams
90+
91+
To use this feature:
92+
93+
1. Configure your webcams in Mainsail or Fluidd
94+
2. In the Mobileraker app, go to Settings > Printer > Notifications
95+
3. Select your preferred webcam from the dropdown list
96+
4. The companion will automatically use the selected webcam for notifications
97+
98+
## Frequently Asked Questions
99+
100+
**Q: Do I need to update my configuration file?**
101+
A: No, your existing configuration file will continue to work. The new settings in the app will take precedence when available.
102+
103+
**Q: Will my device-specific settings affect other devices?**
104+
A: No, each device can have its own settings for the same printer.
105+
106+
**Q: What happens if I use an older version of the app?**
107+
A: The companion will fall back to the configuration file for any settings not available in the app JSON.
108+
109+
**Q: Do I need to restart the companion after changing settings in the app?**
110+
A: No, the companion will automatically detect and apply changes from the app within 2 hours (the cache expiration time).
111+
112+
**Q: Can I still use the configuration file for some settings?**
113+
A: Yes, the timezone and general configuration options are still managed through the configuration file.

0 commit comments

Comments
 (0)