diff --git a/README.md b/README.md index 2231b24..3d6d95e 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![tests](https://github.com/usetrmnl/byos_laravel/actions/workflows/test.yml/badge.svg)](https://github.com/usetrmnl/byos_laravel/actions/workflows/test.yml) TRMNL BYOS Laravel is a self-hostable implementation of a TRMNL server, built with Laravel. -It allows you to manage TRMNL devices, generate screens using **native plugins** (Screens API, Markup), **recipes** (130+ from the [OSS community catalog](https://bnussbau.github.io/trmnl-recipe-catalog/), 700+ from the [TRMNL catalog](https://trmnl.com/recipes), or your own), or the **API**, and can also act as a **proxy** for the native cloud service (Core). With over 50k downloads and 200+ stars, it’s the most popular community-driven BYOS. +It allows you to manage TRMNL devices, generate screens using **native plugins** (Screens API, Markup), **recipes** (120+ from the [OSS community catalog](https://bnussbau.github.io/trmnl-recipe-catalog/), 600+ from the [TRMNL catalog](https://trmnl.com/recipes), or your own), or the **API**, and can also act as a **proxy** for the native cloud service (Core). With over 40k downloads and 160+ stars, it’s the most popular community-driven BYOS. ![Screenshot](README_byos-screenshot.png) ![Screenshot](README_byos-screenshot-dark.png) diff --git a/app/Models/Device.php b/app/Models/Device.php index a5b0fdf..3583f48 100644 --- a/app/Models/Device.php +++ b/app/Models/Device.php @@ -42,7 +42,6 @@ class Device extends Model 'sleep_mode_to' => 'datetime:H:i', 'special_function' => 'string', 'pause_until' => 'datetime', - 'maximum_compatibility' => 'boolean', ]; public function getBatteryPercentAttribute(): int|float diff --git a/database/migrations/2026_02_01_121714_add_maximum_compatibility_to_devices_table.php b/database/migrations/2026_02_01_121714_add_maximum_compatibility_to_devices_table.php deleted file mode 100644 index a682c62..0000000 --- a/database/migrations/2026_02_01_121714_add_maximum_compatibility_to_devices_table.php +++ /dev/null @@ -1,22 +0,0 @@ -boolean("maximum_compatibility")->default(false); - }); - } - - public function down(): void - { - Schema::table("devices", function (Blueprint $table): void { - $table->dropColumn("maximum_compatibility"); - }); - } -}; diff --git a/resources/views/livewire/devices/configure.blade.php b/resources/views/livewire/devices/configure.blade.php index 91095e1..ce3e821 100644 --- a/resources/views/livewire/devices/configure.blade.php +++ b/resources/views/livewire/devices/configure.blade.php @@ -31,9 +31,6 @@ new class extends Component public $device_model_id; - // Signal to device to use high compatibility approaches when redrawing content - public $maximum_compatibility = false; - // Sleep mode and special function public $sleep_mode_enabled = false; @@ -84,7 +81,6 @@ new class extends Component $this->rotate = $device->rotate; $this->image_format = $device->image_format; $this->device_model_id = $device->device_model_id; - $this->maximum_compatibility = $device->maximum_compatibility; $this->deviceModels = DeviceModel::orderBy('label')->get()->sortBy(function ($deviceModel) { // Put TRMNL models at the top, then sort alphabetically within each group $isTrmnl = str_starts_with($deviceModel->label, 'TRMNL'); @@ -145,7 +141,6 @@ new class extends Component 'rotate' => 'required|integer|min:0|max:359', 'image_format' => 'required|string', 'device_model_id' => 'nullable|exists:device_models,id', - 'maximum_compatibility' => 'boolean', 'sleep_mode_enabled' => 'boolean', 'sleep_mode_from' => 'nullable|date_format:H:i', 'sleep_mode_to' => 'nullable|date_format:H:i', @@ -165,7 +160,6 @@ new class extends Component 'rotate' => $this->rotate, 'image_format' => $this->image_format, 'device_model_id' => $deviceModelId, - 'maximum_compatibility' => $this->maximum_compatibility, 'sleep_mode_enabled' => $this->sleep_mode_enabled, 'sleep_mode_from' => $this->sleep_mode_from, 'sleep_mode_to' => $this->sleep_mode_to, @@ -433,8 +427,6 @@ new class extends Component @endforeach - - @if(empty($device_model_id))
@@ -795,3 +787,4 @@ new class extends Component
+ diff --git a/routes/api.php b/routes/api.php index 73b2749..d201312 100644 --- a/routes/api.php +++ b/routes/api.php @@ -194,7 +194,6 @@ Route::get('/display', function (Request $request) { 'update_firmware' => $device->update_firmware, 'firmware_url' => $device->firmware_url, 'special_function' => $device->special_function ?? 'sleep', - 'maximum_compatibility' => $device->maximum_compatibility, ]; if (config('services.trmnl.image_url_timeout')) { diff --git a/tests/Feature/Api/DeviceEndpointsTest.php b/tests/Feature/Api/DeviceEndpointsTest.php index 54edb10..c98cb2f 100644 --- a/tests/Feature/Api/DeviceEndpointsTest.php +++ b/tests/Feature/Api/DeviceEndpointsTest.php @@ -45,7 +45,6 @@ test('device can fetch display data with valid credentials', function (): void { 'update_firmware' => false, 'firmware_url' => null, 'special_function' => 'sleep', - 'maximum_compatibility' => false, ]); expect($device->fresh()) @@ -96,27 +95,6 @@ test('display endpoint omits image_url_timeout when not configured', function () ->assertJsonMissing(['image_url_timeout']); }); -test('display endpoint includes maximum_compatibility value when true for device', function (): void { - $device = Device::factory()->create([ - 'mac_address' => '00:11:22:33:44:55', - 'api_key' => 'test-api-key', - 'maximum_compatibility' => true - ]); - - $response = $this->withHeaders([ - 'id' => $device->mac_address, - 'access-token' => $device->api_key, - 'rssi' => -70, - 'battery_voltage' => 3.8, - 'fw-version' => '1.0.0', - ])->get('/api/display'); - - $response->assertOk() - ->assertJson([ - 'maximum_compatibility' => true, - ]); -}); - test('new device is auto-assigned to user with auto-assign enabled', function (): void { $user = User::factory()->create(['assign_new_devices' => true]);