From 5251bc1a62620982559a215c8de34782e2ae931a Mon Sep 17 00:00:00 2001
From: Olivier <16240457+TiTidom-RC@users.noreply.github.com>
Date: Sat, 23 May 2026 13:53:38 +0200
Subject: [PATCH 1/3] Add PHP/Python CI workflows and config
Add GitHub Actions workflows to improve CI coverage: a PHP compatibility workflow (checkPHPCompat.yml) that runs PHPStan across PHP 7.4/8.2/8.4 against a sparse clone of Jeedom Core, and a Python lint workflow (checkPython.yml) using ruff for resources/tvremoted. Also add phpstan.neon.dist to enable reportUnmatchedIgnoredErrors, and tweak existing checkPHP.yml to name the PHP lint job. Update .vscode/settings.json to include phpstan and shivammathur entries.
---
.github/workflows/checkPHP.yml | 1 +
.github/workflows/checkPHPCompat.yml | 40 ++++++++++++++++++++++++++++
.github/workflows/checkPython.yml | 25 +++++++++++++++++
.vscode/settings.json | 2 ++
phpstan.neon.dist | 2 ++
5 files changed, 70 insertions(+)
create mode 100644 .github/workflows/checkPHPCompat.yml
create mode 100644 .github/workflows/checkPython.yml
create mode 100644 phpstan.neon.dist
diff --git a/.github/workflows/checkPHP.yml b/.github/workflows/checkPHP.yml
index 0d68f3e..eae9699 100644
--- a/.github/workflows/checkPHP.yml
+++ b/.github/workflows/checkPHP.yml
@@ -7,6 +7,7 @@ on:
jobs:
php-lint:
+ name: PHP Lint — PHP 8.4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
diff --git a/.github/workflows/checkPHPCompat.yml b/.github/workflows/checkPHPCompat.yml
new file mode 100644
index 0000000..6c9e618
--- /dev/null
+++ b/.github/workflows/checkPHPCompat.yml
@@ -0,0 +1,40 @@
+name: PHP Compatibility Check
+
+on:
+ pull_request:
+ branches:
+ - beta
+
+jobs:
+ php-compat:
+ name: PHPStan — PHP ${{ matrix.php-version }}
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ php-version: ['7.4', '8.2', '8.4']
+
+ steps:
+ - uses: actions/checkout@v6
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-version }}
+ tools: composer
+ coverage: none
+
+ - name: Install PHPStan
+ run: composer global require phpstan/phpstan --no-interaction --quiet
+
+ - name: Checkout Jeedom Core (sparse)
+ run: |
+ git clone --depth 1 --filter=blob:none --sparse \
+ https://github.com/jeedom/core.git /tmp/jeedom-core
+ git -C /tmp/jeedom-core sparse-checkout set core/class core/php core/repo
+
+ - name: PHP ${{ matrix.php-version }} Compatibility Check
+ run: |
+ PHPSTAN_VERSION=$(echo "${{ matrix.php-version }}" | awk -F. '{printf "%d%02d00", $1, $2}')
+ printf 'includes:\n - phpstan.neon.dist\nparameters:\n phpVersion: %s\n scanDirectories:\n - /tmp/jeedom-core/core/class\n - /tmp/jeedom-core/core/php\n - /tmp/jeedom-core/core/repo\n' "$PHPSTAN_VERSION" > phpstan.neon
+ phpstan analyse --level 0 --no-progress core/ desktop/ plugin_info/
diff --git a/.github/workflows/checkPython.yml b/.github/workflows/checkPython.yml
new file mode 100644
index 0000000..75c4024
--- /dev/null
+++ b/.github/workflows/checkPython.yml
@@ -0,0 +1,25 @@
+name: Python Check
+
+on:
+ pull_request:
+ branches:
+ - beta
+
+jobs:
+ python-check:
+ name: Ruff Lint
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v6
+
+ - name: Setup Python
+ uses: actions/setup-python@v6
+ with:
+ python-version: '3.12'
+
+ - name: Install ruff
+ run: pip install ruff
+
+ - name: Ruff Check
+ run: ruff check resources/tvremoted/
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 902281d..c9a2cd0 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -60,6 +60,7 @@
"orangetv",
"owtv",
"paircode",
+ "phpstan",
"phpunit",
"plex",
"primevideo",
@@ -77,6 +78,7 @@
"scanupdtvremote",
"screencap",
"sendpaircode",
+ "shivammathur",
"sockethost",
"spotify",
"stype",
diff --git a/phpstan.neon.dist b/phpstan.neon.dist
new file mode 100644
index 0000000..4763a9e
--- /dev/null
+++ b/phpstan.neon.dist
@@ -0,0 +1,2 @@
+parameters:
+ reportUnmatchedIgnoredErrors: true
From 4112c2fb29d7ff7906771c85d7e853ca30569f0d Mon Sep 17 00:00:00 2001
From: Olivier <16240457+TiTidom-RC@users.noreply.github.com>
Date: Wed, 27 May 2026 22:35:00 +0200
Subject: [PATCH 2/3] Add TV libraries log level option
Introduce a configurable log level for TV-related libraries (zeroconf, androidtvremote2, adb_shell). Adds a tvLogLevel UI setting (default 'daemon' to inherit the daemon level), persists the default on install/update, passes --tvloglevel to the daemon, and applies the chosen level to the respective library loggers. Also bumps plugin version to 1.3.19 and updates zeroconf to 0.149.16.
---
.vscode/settings.json | 1 +
core/class/tvremote.class.php | 1 +
plugin_info/configuration.php | 16 ++++++++++++++++
plugin_info/info.json | 2 +-
plugin_info/install.php | 6 ++++++
resources/requirements.txt | 2 +-
resources/tvremoted/config.py | 4 ++++
resources/tvremoted/tvremoted.py | 7 +++++++
8 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/.vscode/settings.json b/.vscode/settings.json
index c9a2cd0..600a248 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -85,6 +85,7 @@
"tunein",
"tvhosts",
"TVHOSTS",
+ "tvloglevel",
"tvremote",
"tvremoted",
"updatelasttime",
diff --git a/core/class/tvremote.class.php b/core/class/tvremote.class.php
index 3e1c9fd..ed1e85b 100644
--- a/core/class/tvremote.class.php
+++ b/core/class/tvremote.class.php
@@ -137,6 +137,7 @@ public static function deamon_start() {
$path = realpath(__DIR__ . '/../../resources/tvremoted');
$cmd = self::PYTHON3_PATH . " {$path}/tvremoted.py";
$cmd .= ' --loglevel ' . log::convertLogLevel(log::getLogLevel(__CLASS__));
+ $cmd .= ' --tvloglevel ' . config::byKey('tvLogLevel', __CLASS__, 'daemon');
$cmd .= ' --pluginversion ' . config::byKey('pluginVersion', __CLASS__, '0.0.0');
$cmd .= ' --socketport ' . config::byKey('socketport', __CLASS__, '55112');
$cmd .= ' --cyclefactor ' . config::byKey('cyclefactor', __CLASS__, '1.0');
diff --git a/plugin_info/configuration.php b/plugin_info/configuration.php
index ae3a325..683bd55 100644
--- a/plugin_info/configuration.php
+++ b/plugin_info/configuration.php
@@ -113,6 +113,22 @@
+