From: Vincent Vanwaelscappel Date: Tue, 7 Jan 2025 08:06:45 +0000 (+0100) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=1e427f408ca3ba53736c848db68c030223bf1426;p=tortuga-home.git . --- diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index b656d5d..d77fb63 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -43,12 +43,12 @@ services: - './src/:/home/tortugahome/www/' - './src/bin/:/usr/local/bin/' # - './sessions:/var/lib/php/sessions' - - 'share:/nas/' - - 'share:/volume1/Share/' - - 'share:/Share/' - - 'videos:/nas/Videos/' - - 'videos:/volume1/Share/Videos/' - - 'videos:/Share/Videos/' +# - 'share:/nas/' +# - 'share:/volume1/Share/' +# - 'share:/Share/' +# - 'videos:/nas/Videos/' +# - 'videos:/volume1/Share/Videos/' +# - 'videos:/Share/Videos/' - './log:/var/log/tortugahome' - './src/.docker/config/at.allow:/etc/at.allow:ro' - './src/.docker/config/at.deny:/etc/at.deny:ro' @@ -77,14 +77,14 @@ networks: external: name: tortugahome -volumes: - share: - driver_opts: - type: cifs - o: "username=Share,password=dcfyjbcyckwydtgufjx,rw,file_mode=0777,dir_mode=0777" - device: "//192.168.7.31/Share" - videos: - driver_opts: - type: cifs - o: "username=Share,password=dcfyjbcyckwydtgufjx,rw,file_mode=0777,dir_mode=0777" - device: "//192.168.7.31/Media/Videos" +#volumes: +# share: +# driver_opts: +# type: cifs +# o: "username=Share,password=dcfyjbcyckwydtgufjx,rw,file_mode=0777,dir_mode=0777" +# device: "//192.168.7.31/Share" +# videos: +# driver_opts: +# type: cifs +# o: "username=Share,password=dcfyjbcyckwydtgufjx,rw,file_mode=0777,dir_mode=0777" +# device: "//192.168.7.31/Media/Videos" diff --git a/.idea/dataSources.local.xml b/.idea/dataSources.local.xml index 93f61a5..3e6c89f 100644 --- a/.idea/dataSources.local.xml +++ b/.idea/dataSources.local.xml @@ -1,6 +1,6 @@ - + " diff --git a/.idea/workspace.xml b/.idea/workspace.xml index d762050..80c935e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,14 +5,13 @@ + - - - - - - + + + + diff --git a/gradient.php b/gradient.php index df7eb0a..85582e4 100644 --- a/gradient.php +++ b/gradient.php @@ -78,12 +78,13 @@ }, 5000); }); + function fullscreen() { try { if (nw !== undefined) { var ns = 5; var win = nw.Window.get(); - win.moveTo(-1 * ns * 900, 0); + win.moveTo((ns - 1) * -900, 0); win.resizeTo(ns * 900, 1440); win.setAlwaysOnTop(true); } diff --git a/scripts/homeassistant_device_event.php b/scripts/homeassistant_device_event.php index 210e60f..de1c035 100644 --- a/scripts/homeassistant_device_event.php +++ b/scripts/homeassistant_device_event.php @@ -5,14 +5,14 @@ $_GET['im'] = '5'; if ($_GET['state'] === 'None') { exit; } -const HA_SWITCH_BUREAU = 'sensor.0x0c4314fffe7ce957_action'; -const HA_SWITCH_WC = 'sensor.0x70ac08fffe911960_action'; -const HA_CUBE_BUREAU = 'sensor.0x00158d00042d7082_action'; +const HA_SWITCH_BUREAU = 'event.double_interrupeur_cour_action'; +const HA_SWITCH_WC = 'event.interrupteur_wc_action'; +const HA_CUBE_BUREAU = 'event.cube_bureau_action'; const HA_SWITCH_BEDROOM = 'binary_sensor.switch_bedroom'; const HA_CUBE_BATHROOM = 'sensor.0x00158d0005c19a86_action'; -const HA_CUBE_SALON_1 = 'sensor.0x00158d00029ba2b6_action'; -const HA_CUBE_SALON_2 = 'sensor.0x00158d00042dc656_action'; -const HA_CUBE_SALON_3 = 'sensor.0x00158d00058a55da_action'; +const HA_CUBE_SALON_1 = 'event.cube_salon_1_action'; +const HA_CUBE_SALON_2 = 'event.cube_salon_2_action'; +const HA_CUBE_SALON_3 = 'event.cube_salon_3_action'; switch ($_GET['id']) { diff --git a/scripts/lib/ecomode.php b/scripts/lib/ecomode.php index bdea404..b401664 100644 --- a/scripts/lib/ecomode.php +++ b/scripts/lib/ecomode.php @@ -51,10 +51,7 @@ function getNightMode($device = null) return false; } } else if ($device === 'bureau' || $device === 'bureausun') { - if (haGetState(HA_OFFICE_CURTAIN) === 'closed') { - return true; - } - return getState('bureauOff') == '1'; + return (in_array(haGetState(HA_OFFICE_CURTAIN), ['off', 'closed'])); } else if ($device === 'entree' || $device === 'cuisine') { $lights = [15, 18, 1, 58, 59, 57, 56, 55, 37]; $hueLights = getHueInstance()->getLights(); diff --git a/scripts/lib/scenes.php b/scripts/lib/scenes.php index b1ca4b6..0d17f40 100644 --- a/scripts/lib/scenes.php +++ b/scripts/lib/scenes.php @@ -862,12 +862,12 @@ $scenes = [ function welcomeEco() { - $businessHour = [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]; - if (isWeekEnd() || !in_array(date('G'), $businessHour)) { - execScene('home/welcome/eco/salon'); - } else { - execScene('home/welcome/eco/homeoffice'); - } +// $businessHour = [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]; +// if (isWeekEnd() || !in_array(date('G'), $businessHour)) { + execScene('home/welcome/eco/salon'); +// } else { +// execScene('home/welcome/eco/homeoffice'); +// } } function bureauRideau($cmd)