From 4e73ef9dab1790f744d401462fecb1bf99ccc9d7 Mon Sep 17 00:00:00 2001 From: "Julien C." Date: Wed, 20 May 2026 11:02:04 +0200 Subject: [PATCH 1/4] Remove bellaMobile & panelWebApp; tidy mobile files Delete legacy bellaMobile class and demo panelWebApp UI files, remove their include from mobile.class.php, and clean up mobile.api.php by removing the unused syncBella stub and fixing a typo in the notifications comment. This removes dead/sample code related to the Bella feature and tidies up mobile-related sources. --- core/api/mobile.api.php | 12 +- core/class/bellaMobile.class.php | 150 ---------- core/class/mobile.class.php | 1 - desktop/php/panelWebApp.php | 467 ------------------------------- 4 files changed, 1 insertion(+), 629 deletions(-) delete mode 100644 core/class/bellaMobile.class.php delete mode 100755 desktop/php/panelWebApp.php diff --git a/core/api/mobile.api.php b/core/api/mobile.api.php index a185608b..d1acfc21 100755 --- a/core/api/mobile.api.php +++ b/core/api/mobile.api.php @@ -622,19 +622,9 @@ function saveMenuFromAppV2($menu, $mobile) $jsonrpc->makeSuccess(); } -/** - * coming soon - * - * @return - */ -if ($jsonrpc->getMethod() == "syncBella") { - log::add('mobile', 'debug', '┌──────────▶︎ syncBella ─────────────────────'); - log::add('mobile', 'debug', '| JeedomApp ─▶︎ syncBella'); - log::add('mobile', 'debug', '└───────────────────────────────────────────'); -} /** - * get notifiactions present in json file + * get notifications present in json file * * @return array */ diff --git a/core/class/bellaMobile.class.php b/core/class/bellaMobile.class.php deleted file mode 100644 index bf7bee0d..00000000 --- a/core/class/bellaMobile.class.php +++ /dev/null @@ -1,150 +0,0 @@ -. - */ - -/* * ***************************Includes********************************* */ -require_once dirname(__FILE__) . '/../../../../core/php/core.inc.php'; - -class bellaMobile extends eqLogic -{ - function recupAllCmd($jeeObject_id) - { - $arrayBella = array(); - $jeeObject = jeeObject::byId(); - $eqLogics = $jeeObject->getEqLogic(); - foreach ($eqLogics as $eqLogic) { - $cmds = $eqLogic->getCmd(); - foreach ($cmds as $cmd) { - $arrayBella[$cmd->getId()] = array(); - $arrayBella[$cmd->getId()]['options'] = array(); - $arrayBella[$cmd->getId()]['options']['name'] = $cmd->getName(); - $arrayBella[$cmd->getId()]['options']['value'] = $cmd->getDisplay('value'); - $arrayBella[$cmd->getId()]['options']['genericType'] = $cmd->getGenericType(); - } - } - } - - function syncBella() {} - - public static function jsonBella() - { - $arrayBella = array( - 0 => array( - 0 => array( - 'size' => 1, - 'type' => 'onOff', - 'idEvent' => [7], - 'options' => array( - 'on' => 0, - 'title' => "Prise", - 'value' => null, - 'icons' => array( - 'on' => array('type' => "jeedomapp", 'name' => "prise", 'color' => "#f7d959"), - 'off' => array('type' => "jeedomapp", 'name' => "prise-off", 'color' => "#a4a4a3") - ), - 'actions' => array( - 'on' => array( - 'id' => 8 - ), - 'off' => array( - 'id' => 9 - ) - ), - 'iconBlur' => false - ) - ), - 1 => array( - 'size' => 1, - 'type' => 'onOff', - 'options' => array( - 'on' => 0, - 'title' => "Lumière salon", - 'value' => null, - 'icons' => array( - 'on' => array('type' => "jeedomapp", 'name' => "ampoule-on", 'color' => "#f7d959"), - 'off' => array('type' => "jeedomapp", 'name' => "ampoule-off", 'color' => "#a4a4a3") - ), - 'iconBlur' => false - ) - ), - 2 => array( - 'size' => 1, - 'type' => 'info', - 'options' => array( - 'on' => 0, - 'title' => "Température", - 'value' => null, - 'icons' => array( - 'on' => array('type' => "jeedomapp", 'name' => "temperature", 'color' => "#00ff00"), - 'off' => array('type' => "jeedomapp", 'name' => "temperature", 'color' => "#a4a4a3") - ), - 'iconBlur' => false - ) - ), - 4 => array( - 'size' => 1, - 'type' => 'info', - 'options' => array( - 'on' => 0, - 'title' => "Présence", - 'value' => null, - 'icons' => array( - 'on' => array('type' => "jeedom", 'name' => "mouvement", 'color' => "#FF0000"), - 'off' => array('type' => "jeedom", 'name' => "mouvement", 'color' => "#a4a4a3") - ), - 'iconBlur' => true - ) - ) - ), - 1 => array( - 5 => array( - 'size' => 2, - 'type' => 'meteo', - 'options' => array( - 'on' => 0, - 'title' => "Météo", - 'value' => null, - 'icons' => array( - 'on' => array('type' => "jeedomapp", 'name' => "meteo", 'color' => "#FF0000"), - 'off' => array('type' => "jeedomapp", 'name' => "meteo", 'color' => "#a4a4a3") - ), - 'iconBlur' => true - ) - ), - 6 => array( - 'size' => 1, - 'type' => 'test', - 'options' => array() - ), - 7 => array( - 'size' => 1, - 'type' => 'test', - 'options' => array() - ) - ), - 2 => array( - 8 => array( - 'size' => 4, - 'type' => 'test', - 'options' => array() - ) - ) - ); - - return json_encode($arrayBella); - } -} diff --git a/core/class/mobile.class.php b/core/class/mobile.class.php index 0fdaf818..3c873be2 100755 --- a/core/class/mobile.class.php +++ b/core/class/mobile.class.php @@ -19,7 +19,6 @@ /* * ***************************Includes********************************* */ require_once dirname(__FILE__) . '/../../../../core/php/core.inc.php'; error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); -include_file('core', 'bellaMobile', 'class', 'mobile'); class mobile extends eqLogic { diff --git a/desktop/php/panelWebApp.php b/desktop/php/panelWebApp.php deleted file mode 100755 index e85008e1..00000000 --- a/desktop/php/panelWebApp.php +++ /dev/null @@ -1,467 +0,0 @@ - -
-
-
-
- - - - -
- -
-
-
Lumières
-
2/2 Allumées
-
-
-
-
-
- - - - -
- -
-
-
Prises
-
2/3 Allumées
-
-
-
-
-
- - - - -
- -
-
-
Portes
-
1 Fermée
-
-
-
-
-
- - - - -
- -
-
-
Volets
-
Tous Fermés
-
-
-
-
-
-
-
- -
-
- -
-
-
-
Lumière Salon
-
Eteinte
-
-
- -
-
-
- -
-
- -
-
-
-
Lumière Cuisine
-
Allumée à 30%
-
-
-
- -
-
- -
-
- -
- -
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- - - - - - - \ No newline at end of file From 99b7648153a2440102fd82c35ba24c8d3a15674b Mon Sep 17 00:00:00 2001 From: "Julien C." Date: Wed, 20 May 2026 14:11:11 +0200 Subject: [PATCH 2/4] Add files to mobile_update cleanup list Include '/../desktop/php/panelWebApp.php' and '/../core/class/bellaMobile.class.php' in the mobile_update() $oldFiles array so these legacy files are removed during updates. This change ensures deprecated panel web app and mobile class files are cleaned up when running the update routine. --- plugin_info/install.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin_info/install.php b/plugin_info/install.php index 22a65e99..4e1a34c0 100755 --- a/plugin_info/install.php +++ b/plugin_info/install.php @@ -90,6 +90,7 @@ function mobile_update() $oldFiles = [ '/../desktop/css/panel.css', '/../desktop/php/panelMenuCustom.php', + '/../desktop/php/panelWebApp.php', '/../desktop/php/modalConfigPlugin.php', '/../desktop/js/panelMenuCustom.js', '/../desktop/modal/health.php', @@ -111,6 +112,7 @@ function mobile_update() '/../desktop/modal/sixPage.php', '/../desktop/modal/wizard.php', '/../core/data/wizard.json', + '/../core/class/bellaMobile.class.php', //'/../data/mobile.json' ]; foreach ($oldFiles as $oldFile) { From 3f541f46f7c52e1c957f3f8e0071f0146d3f39b0 Mon Sep 17 00:00:00 2001 From: "Julien C." Date: Wed, 20 May 2026 15:24:23 +0200 Subject: [PATCH 3/4] Scale phoneBattery values during migration Add a special-case in mobile_update migration: when migrating a command with logicalId 'phoneBattery', set its 'calculValueOffset' configuration to '#value# * 100' and log the action. This ensures battery values are scaled (e.g., from fractional to percentage) as part of the existing logicalId renaming and save process. --- plugin_info/install.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin_info/install.php b/plugin_info/install.php index 4e1a34c0..014a64b3 100755 --- a/plugin_info/install.php +++ b/plugin_info/install.php @@ -66,6 +66,10 @@ function mobile_update() foreach ($migrateLogicalId as $oldLogical => $newLogical) { $cmd = cmd::byEqLogicIdAndLogicalId($mobile->getId(), $oldLogical); if (is_object($cmd)) { + if ($oldLogical == 'phoneBattery'){ + log::add('mobile', 'debug', '| Migrate Calcul Value Offset : #value# * 100'); + $cmd->setConfiguration('calculValueOffset', '#value# * 100'); + } log::add('mobile', 'debug', '| Migrate logicalId ' . $oldLogical . ' to ' . $newLogical . ' for the command ' . $cmd->getHumanName()); $cmd->setLogicalId($newLogical); $cmd->save(); From f32fc3545805dd8a0eca089d00bbde21fde394b2 Mon Sep 17 00:00:00 2001 From: David <79108364+Phpvarious@users.noreply.github.com> Date: Wed, 20 May 2026 20:04:46 +0200 Subject: [PATCH 4/4] Update install.php --- plugin_info/install.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin_info/install.php b/plugin_info/install.php index 014a64b3..64e3de82 100755 --- a/plugin_info/install.php +++ b/plugin_info/install.php @@ -67,8 +67,8 @@ function mobile_update() $cmd = cmd::byEqLogicIdAndLogicalId($mobile->getId(), $oldLogical); if (is_object($cmd)) { if ($oldLogical == 'phoneBattery'){ - log::add('mobile', 'debug', '| Migrate Calcul Value Offset : #value# * 100'); - $cmd->setConfiguration('calculValueOffset', '#value# * 100'); + log::add('mobile', 'debug', '| Migrate Calcul Value Offset : #value# * 100'); + $cmd->setConfiguration('calculValueOffset', '#value# * 100'); } log::add('mobile', 'debug', '| Migrate logicalId ' . $oldLogical . ' to ' . $newLogical . ' for the command ' . $cmd->getHumanName()); $cmd->setLogicalId($newLogical);