Skip to content

Commit

Permalink
Change temperature in admin tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Homemade-Disaster committed Apr 3, 2022
1 parent 1da32be commit 30ea2d2
Show file tree
Hide file tree
Showing 15 changed files with 327 additions and 109 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ Mittels der Netatmo-Energy API werden die aktuellen Einstellungen abgeholt bzw.
Placeholder for the next version (at the beginning of the line):
### **WORK IN PROGRESS**
-->
### 1.2.2 (2022-04-03)
* (ioKlausi) Added a slider to each valve to change the temperature and added some API requests to admin tab to transfer changes to the cloud

### 1.2.1 (2022-04-01)
* (ioKlausi) Messages for specific events created

Expand Down
Binary file added admin/img/check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions admin/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,32 @@ i.icon-grey {
}
.tooltip:hover:after, a:hover:before {
opacity: 1;
}
.myslider {
-webkit-appearance: none;
background: #d3d3d3;
outline: none;
opacity: 0.7;
-webkit-transition: .2s;
transition: opacity .2s;
}

.myslider:hover {
opacity: 1;
}

.myslider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 25px;
height: 25px;
background: #04AA6D;
cursor: pointer;
}

.myslider::-moz-range-thumb {
width: 25px;
height: 25px;
background: #04AA6D;
cursor: pointer;
}
146 changes: 118 additions & 28 deletions admin/tab_m.html

Large diffs are not rendered by default.

72 changes: 72 additions & 0 deletions admin/words.js
Original file line number Diff line number Diff line change
Expand Up @@ -1924,6 +1924,78 @@ const _systemDictionary = {
"es": "Evento activado:",
"pl": "Wyzwolone zdarzenie:",
"zh-cn": "事件触发:"
},
"Room temperature changed to ": {
"en": "Room temperature changed to ",
"de": "Raumtemperatur geändert auf ",
"ru": "Комнатная температура изменилась на ",
"pt": "A temperatura ambiente mudou para ",
"nl": "Kamertemperatuur gewijzigd in ",
"fr": "La température ambiante est passée à ",
"it": "La temperatura ambiente è cambiata in ",
"es": "La temperatura ambiente cambió a ",
"pl": "Temperatura w pomieszczeniu zmieniona na ",
"zh-cn": "室温改为 "
},
"Could not change room temperature!": {
"en": "Could not change room temperature!",
"de": "Raumtemperatur konnte nicht geändert werden!",
"ru": "Не удалось изменить комнатную температуру!",
"pt": "Não foi possível alterar a temperatura ambiente!",
"nl": "Kon de kamertemperatuur niet wijzigen!",
"fr": "Impossible de changer la température de la chambre !",
"it": "Impossibile modificare la temperatura ambiente!",
"es": "¡No se pudo cambiar la temperatura ambiente!",
"pl": "Nie można zmienić temperatury w pomieszczeniu!",
"zh-cn": "无法改变室温!"
},
"Changes are saved now!": {
"en": "Changes are saved now!",
"de": "Änderungen werden jetzt gespeichert!",
"ru": "Изменения сохранены!",
"pt": "As alterações são salvas agora!",
"nl": "Wijzigingen worden nu opgeslagen!",
"fr": "Les modifications sont enregistrées maintenant !",
"it": "Le modifiche sono state salvate ora!",
"es": "¡Los cambios se guardan ahora!",
"pl": "Zmiany zostały zapisane!",
"zh-cn": "更改已保存!"
},
"save": {
"en": "save",
"de": "speichern",
"ru": "сохранить",
"pt": "salvar",
"nl": "opslaan",
"fr": "sauver",
"it": "salvare",
"es": "ahorrar",
"pl": "zapisać",
"zh-cn": "保存"
},
"default mode": {
"en": "default mode",
"de": "Standardmodus",
"ru": "режим по умолчанию",
"pt": "modo padrão",
"nl": "standaard modus",
"fr": "mode par défaut",
"it": "modalità di default",
"es": "modo por defecto",
"pl": "tryb domyślny",
"zh-cn": "默认模式"
},
"Mode set to home mode!": {
"en": "Mode set to home mode!",
"de": "Modus auf Standardmodus gesetzt!",
"ru": "Режим установлен на режим по умолчанию!",
"pt": "Modo definido para o modo padrão!",
"nl": "Modus ingesteld op standaardmodus!",
"fr": "Mode défini sur le mode par défaut !",
"it": "Modalità impostata sulla modalità predefinita!",
"es": "¡Modo establecido en el modo predeterminado!",
"pl": "Tryb ustawiony na tryb domyślny!",
"zh-cn": "模式设置为默认模式!"
}
};

Expand Down
4 changes: 2 additions & 2 deletions docs/de/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Wenn ein API Request Parameter benötigt können sie diese im korrespondierenden

### Änderungs-Requests
* setroomthermpoint ... abhängig von den manuellen Änderungen im Channel "setting" werden die Änderungen an die Netatmo Energy APP übertragen. (entweder sofort oder selbst getriggert - "Temperaturänderungen sofort übertragen").
* set_mode_to_home ... Der Button "set_mode_to_home" im channel "setting" setzt den Ventil-mode "set_mode_to_home" auf "home".
* set_mode_to_home ... Der Button "set_mode_to_home" im channel "setting" setzt den Ventil-mode "set_mode_to_home" auf "home". Außerdem wird der API Request sofort ausgelöst um die Änderung zu übertragen.

### Status
* running ... hier kann man erkenne ob derzeit ein API Request läuft
Expand Down Expand Up @@ -91,7 +91,7 @@ Hier können sie bestimmte Nachrichten bei bestimmten Statusänderungen auslöse
<img src="https://github.com/Homemade-Disaster/ioBroker.netatmo-energy/raw/master/docs/img/messages_de.png" alt="settingsAPI" width="70%"/>

## Admin-Tab
Auf der Admin-Tab können sie alle Thermostate, Bridges und Ventile ihrer netatmo energy instance anzeigen lassen. Dort ist ea auch möglich diese Ansicht zu aktualisieren bzw. eine vollständige API Aktualisierung zu starten.
Auf der Admin-Tab können sie alle Thermostate, Bridges und Ventile ihrer netatmo energy instance anzeigen lassen. Dort ist ea auch möglich diese Ansicht zu aktualisieren bzw. eine vollständige API Aktualisierung zu starten. Zusätzlich hat man die Möglichkeit die Änderungen in die Cloud zu übertragen und von einem eventuellen manuellen Modus wieder auf den Standardmodus umzuschalten.

<img src="https://github.com/Homemade-Disaster/ioBroker.netatmo-energy/raw/master/docs/img/admintab_de.png" alt="admintab" width="70%"/>

Expand Down
4 changes: 2 additions & 2 deletions docs/en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ If an API request need parameters, you can find these in the channel "parameters

### Update requests
* setroomthermpoint ... depending on the "setting" channel it sets the temperature of each room (immediately or by using the trigger "applychanges").
* set_mode_to_home ... In the channel "setting" you can use the button "set_mode_to_home" to set "home"-Mode for the valve.
* set_mode_to_home ... In the channel "setting" you can use the button "set_mode_to_home" to set "home"-Mode for the valve. The API request to transfer the changes will start immediately.

### Status
* running ... here you can see if API Requests are running right now
Expand Down Expand Up @@ -92,7 +92,7 @@ You can send messages depending on status changes of specific states. The messag
<img src="https://github.com/Homemade-Disaster/ioBroker.netatmo-energy/raw/master/docs/img/messages_en.png" alt="settingsAPI" width="70%"/>## Admin-Tab

## Admin-Tab
On the Admin-Tab you can see all thermostates, plugs and valves from your netatmo energy instance. From there you can refresh the view and also request an API refresh.
On the Admin-Tab you can see all thermostates, plugs and valves from your netatmo energy instance. From there you can refresh the view and also request an API refresh. You have alse the option to save changes into the cloud and to switch from manual mode to schedule mode.

<img src="https://github.com/Homemade-Disaster/ioBroker.netatmo-energy/raw/master/docs/img/admintab_en.png" alt="admintab" width="70%"/>

Expand Down
Binary file added docs/img/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/save.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 14 additions & 62 deletions io-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"common": {
"name": "netatmo-energy",
"version": "1.2.1",
"version": "1.2.2",
"news": {
"1.2.2": {
"en": "Added a slider to each valve to change the temperature and added some API requests to admin tab to transfer changes to the cloud",
"de": "Es wurde jedem Ventil ein Schieberegler hinzugefügt, um die Temperatur zu ändern, und einige API-Anforderungen zum Admin-Tab hinzugefügt, um Änderungen in die Cloud zu übertragen",
"ru": "Добавлен ползунок для каждого клапана для изменения температуры и добавлены некоторые запросы API на вкладку администратора для передачи изменений в облако.",
"pt": "Adicionou um controle deslizante para cada válvula para alterar a temperatura e adicionou algumas solicitações de API à guia de administração para transferir as alterações para a nuvem",
"nl": "Een schuifregelaar toegevoegd aan elke klep om de temperatuur te wijzigen en enkele API-verzoeken toegevoegd aan het beheerderstabblad om wijzigingen naar de cloud over te brengen",
"fr": "Ajout d'un curseur à chaque vanne pour modifier la température et ajout de quelques requêtes API à l'onglet admin pour transférer les modifications vers le cloud",
"it": "Aggiunto un dispositivo di scorrimento a ciascuna valvola per modificare la temperatura e aggiunte alcune richieste API alla scheda amministratore per trasferire le modifiche al cloud",
"es": "Se agregó un control deslizante a cada válvula para cambiar la temperatura y se agregaron algunas solicitudes de API a la pestaña de administración para transferir los cambios a la nube.",
"pl": "Dodano suwak do każdego zaworu, aby zmienić temperaturę i dodano kilka żądań API do zakładki administratora, aby przenieść zmiany do chmury",
"zh-cn": "为每个阀门添加了一个滑块以更改温度,并向管理选项卡添加了一些 API 请求以将更改传输到云"
},
"1.2.1": {
"en": "Messages for specific events created",
"de": "Nachrichten für bestimmte Ereignisse erstellt",
Expand Down Expand Up @@ -182,67 +194,7 @@
"es": "Crear versión principal",
"pl": "Utwórz wersję główną",
"zh-cn": "创建主要版本"
},
"0.2.4": {
"en": "Release script added",
"de": "Release script hinzugefügt",
"ru": "Добавлен сценарий выпуска",
"pt": "Script de lançamento adicionado",
"nl": "Releasescript toegevoegd",
"fr": "Script de version ajouté",
"it": "Script di rilascio aggiunto",
"es": "Se agregó el script de lanzamiento",
"pl": "Dodano skrypt wydania",
"zh-cn": "添加了发布脚本"
},
"0.2.3": {
"en": "Add abort controller",
"de": "Abbruchcontroller hinzufügen",
"ru": "Добавить контроллер прерывания",
"pt": "Adicionar controlador de aborto",
"nl": "Abort-controller toevoegen",
"fr": "Ajouter un contrôleur d'abandon",
"it": "Aggiungi controller di interruzione",
"es": "Agregar controlador de cancelación",
"pl": "Dodaj kontroler przerwania",
"zh-cn": "添加中止控制器"
},
"0.2.2": {
"en": "Added translations & Compact mode tested",
"de": "Übersetzungen hinzugefügt & Kompaktmodus getestet",
"ru": "Добавлены переводы и протестирован компактный режим",
"pt": "Traduções adicionadas e modo compacto testado",
"nl": "Toegevoegde vertalingen & Compacte modus getest",
"fr": "Traductions ajoutées et mode compact testé",
"it": "Aggiunte traduzioni e modalità compatta testata",
"es": "Traducciones añadidas y modo compacto probado",
"pl": "Dodano tłumaczenia i przetestowano tryb kompaktowy",
"zh-cn": "添加了翻译和压缩模式测试"
},
"0.2.1": {
"en": "Creation of states adapted",
"de": "Aufbau von Zuständen angepasst",
"ru": "Создание штатов адаптировано",
"pt": "Criação de estados adaptados",
"nl": "Oprichting van staten aangepast",
"fr": "Création d'états adaptés",
"it": "Creazione di stati adattati",
"es": "Creación de estados adaptados",
"pl": "Tworzenie dostosowanych państw",
"zh-cn": "适应状态的创建"
},
"0.2.0": {
"en": "Compatibility check to js-controller 4.0",
"de": "Kompatibilitätsprüfung für js-controller 4.0",
"ru": "Проверка совместимости с js-контроллером 4.0",
"pt": "Verificação de compatibilidade com js-controller 4.0",
"nl": "Compatibiliteitscontrole met js-controller 4.0",
"fr": "Vérification de la compatibilité avec js-controller 4.0",
"it": "Verifica della compatibilità con js-controller 4.0",
"es": "Comprobación de compatibilidad con js-controller 4.0",
"pl": "Sprawdzenie zgodności z kontrolerem js 4.0",
"zh-cn": "对 js-controller 4.0 的兼容性检查"
}
}
},
"title": "Netatmo Energy",
"titleLang": {
Expand Down
3 changes: 3 additions & 0 deletions lib/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ const _glob = {
'NotificationTelegramUser': 'getTelegramUser',
'GetValves': 'getValves',
'GetHomesdata': 'getHomesdata',
'SaveTemperature': 'saveTemperature',
'ApplyChanges': 'applyChanges',
'HomeMode': 'homeMode',
'NotificationPushover': 'pushover',
'NotificationWhatsapp': 'whatsapp-cmb',
'NoticeTypeLong': 'longNotice',
Expand Down
9 changes: 9 additions & 0 deletions lib/mytools.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
const words = require('../admin/words');

//check if it is an array
function isArray(it) {
if (typeof Array.isArray === 'function')
return Array.isArray(it);

return Object.prototype.toString.call(it) === '[object Array]';
}

//split id
function splitID(id) {
const actState = id.substring(id.lastIndexOf('.') + 1);
Expand Down Expand Up @@ -62,6 +70,7 @@ function tl(word, systemLang) {
}

module.exports = {
isArray,
splitID,
netatmoTags,
netatmoTagsDetail,
Expand Down
Loading

0 comments on commit 30ea2d2

Please sign in to comment.