Icone de volet type blinds+stop

Forum dédié aux interfaces personnalisables : Custom Pages, Reacticz, Domoboard...
thier
Messages : 807
Inscription : 26 sept. 2015, 10:32
Localisation : charente

Icone de volet type blinds+stop

Message par thier »

Bonjour,
Suite a un crash de mon installation, j'ai migré mon vieux domoticz (2017) sur la version 2025.2. J'ai fais la migration de open zwave vers zwave Js et adapté mes scripts.
Là ou je bute c'est sur la réinstallation de mes customs page. Quelqu'un sait-il comment récupéré les icones de mes volets roulants.
Merci
PI3+, Buster, Domoticz V2020.2, rflink, zwave, chauffage piloté par qubino, sondes oregon et Vil1d, boite aux lettres détection passage facteur, volets roulants qubino fibaro.
thier
Messages : 807
Inscription : 26 sept. 2015, 10:32
Localisation : charente

Re: Icone de volet type blinds+stop

Message par thier »

Je donne la solution que j'ai trouvé:
Modifier le fichier frontpage.js
Trouver la catégorie "Blinds"
trouver la ligne de code

Code : Tout sélectionner

else if (item.SwitchType === 'Venetian Blinds EU' || item.SwitchType === 'Venetian Blinds US' ) {
et la modifier pour ajouter les commandes "Blinds + Stop"

Code : Tout sélectionner

else if (item.SwitchType === 'Venetian Blinds EU' || item.SwitchType === 'Venetian Blinds US' || item.SwitchType === 'Blinds + Stop') {
Et pour finir dans la configuration de la custom page:
fichier frontpage_setting utiliser l'information "Status" et indiquer"2" pour avoir l'icone.
Allez, j'y retourne
Dernière modification par Keros le 10 déc. 2025, 19:53, modifié 1 fois.
Raison : Ajout des balises pour le code. Merci de lire la section Bien utiliser le forum
PI3+, Buster, Domoticz V2020.2, rflink, zwave, chauffage piloté par qubino, sondes oregon et Vil1d, boite aux lettres détection passage facteur, volets roulants qubino fibaro.
thier
Messages : 807
Inscription : 26 sept. 2015, 10:32
Localisation : charente

Re: Icone de volet type blinds+stop

Message par thier »

pour récupérer les icones fermé et ouvert en plus du bouton stop quand une manœuvre est stoppée en cours, il faut modifier

Code : Tout sélectionner

var stop = ['<img src=',$.domoticzurl,'/images/blindsstop.png  hspace=1 height=40 onclick="SwitchToggle(',item.idx,', \'Stop\',',txt_blind_stop,',',item.Protected,')">'].join('');
vdata = [down,stop,up].join('');
en

Code : Tout sélectionner

var stop = ['<img src=',$.domoticzurl,'/images/blindsstop.png  hspace=1 height=40 onclick="SwitchToggle(',item.idx,', \'Stop\',',txt_blind_stop,',',item.Protected,')">'].join('');
var down = ['<img src=',$.domoticzurl,'/images/blinds48.png  hspace=1 width=40 onclick="SwitchToggle(',item.idx,', \'On\',',txt_blind_down,',',item.Protected,')">'].join('');
var up = ['<img src=',$.domoticzurl,'/images/blindsopen48sel.png  hspace=1 width=40 onclick="SwitchToggle(',item.idx,', \'Off\',',txt_blind_up,',',item.Protected,')">'].join('');
vdata = [down,stop,up].join('');
PI3+, Buster, Domoticz V2020.2, rflink, zwave, chauffage piloté par qubino, sondes oregon et Vil1d, boite aux lettres détection passage facteur, volets roulants qubino fibaro.
thier
Messages : 807
Inscription : 26 sept. 2015, 10:32
Localisation : charente

Re: Icone de volet type blinds+stop

Message par thier »

Edit
Il subsistait un problème de cohérence des couleurs avec domoticz, j'ai donc créé une section spéciale pour mes commandes de volets de type blins+stop opérationnelles même en cas de stop pendant qu'un mouvement est en cours

Code : Tout sélectionner

else if (item.SwitchType === 'Blinds + Stop') {
			if(vdata === 'Closed') {
			var down = ['<img src=',$.domoticzurl,'/images/blinds48sel.png  hspace=1 width=40 onclick="SwitchToggle(',item.idx,', \'Off\',',txt_blind_down,',',item.Protected,')">'].join('');
			var up = ['<img src=',$.domoticzurl,'/images/blindsopen48.png  hspace=1 width=40 onclick="SwitchToggle(',item.idx,', \'On\',',txt_blind_up,',',item.Protected,')">'].join('');
			var stop = ['<img src=',$.domoticzurl,'/images/blindsstop.png  hspace=1 height=40 onclick="SwitchToggle(',item.idx,', \'Stop\',',txt_blind_stop,',',item.Protected,')">'].join('');											
                                                    		vdata = [down,stop,up].join('');													
                                                    }
			else if (vdata === 'Open' ) {
			var down = ['<img src=',$.domoticzurl,'/images/blinds48.png  hspace=1 width=40 onclick="SwitchToggle(',item.idx,', \'Off\',',txt_blind_down,',',item.Protected,')">'].join('');
			var up = ['<img src=',$.domoticzurl,'/images/blindsopen48sel.png  hspace=1 width=40 onclick="SwitchToggle(',item.idx,', \'On\',',txt_blind_up,',',item.Protected,')">'].join('');
			var stop = ['<img src=',$.domoticzurl,'/images/blindsstop.png  hspace=1 height=40 onclick="SwitchToggle(',item.idx,', \'Stop\',',txt_blind_stop,',',item.Protected,')">'].join('');											
                           vdata = [down,stop,up].join('');													
                                                    }

                else if (vdata != 'Open' && vdata != 'Closed') { 														
                           var down = ['<img src=',$.domoticzurl,'/images/blinds48.png  hspace=1 width=40 onclick="SwitchToggle(',item.idx,', \'Off\',',txt_blind_down,',',item.Protected,')">'].join('');
			var up = ['<img src=',$.domoticzurl,'/images/blindsopen48.png  hspace=1 width=40 onclick="SwitchToggle(',item.idx,', \'On\',',txt_blind_up,',',item.Protected,')">'].join('');
			var stop = ['<img src=',$.domoticzurl,'/images/blindsstop.png  hspace=1 height=40 onclick="SwitchToggle(',item.idx,', |'Stop\',',txt_blind_stop,',',item.Protected,')">'].join('');											
                         vdata = [down,stop,up].join('');

                                                   }
PI3+, Buster, Domoticz V2020.2, rflink, zwave, chauffage piloté par qubino, sondes oregon et Vil1d, boite aux lettres détection passage facteur, volets roulants qubino fibaro.
Répondre