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..600a248 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -60,6 +60,7 @@
"orangetv",
"owtv",
"paircode",
+ "phpstan",
"phpunit",
"plex",
"primevideo",
@@ -77,12 +78,14 @@
"scanupdtvremote",
"screencap",
"sendpaircode",
+ "shivammathur",
"sockethost",
"spotify",
"stype",
"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/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
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 @@
+