Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
2f6137d
[Jenkins] Updated translation
Sep 27, 2024
31f61d2
Remove escaped quote
eliovir Sep 28, 2024
337330e
Merge pull request #21 from eliovir/patch-1
zoic21 Sep 30, 2024
fca6a23
[Jenkins] Updated translation
Sep 30, 2024
b698424
begin remote mode on zwavejs
zoic21 Oct 30, 2024
9556f3d
same
zoic21 Oct 30, 2024
61edad8
update doc
zoic21 Oct 30, 2024
82c0f6e
continue remote mode
zoic21 Oct 30, 2024
98b85bd
[Jenkins] Updated translation
Oct 31, 2024
2c69f36
handle mqtts protocol
zoic21 Nov 10, 2024
a3e2891
[Jenkins] Updated translation
Nov 11, 2024
94e6ca9
yarn to npm
Salvialf Nov 14, 2024
eb2d5da
update changelog
Salvialf Nov 15, 2024
122204a
try 9.27.2 ZwaveJsUI
Salvialf Nov 15, 2024
f22fc70
Merge pull request #23 from jeedom/zwavejsui-9.27.2
Salvialf Nov 15, 2024
24fce65
limit ZwaveJS UI to 9.26.0 to prevent build errors on arm
Salvialf Nov 15, 2024
5bb22e9
[Jenkins] Updated translation
Nov 16, 2024
e759395
add zwaveJsUI button in configuration
Sekiro-kost Nov 27, 2024
539ab9b
[Jenkins] Updated translation
Nov 28, 2024
0184132
use regular apostrophe
Salvialf May 27, 2025
790c925
[Jenkins] Updated translation
May 27, 2025
b835f77
Ajout nouvelle integration
Adam-Doudeau Jun 4, 2025
6f792be
[Jenkins] Updated translation
Jun 4, 2025
ed0d7b2
Intégration + procédure d'intégration
Adam-Doudeau Jun 5, 2025
5744f03
[Jenkins] Updated translation
Jun 5, 2025
e21b296
Mise à jour de configuration
Adam-Doudeau Jun 10, 2025
066462a
[Jenkins] Updated translation
Jun 10, 2025
4abc070
[FIX] Config mco 412
Adam-Doudeau Jun 16, 2025
c2a1df1
[Jenkins] Updated translation
Jun 16, 2025
a42d200
Update configuration.php
zoic21 Jun 17, 2025
60771aa
[Jenkins] Updated translation
Jun 17, 2025
e79a181
bugfix: incorrect translation function called
Mips2648 Jun 24, 2025
a36280e
[Jenkins] Updated translation
Jun 24, 2025
9c12abd
[REMOVE] distant mode
Hotfirenet Jun 25, 2025
0a1e7d1
Clean Changelog for PR #25
Hotfirenet Jun 25, 2025
a0b71e6
Merge branch 'master' into beta
Hotfirenet Jun 25, 2025
d1dc83c
[Jenkins] Updated translation
Jun 25, 2025
c0b1fb7
Remove mode distant
Hotfirenet Jun 27, 2025
acde90d
Remove mode distant
Hotfirenet Jun 27, 2025
2c81749
[Jenkins] Updated translation
Jun 27, 2025
a727d20
bump zwavejsui to 10.5.1
Salvialf Sep 16, 2025
1fcea1a
comment docker & distant modes in doc
Salvialf Sep 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ docs/_site/
docs/Gemfile.lock
docs/.sass-cache/
.remote-sync.json
.history
.vscode
60 changes: 58 additions & 2 deletions core/class/zwavejs.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ public static function cron() {
}

public static function cronHourly() {
if (config::byKey('zwavejs::mode', 'zwavejs') == 'distant') {
self::getNodes('health');
return;
}
$deamon_info = self::deamon_info();
if ($deamon_info['state'] != 'ok') {
return;
Expand All @@ -146,6 +150,9 @@ public static function cronHourly() {
}

public static function configureSettings($_path) {
if (config::byKey('zwavejs::mode', 'zwavejs') == 'distant') {
return;
}
$file = $_path . '/settings.json';
$settings = array();
if (file_exists($file)) {
Expand All @@ -167,11 +174,16 @@ public static function configureSettings($_path) {

$settings['mqtt']['name'] = 'Jeedom';
$settings['mqtt']['host'] = $mqttInfos['ip'];
if (!isset($mqttInfos['protocol'])) {
$mqttInfos['protocol'] = 'mqtt';
}
$settings['mqtt']['host'] = $mqttInfos['protocol'] . '://' . $mqttInfos['ip'];
$settings['mqtt']['port'] = $mqttInfos['port'];
$settings['mqtt']['auth'] = true;
$settings['mqtt']['username'] = $mqttInfos['user'];
$settings['mqtt']['password'] = $mqttInfos['password'];
$settings['mqtt']['prefix'] = config::byKey('prefix', __CLASS__, 'zwave');
$settings['mqtt']['allowSelfsigned'] = true;
//if ($port != 'auto') {
// $port = jeedom::getUsbMapping($port);
// exec(system::getCmdSudo() . 'chmod 777 ' . $port . ' > /dev/null 2>&1');
Expand Down Expand Up @@ -250,7 +262,30 @@ public static function getFile($_type, $_nodeId) {
return $data;
}

public static function postConfig_zwavejs_mode($_value) {
$plugin = plugin::byId('zwavejs');
if ($_value == 'local') {
$plugin->dependancy_changeAutoMode(1);
$plugin->deamon_info(1);
$dependancy_info = $plugin->dependancy_info(true);
if ($dependancy_info['state'] == 'nok' && config::byKey('dependancyAutoMode', $plugin->getId(), 1) == 1) {
try {
$plugin->dependancy_install();
} catch (Exception $e) {
}
}
} else {
$plugin->dependancy_changeAutoMode(0);
$plugin->deamon_info(0);
}
}

public static function additionnalDependancyCheck() {
if (config::byKey('zwavejs::mode', 'zwavejs') == 'distant') {
$return = array();
$return['state'] = 'ok';
return $return;
}
$return = array();
$return['state'] = 'ok';
if (config::byKey('lastDependancyInstallTime', __CLASS__) == '') {
Expand All @@ -262,6 +297,11 @@ public static function additionnalDependancyCheck() {
}

public static function dependancy_info() {
if (config::byKey('zwavejs::mode', 'zwavejs') == 'distant') {
$return = array();
$return['state'] = 'ok';
return $return;
}
$return = array();
$return['progress_file'] = jeedom::getTmpFolder(__CLASS__) . '/dependance';
$return['state'] = 'ok';
Expand All @@ -274,6 +314,13 @@ public static function dependancy_info() {
}

public static function deamon_info() {
if (config::byKey('zwavejs::mode', 'zwavejs') == 'distant') {
$return = array();
$return['log'] = __CLASS__;
$return['launchable'] = 'ok';
$return['state'] = 'ok';
return $return;
}
$return = array();
$return['log'] = __CLASS__;
$return['launchable'] = 'ok';
Expand Down Expand Up @@ -311,13 +358,19 @@ public static function deamon_info() {
}

public static function isRunning() {
if (config::byKey('zwavejs::mode', 'zwavejs') == 'distant') {
return true;
}
if (!empty(system::ps('server/bin/www.js'))) {
return true;
}
return false;
}

public static function deamon_start($_debug = false) {
if (config::byKey('zwavejs::mode', 'zwavejs') == 'distant') {
return;
}
// log::add(__CLASS__, 'debug', '[' . __FUNCTION__ . '] ' . 'Inscription au plugin mqtt2');
config::save('controllerStatus', 'none', __CLASS__);
config::save('driverStatus', 0, __CLASS__);
Expand Down Expand Up @@ -379,6 +432,9 @@ public static function deamon_start($_debug = false) {
}

public static function deamon_stop() {
if (config::byKey('zwavejs::mode', 'zwavejs') == 'distant') {
return;
}
log::add(__CLASS__, 'info', __('Arrêt du démon ZwaveJS', __FILE__));
config::save('controllerStatus', 'none', __CLASS__);
$find = 'server/bin/www.js';
Expand Down Expand Up @@ -1592,7 +1648,7 @@ public static function constructHealthPage($_values, $_mobile = False) {
}

public static function autoCreateCommandInfo($_path, $_type, $_label, $_unit, $_max, $_min, $_currentValue) {
log::add(__CLASS__, 'debug', '[' . __FUNCTION__ . '] ' . _("Création d'une commande info", __FILE__) . ' ' . $_path);
log::add(__CLASS__, 'debug', '[' . __FUNCTION__ . '] ' . __("Création d'une commande info", __FILE__) . ' ' . $_path);
$elements = explode('-', str_replace('_', ' ', $_path), 4);
$eqLogic = self::byLogicalId($elements[0], __CLASS__);
log::add(__CLASS__, 'debug', '[' . __FUNCTION__ . '] ' . print_r($elements, true));
Expand Down Expand Up @@ -1636,7 +1692,7 @@ public static function autoCreateCommandInfo($_path, $_type, $_label, $_unit, $_
}

public static function autoCreateCommandAction($_path, $_type, $_label, $_unit, $_max, $_min, $_currentValue) {
log::add(__CLASS__, 'debug', '[' . __FUNCTION__ . '] ' . _("Création d'une commande action", __FILE__) . ' ' . $_path);
log::add(__CLASS__, 'debug', '[' . __FUNCTION__ . '] ' . __("Création d'une commande action", __FILE__) . ' ' . $_path);
$elements = explode('-', str_replace('_', ' ', $_path), 4);
$eqLogic = self::byLogicalId($elements[0], __CLASS__);
log::add(__CLASS__, 'debug', '[' . __FUNCTION__ . '] ' . print_r($elements, true));
Expand Down
31 changes: 31 additions & 0 deletions core/config/devices/mco_351/mco.home.mh-s411-5102.simple.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "MH-S411 Simple",
"type": "Interrupteur",
"comlink": "2888-mcohome-interrupteur-tactile-en-verre-z-wave-1-charge-blanc-2015032300123",
"remark": "",
"imglink": "mco.mhs411",
"ignore": true,
"versions": {
"16642": [
"513"
],
"16657": [
"4866",
"20738"
]
},
"properties": {
"switch": {"replace": {
"#endpoint#": 1
}},
"scene" : {},
"centralscene" : {}
}

}






74 changes: 0 additions & 74 deletions core/config/devices/mco_351/mco.home.mh-s411.simple.json

This file was deleted.

30 changes: 30 additions & 0 deletions core/config/devices/mco_351/mco.home.mh-s412-5102.double.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "MH-S412 Double",
"type": "Interrupteur",
"documentation": "https://doc.jeedom.com/#language#/zwave/mco.MH-S412_Double_-_Interrupteur",
"comlink": "2889-mcohome-interrupteur-tactile-en-verre-z-wave-2-charges-blanc",
"remark": "",
"imglink": "mco.mhs412",
"ignore": true,
"versions": {
"16642": [
"514"
],
"16673": [
"20738"
]
},
"properties": {
"Switch": {
"multi": [
1,
2
],
"replace": {
"#endpoint#": "multiKey"
}
},
"scene" : {},
"centralscene" : {}
}
}
Loading