Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overkiz #1785

Closed
wants to merge 64 commits into from
Closed

Overkiz #1785

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
27a3bcc
Initial commit
rpochet Oct 20, 2022
31ef3ac
Add feature mode
rpochet Oct 21, 2022
b072e19
Mode feature
rpochet Oct 25, 2022
72254e8
ECO temperature
rpochet Oct 25, 2022
da6602b
Merge branch 'GladysAssistant:master' into overkiz
rpochet Jan 3, 2023
f7630b3
Review
rpochet Jan 8, 2023
e60bc99
Merge
rpochet Apr 1, 2023
c69bcbd
ESLint
rpochet Apr 1, 2023
b13214c
Documentation link
rpochet Apr 1, 2023
2f005f3
sync
rpochet Apr 5, 2023
93baf60
Initial commit
rpochet May 3, 2023
0287cb3
Merge
rpochet May 13, 2023
b089201
Merge branch 'overkiz' of https://github.com/rpochet/Gladys into overkiz
rpochet May 13, 2023
aace074
Merge branch 'master' into overkiz
rpochet May 13, 2023
b8d7bf9
ES Lint
rpochet May 13, 2023
f9b804b
Merge branch 'overkiz' of https://github.com/rpochet/Gladys into overkiz
rpochet May 13, 2023
0ff1524
ES Lint
rpochet May 13, 2023
0c22877
Merge branch 'master' into overkiz
rpochet May 23, 2023
54102fe
Merge
rpochet May 24, 2023
0c0109b
Refactor connect
rpochet May 27, 2023
cab4b02
Merge branch 'master' into overkiz
rpochet May 27, 2023
a1d7c05
Merge branch 'master' into overkiz
rpochet Jun 15, 2023
171f129
Merge branch 'master' into overkiz
rpochet Jun 19, 2023
ad8cdf4
New API
rpochet Jun 23, 2023
919b1e0
Tests
rpochet Jun 23, 2023
6d4591c
Revert
rpochet Jun 23, 2023
42eec39
Revert
rpochet Jun 23, 2023
1891d29
Poll settings
rpochet Jun 23, 2023
6f9a34e
Poll settings
rpochet Jun 23, 2023
c6892a9
Logging
rpochet Jul 1, 2023
5bd2f77
Merge branch 'master' into overkiz
rpochet Jul 28, 2023
7b01d7b
Merge
rpochet Jul 28, 2023
4bb3600
Merge branch 'master' into overkiz
rpochet Aug 21, 2023
234316c
Merge branch 'GladysAssistant:master' into overkiz
rpochet Aug 28, 2023
340f8d1
Tests
rpochet Aug 29, 2023
b91ef2e
Selector
rpochet Aug 29, 2023
e551a37
Tests
rpochet Aug 29, 2023
b0582b8
Tests
rpochet Aug 29, 2023
8ba7358
Tests
rpochet Aug 31, 2023
e6cfd35
Merge branch 'GladysAssistant:master' into overkiz
rpochet Aug 31, 2023
3513e1a
Prettier
rpochet Sep 1, 2023
f00074b
ESLint
rpochet Sep 1, 2023
ba823ac
Tests
rpochet Sep 1, 2023
8191591
Tests
rpochet Sep 1, 2023
b2c09f5
Tests
rpochet Sep 1, 2023
6fce4c6
Merge branch 'master' into overkiz
rpochet Sep 4, 2023
27f69b6
Merge branch 'master' into overkiz
rpochet Sep 12, 2023
8ea2a6f
Merge branch 'master' into overkiz
rpochet Sep 15, 2023
0cf423e
Tests
rpochet Sep 15, 2023
9fc88af
Merge branch 'overkiz' of https://github.com/rpochet/Gladys into overkiz
rpochet Sep 15, 2023
30d2b74
Tests
rpochet Sep 15, 2023
7a28f91
Tests
rpochet Sep 15, 2023
df2e49b
Tests
rpochet Sep 17, 2023
6abdbed
Merge branch 'master' into overkiz
rpochet Sep 22, 2023
e549921
Merge branch 'master' into overkiz
rpochet Sep 27, 2023
73494cc
Merge branch 'master' into overkiz
rpochet Oct 6, 2023
c1b9813
Merge branch 'GladysAssistant:master' into overkiz
rpochet Oct 9, 2023
33e49ab
Merge branch 'master' into overkiz
rpochet Oct 23, 2023
f6a6a7f
Merge branch 'GladysAssistant:master' into overkiz
rpochet Nov 9, 2023
950dfec
Merge branch 'master' into overkiz
rpochet Nov 10, 2023
4c4ced3
Tests
rpochet Nov 10, 2023
6a3540e
Tests
rpochet Nov 10, 2023
9aef7e2
Remove tests
rpochet Nov 20, 2023
3bee751
Merge branch 'master' into overkiz
rpochet Nov 20, 2023
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
Binary file added front/src/assets/integrations/cover/overkiz.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions front/src/components/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ import EweLinkSetupPage from '../routes/integration/all/ewelink/setup-page';
// OpenAI integration
import OpenAIPage from '../routes/integration/all/openai/index';

// Overkiz
import OverkizPage from '../routes/integration/all/overkiz/device-page';
import OverkizEditPage from '../routes/integration/all/overkiz/edit-page';
import OverkizDiscoverPage from '../routes/integration/all/overkiz/discover-page';
import OverkizSetupPage from '../routes/integration/all/overkiz/settings-page';

// Tuya integration
import TuyaPage from '../routes/integration/all/tuya/device-page';
import TuyaEditPage from '../routes/integration/all/tuya/edit-page';
Expand Down Expand Up @@ -270,6 +276,11 @@ const AppRouter = connect(
<HomeKitPage path="/dashboard/integration/communication/homekit" />
<OpenAIPage path="/dashboard/integration/communication/openai" />

<OverkizPage path="/dashboard/integration/device/overkiz" />
<OverkizEditPage path="/dashboard/integration/device/overkiz/edit-page" />
<OverkizDiscoverPage path="/dashboard/integration/device/overkiz/discover-page" />
<OverkizSetupPage path="/dashboard/integration/device/overkiz/settings-page" />

<TuyaPage path="/dashboard/integration/device/tuya" />
<TuyaEditPage path="/dashboard/integration/device/tuya/edit/:deviceSelector" />
<TuyaDiscoverPage path="/dashboard/integration/device/tuya/discover" />
Expand Down
2 changes: 2 additions & 0 deletions front/src/components/boxs/device-in-room/DeviceRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import MultiLevelDeviceFeature from './device-features/MultiLevelDeviceFeature';
import NumberDeviceFeature from './device-features/NumberDeviceFeature';
import CoverDeviceFeature from './device-features/CoverDeviceFeature';
import ThermostatDeviceFeature from './device-features/ThermostatDeviceFeature';
import ThermostatModeDeviceFeature from './device-features/ThermostatModeDeviceFeature';
import AirConditioningModeDeviceFeature from './device-features/AirConditioningModeDeviceFeature';

const ROW_TYPE_BY_FEATURE_TYPE = {
Expand All @@ -26,6 +27,7 @@ const ROW_TYPE_BY_FEATURE_TYPE = {
[DEVICE_FEATURE_TYPES.CURTAIN.STATE]: CoverDeviceFeature,
[DEVICE_FEATURE_TYPES.CURTAIN.POSITION]: MultiLevelDeviceFeature,
[DEVICE_FEATURE_TYPES.THERMOSTAT.TARGET_TEMPERATURE]: ThermostatDeviceFeature,
[DEVICE_FEATURE_TYPES.THERMOSTAT.MODE]: ThermostatModeDeviceFeature,
[DEVICE_FEATURE_TYPES.AIR_CONDITIONING.MODE]: AirConditioningModeDeviceFeature,
[DEVICE_FEATURE_TYPES.AIR_CONDITIONING.TARGET_TEMPERATURE]: ThermostatDeviceFeature
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import { Text } from 'preact-i18n';
import cx from 'classnames';

import { getDeviceName } from '../../../../utils/device';
import { THERMOSTAT_MODE } from '../../../../../../server/utils/constants';

const ThermostatModeDeviceType = ({ children, ...props }) => {
const { device, deviceFeature } = props;
const { last_value: lastValue } = deviceFeature;

function updateValue(value) {
props.updateValue(
props.x,
props.y,
device,
deviceFeature,
props.deviceIndex,
props.deviceFeatureIndex,
value,
lastValue
);
}

function setOffMode() {
updateValue(THERMOSTAT_MODE.OFF);
}
function setEcoMode() {
updateValue(THERMOSTAT_MODE.ECO);
}
function setComfortMode() {
updateValue(THERMOSTAT_MODE.COMFORT);
}

return (
<tr>
<td>
<i class="fe fe-toggle-right" />
</td>
<td>{getDeviceName(props.device, props.deviceFeature)}</td>
<td class="text-right">
<button
type="submit"
class={cx('btn btn-sm btn-secondary', {
active: lastValue === THERMOSTAT_MODE.OFF
})}
onClick={setOffMode}
>
<Text id="dashboard.boxes.devicesInRoom.offMode" />
</button>
<button
type="submit"
class={cx('btn btn-sm btn-secondary', {
active: lastValue === THERMOSTAT_MODE.ECO
})}
onClick={setEcoMode}
>
<Text id="dashboard.boxes.devicesInRoom.ecoMode" />
</button>
<button
type="submit"
class={cx('btn btn-sm btn-secondary', {
active: lastValue === THERMOSTAT_MODE.COMFORT
})}
onClick={setComfortMode}
>
<Text id="dashboard.boxes.devicesInRoom.comfortMode" />
</button>
</td>
</tr>
);
};

export default ThermostatModeDeviceType;
64 changes: 61 additions & 3 deletions front/src/config/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,10 @@
"noRecentValue": "No recent value",
"deviceTitle": "{{name}} - {{type}}",
"addButton": "+",
"substractButton": "-"
"substractButton": "-",
"offMode": "Off",
"ecoMode": "Eco",
"comfortMode": "Comfort"
},
"devices": {
"editDeviceFeaturesLabel": "Select the devices you want to display:",
Expand Down Expand Up @@ -1418,7 +1421,61 @@
"activateOpenAiChat": "Activate ChatGPT in Gladys chat",
"rateLimit": "As ChatGPT API is not free, this integration is limited to 1000 requests per month.",
"notOnGladysPlus": "As ChatGPT API is not free, this integration is only available to Gladys Plus users.",
"subscribeToGladysPlus": "<a href=\"https://gladysassistant.com/plus/\" target=\"_blank\" rel=\"noopener noreferrer\">Click here</a> to subscribe to Gladys Plus."
"subscribeToGladysPlus": "<a href=\"https://gladysassistant.com/plus/\" target=\"_blank\" rel=\"noopener noreferrer\">Click here</a> to subscribe to Gladys Plus.",
"licenseShouldBeActive": "This integration is only available to users with an active license (at least one payment). For trial users, please contact us on the forum or email."
},
"overkiz": {
"title": "Overkiz",
"description": "Control your Overkiz devices.",
"deviceTab": "Devices",
"discoverTab": "Overkiz discover",
"discoverDeviceDescr": "",
"settingsTab": "Configuration",
"documentation": "Overkiz documentation",
"device": {
"title": "",
"search": "Search",
"noDeviceFound": "No Overkiz device found",
"nameLabel": "Name",
"namePlaceholder": "Enter device name",
"modelLabel": "Model",
"stateLabel": "Programmation",
"roomLabel": "room",
"featuresLabel": "Features",
"createButton": "Save",
"updateButton": "Update",
"deleteButton": "Delete",
"editButton": ""
},
"status": {
"notConnected": "",
"setupPageLink": ""
},
"discover": {
"title": "Overkiz devices in Gladys",
"scan": "Search devices",
"description": "",
"noDeviceFound": "No Overkiz device found."
},
"settings": {
"title": "Overkiz configuration",
"overkizDescription": "You can connect Gladys to your Overkiz cloud account to command the associated devices.",
"typeLabel": "Type",
"typePlaceholder": "Enter Overkiz type",
"userLabel": "Username",
"userPlaceholder": "Enter Overkiz username",
"passwordLabel": "Password",
"passwordPlaceholder": "Enter Overkiz password",
"error": "An error occured while saving configuration.",
"connecting": "Configuration saved. Now connecting to your Overkiz cloud account...",
"connected": "Connected to the Overkiz cloud account with success !",
"connectionError": "Error while connecting, please check your configuration."
},
"error": {
"defaultError": "There was an error saving the device.",
"defaultDeletionError": "There was an error deleting the device.",
"conflictError": "Current device is already in Gladys."
}
}
},
"editScene": {
Expand Down Expand Up @@ -2667,7 +2724,8 @@
},
"thermostat": {
"shortCategoryName": "Thermostat",
"target-temperature": "Thermostat Temperature"
"target-temperature": "Thermostat Temperature",
"mode": "Level"
},
"airquality-sensor": {
"shortCategoryName": "Air Quality",
Expand Down
64 changes: 61 additions & 3 deletions front/src/config/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,10 @@
"noRecentValue": "Pas de valeur récente",
"deviceTitle": "{{name}} - {{type}}",
"addButton": "+",
"substractButton": "-"
"substractButton": "-",
"offMode": "Off",
"ecoMode": "Eco",
"comfortMode": "Comfort"
},
"devices": {
"editDeviceFeaturesLabel": "Vous pouvez modifier le nom affiché ici :",
Expand Down Expand Up @@ -1419,7 +1422,61 @@
"activateOpenAiChat": "Activer ChatGPT dans le chat Gladys",
"rateLimit": "L'API ChatGPT étant payante, cette intégration est actuellement limitée à 1 000 requêtes par mois et par compte.",
"notOnGladysPlus": "L'API ChatGPT étant payante, cette intégration est proposée via Gladys Plus uniquement.",
"subscribeToGladysPlus": "<a href=\"https://gladysassistant.com/fr/plus/\" target=\"_blank\" rel=\"noopener noreferrer\">Cliquez-ici</a> pour souscrire à Gladys Plus."
"subscribeToGladysPlus": "<a href=\"https://gladysassistant.com/fr/plus/\" target=\"_blank\" rel=\"noopener noreferrer\">Cliquez-ici</a> pour souscrire à Gladys Plus.",
"licenseShouldBeActive": "Cette intégration n'est disponible qu'aux utilisateurs Gladys Plus dont l'abonnement est actuellement actif avec au moins un paiement. Pour les utilisateurs en périodes d'essai, merci de me contacter sur le forum ou par email !"
},
"overkiz": {
"title": "Overkiz",
"description": "Contrôler vos appareils Overkiz.",
"deviceTab": "Appareils",
"discoverTab": "Découverte Overkiz",
"discoverDeviceDescr": "",
"settingsTab": "Configuration",
"documentation": "Documentation Overkiz",
"device": {
"title": "",
"search": "",
"noDeviceFound": "Aucun périphérique Overkiz détecté.",
"nameLabel": "Nom de l'appareil",
"namePlaceholder": "Entrez le nom de votre appareil",
"modelLabel": "Modèle",
"stateLabel": "Programme",
"roomLabel": "Pièce",
"createButton": "Sauvegarder",
"updateButton": "Mettre à jour",
"deleteButton": "Supprimer",
"featuresLabel": "",
"editButton": ""
},
"status": {
"notConnected": "Gladys n'a pas réussi à se connecter au compte cloud Overkiz, plus d'informations sur la ",
"setupPageLink": "page de configuration Overkiz."
},
"discover": {
"title": "Découverte Overkiz",
"scan": "Rechercher",
"description": "Les appareils Overkiz sont automatiquement découverts. Vos appareils Overkiz doivent être ajoutés à votre compte cloud Overkiz avant.",
"noDeviceFound": "Aucun périphérique Overkiz détecté."
},
"settings": {
"title": "Configuration Overkiz",
"overkizDescription": "Vous pouvez connecter Gladys à votre compte cloud Overkiz pour commander les appareils associés.",
"error": "Une erreur s'est produite lors de la sauvegarde de la configuration.",
"connecting": "Configuration sauvegardée. Connexion à votre compte cloud Overkiz...",
"connected": "Connexion réussie au compte cloud Overkiz !",
"connectionError": "Erreur lors de la connexion, veuillez vérifier votre configuration.",
"typeLabel": "Type",
"typePlaceholder": "Entrez le type Overkiz",
"userLabel": "Nom d'utilisateur",
"userPlaceholder": "Entrez le nom d'utilisateur Overkiz",
"passwordLabel": "Mot de passe",
"passwordPlaceholder": "Entrez le mot de passe utilisateur Overkiz"
},
"error": {
"defaultError": "Une erreur s'est produite lors de l'enregistrement de l'appareil.",
"defaultDeletionError": "Une erreur s'est produite lors de la suppression de l'appareil.",
"conflictError": "L'appareil actuel est déjà dans Gladys."
}
}
},
"editScene": {
Expand Down Expand Up @@ -2668,7 +2725,8 @@
},
"thermostat": {
"shortCategoryName": "Thermostat",
"target-temperature": "Température de consigne"
"target-temperature": "Température de consigne",
"mode": "Mode"
},
"airquality-sensor": {
"shortCategoryName": "Qualité de l'air",
Expand Down
4 changes: 4 additions & 0 deletions front/src/config/integrations/devices.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
"link": "lan-manager",
"img": "/assets/integrations/cover/lan-manager.jpg"
},
{
"key": "overkiz",
"img": "/assets/integrations/cover/overkiz.jpg"
},
{
"key": "tuya",
"link": "tuya",
Expand Down
Loading
Loading