Page 1 sur 3

Modifier la temperature thermostat Nest par script?

Publié : 20 nov. 2016, 11:40
par dartflag
Bonjour a tous,
je possède un thermostat Nest, et je voulais savoir s'il était possible de modifier la température du thermostat par script?
j'ai bien tenté de faire un blocky pour effectuer cette opération, mais sans succès.
J'ai bien ajouter le thermostat dans domoticz. Mais je ne parviens a changer la température qu'a partir de l'interface graphique de domoticz :oops:

merci de votre aide

Fred

Re: Modifier la temperature thermostat Nest par script?

Publié : 20 nov. 2016, 11:53
par ganq
Bonjour,
peux-tu mettre une photo de ton script ?

Re: Modifier la temperature thermostat Nest par script?

Publié : 20 nov. 2016, 12:04
par dartflag
alors voici les infos:
Capture d’écran 2016-11-20 à 11.59.26.png
Capture d’écran 2016-11-20 à 11.59.26.png (21.34 Kio) Consulté 7034 fois
avec
Capture d’écran 2016-11-20 à 12.02.39.png
Capture d’écran 2016-11-20 à 12.02.39.png (28.61 Kio) Consulté 7034 fois
qui correspond a mon Thermostat

mais il semble que je ne puisse pas l'utiliser avec une commande SET?

Re: Modifier la temperature thermostat Nest par script?

Publié : 20 nov. 2016, 12:13
par vil1driver
salut,

fais le en lua ;)

Code : Tout sélectionner

-- script_device_blabla.lua

commandArray = {}
if (devicechanged['Contacteur Bureau'] == 'Open') then
commandArray['SetSetpoint:MySetPointIdx']='15'
elseif (devicechanged['Contacteur Bureau'] == 'Closed') then
commandArray['SetSetpoint:MySetPointIdx']='21'
end
return commandArray
avec MySetPointIdx, l'idx de ton thermostat

Re: Modifier la temperature thermostat Nest par script?

Publié : 20 nov. 2016, 13:10
par dartflag
Salut Vil,

je ne suis pas trop expert en script et je cafouille un peu :oops:

j'ai ça pour mon thermostat:
Capture d’écran 2016-11-20 à 13.08.33.png
Capture d’écran 2016-11-20 à 13.08.33.png (33.89 Kio) Consulté 7022 fois
je dois remplacer Idx par 136 pour avoir la syntaxe suivante:

commandArray['SetSetpoint:MySetPoint136']='15'
?
je ne vois pas bien la? :?:

Re: Modifier la temperature thermostat Nest par script?

Publié : 20 nov. 2016, 13:27
par vil1driver
plutôt

Code : Tout sélectionner

commandArray['SetSetpoint:136']='15' 

Re: Modifier la temperature thermostat Nest par script?

Publié : 20 nov. 2016, 14:11
par dartflag
bon j'ai adapter le code pour fixer directement la valeur, mais celle ci reste toujours a 21° qui est la température actuelle du thermostat?

Code : Tout sélectionner

-- script_device_blabla.lua

commandArray = {}
val_volbur = otherdevices_svalues['Domicile Living Room Setpoint']
print(val_volbur)
commandArray['SetSetpoint:136']='15'
return commandArray

Re: Modifier la temperature thermostat Nest par script?

Publié : 20 nov. 2016, 15:20
par thier
Je

Re: Modifier la temperature thermostat Nest par script?

Publié : 20 nov. 2016, 15:21
par thier
Je fais d'une autre façon
local consigne_salon = tonumber(otherdevices_svalues['salon vacances']) --thermostat qui gère le température en mode vacances.
local urlsalon = domoticz_url..'/json.htm?type=command&param=udevice&idx='..thermostat_salon..'&nvalue=0&svalue='..consigne_salon
commandArray['OpenURL'] = urlsalon

avec défini en début de script
local domoticz_url = 'ip de domoticz:8080'
local thermostat_salon = 'XXXX' --idx du thermostat de consigne chauffage

Re: Modifier la temperature thermostat Nest par script?

Publié : 20 nov. 2016, 15:22
par vil1driver
Sinon tu peux tenter ceci

Code : Tout sélectionner

commandArray['OpenURL']=192.168.1.10:8080/json.htm?type=command&param=udevice&idx=136&nvalue=0&svalue=15'	
Remplacer l'ip par celle de ton domoticz (pas de mot de pass ?)