Re: deConz et Sinopé
Publié : 19 avr. 2022, 02:55
Merci. Je viens de tester. Il le met bien à jour une fois puis cela revient à vide 
Reprenez le contrôle de votre domotique
https://easydomoticz.com/forum/
Apres on a juste2022-04-19 11:25:39.137 ZigBee ConBee II: ### Update device (Salon_Thermostat_Conso) : {'nValue': 0, 'sValue': '0;375233.0'}
Bon j'ai remis un truc sur la branche beta, mais j'ai pas pu faire de test, c 'est vraiment specifique a ton appareil, donc je sais pas si ca va marcher.2022-04-19 11:26:10.896 ZigBee ConBee II: ### Update device (Salon_Thermostat_Conso) : {'nValue': 0, 'sValue': '375233.0'}
Code : Tout sélectionner
curl -H 'Content-Type: application/json' -X PUT -d '{"temp_to_display": 270}' http://127.0.0.1/api/<ma clé d'API>/sensors/18/config
Code : Tout sélectionner
[{"success":{"/sensors/18/config/temp_to_display":270}}]Code : Tout sélectionner
--Script for updating Outdoor temp to display on Sinope TH1124ZB thermostat using REST-API
--
-- Devices:
WheaterStation = "Météo Montréal - THB"
DeconzAPIkey = "ma clé d'API"
DeconzTHidx = "18"
url = "http://127.0.0.1/api/" .. DeconzAPIkey .. "/sensor/" .. DeconzTHidx .. "/config"
-- Nothing to change after this line... :-)
commandArray = {}
if devicechanged[WheaterStation] then
-- Split data
Temperature, Humidity, Pressure = otherdevices_svalues[WheaterStation]:match("([^;]+);([^;]+)")
Temperature = tostring(math.floor(tonumber(Temperature)*100))
commande = "curl -H 'Content-Type: application/json' -X PUT -d '{" .. '"temp_to_display": ' .. Temperature .. "}'"
print("MAJ Outdoor temp " .. commande .. " " .. url)
os.execute(commande .. " " .. url .. "> /home/pi/domoticz/MAJ.log &")
end
return commandArray Code : Tout sélectionner
sudo cat MAJ.log
[{"error":{"address":"/sensor/18/config","description":"unauthorized user","type":1}}]Finalement mon idée n'était pas si folle ... Je ne savais juste pas comment le faire ... https://github.com/dresden-elektronik/d ... 1111411572mercusot a écrit : 21 mars 2022, 17:41
Il me faudrait donc trouver le moyen de pouvoir adresser le cluster "Sinope specific" même indirectement en "bindant" sur un autre attribut accessible par l'API. Je ne sais même pas si ce que je dis tiens la route![]()
![]()
Code : Tout sélectionner
{
"config": {
"externalsensortemp": 1590,
"heatsetpoint": 1900,
"ledindication": true,
"local_occupancy": true,
"mode": "off",
"offset": 0,
"on": true,
"reachable": true,
"schedule": {},
"schedule_on": false,
"unoccupiedheatsetpoint": 1800
},
"ep": 1,
"etag": "46dc3bcb767d59514abe24a929db49f5",
"lastannounced": null,
"lastseen": "2022-07-07T11:55Z",
"manufacturername": "Sinope Technologies",
"modelid": "TH1124ZB",
"name": "Thermostat Salon",
"state": {
"lastupdated": "2022-07-07T11:53:33.384",
"on": false,
"temperature": 2265
},
"swversion": "2007",
"type": "ZHAThermostat",
"uniqueid": "50:0b:91:40:00:02:ca:1c-01-0201"
}