Forum

Browse topics, discover Works With Legrand community!

Info regarding Smarther POST – Boost update

I tried as per your previous post, my time is +1 and I tried with or without +1

POST https://api.developer.legrand.com/smarther/v1.0/chronothermostat/thermoregulation/addressLocation/plants/8476aa7b-d0a310b/modules/parameter/id/value/dd78aa7b182d0addda HTTP/1.1
Host: api.developer.legrand.com
Content-Type: application/json
Ocp-Apim-Subscription-Key: ••••••••••••••••••••••••••••••••
Authorization: •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

{
“function”: “heating”,
“mode”: “boost”,
“setPoint”: 0.0,
“programs”: [
{
“number”: 0
}
],
“activationTime”: “2018-12-07T13:28:24/2018-12-07T13:58:22”
}

and this is the answer

Warning: Bad request
Vary: Host
X-Frame-Options: SAMEORIGIN
X-MULE_SESSION: rO0ABXNyACNvcmcubXVsZS5zZXNzaW9uLkRlZmF1bHRNdWxlU2Vzc2lvbi7rdtEW7GGKAwAFWgAFdmFsaWRMAA1mbG93Q29uc3RydWN0dAAmTG9yZy9tdWxlL2FwaS9jb25zdHJ1Y3QvRmxvd0NvbnN0cnVjdDtMAAJpZHQAEkxqYXZhL2xhbmcvU3RyaW5nO0wACnByb3BlcnRpZXN0AA9MamF2YS91dGlsL01hcDtMAA9zZWN1cml0eUNvbnRleHR0ACdMb3JnL211bGUvYXBpL3NlY3VyaXR5L1NlY3VyaXR5Q29udGV4dDt4cAFwdAAkOWQ4MmI0ZDItZmExYi0xMWU4LWE3ZDAtMDA1MDU2OGY3ZWY3c3IAJWphdmEudXRpbC5Db2xsZWN0aW9ucyRTeW5jaHJvbml6ZWRNYXAbc/kJS0s5ewMAAkwAAW1xAH4AA0wABW11dGV4dAASTGphdmEvbGFuZy9PYmplY3Q7eHBzcgAkb3JnLm11bGUudXRpbC5DYXNlSW5zZW5zaXRpdmVIYXNoTWFwndHZ72dFzgADAAB4cHcMP0AAAAAAABAAAAAAeHEAfgAJeHB4
http.status: 400
Service_Release: 2.18.0
Node_ID: 2
Set-Cookie: dtCookie=35E5E9B8D6C1434A7CF3BF887EE40C51|RWxpb3QrU2VydmljZXN8MQ; Path=/; Domain=.myhomeweb.com;HttpOnly;Secure,My_prod_session=!kIUcu7QCA/R2qC2HfGIUT7QqV2r0S4jtU+bhYWe9Ibj8mb4gFIXuLp5LgiE8xY+xX0gfwyk71vE1EFk0fxk9qrhWbEXEzHiBBUXeyU8=; path=/; Httponly; Secure
Date: Fri, 07 Dec 2018 12:28:35 GMT
Connection: close
Content-Length: 44
Content-Type: application/json

{
“statusCode”: “400”,
“message”: “Bad request”
}

this is the regex with the suggested pattern (I think little bit wrong)
https://imageshack.us/i/pmS4gcfoj
Bye
Sandro

I did a few tests : it seems you must set your activationTime exactly to 30, 60 or 90 minutes
Example : 2018-12-07T13:30:00/2018-12-07T14:00:00

Have a good day,
Leslie – Community Manager

Now works fine, but I tried to understand the workflos and I played to send a command for the next year end…

{
“function”: “heating”,
“mode”: “boost”,
“setPoint”: 22.0,
“activationTime”: “2018-12-31T22:00:00/2018-12-31T23:30:00”
}

Look the timestamp. End ????
It’s works 🙂
I think that your program read only the hour differences …. just to use a future date….
Bye
Sandro

Work in progress

Ok I tried to launch the boost mode with your time parameters and you are right : it seems to launch immediately the boost mode even for a further date.
I warned the team in charge of the development of the Smarther API about it.

Have a good day,
Leslie – Community Manager

I set time for boost mode with this funcion in Python:

if mode == "boost":
now = datetime.now()
time = now + timedelta(minutes=int(activationtime))
now_str = now.strftime("%Y-%m-%dT%H:%M:%S")
time_str = time.strftime("%Y-%m-%dT%H:%M:%S")
activationtime_str = "\"activationTime\": \"" + now_str + "/" + time_str + "\""

results: “activationTime”: “2018-12-07T18:07:06/2018-12-07T18:37:06”
It works fine.

  • This reply was modified 5 years, 4 months ago by gallochri.
  • This reply was modified 5 years, 4 months ago by gallochri.

Ciao, puoi condividere il codice di integrazione con home assistant?

Grazie

Hello,

Please ask your question in english so everybody can understand 😉

Have a good day,
Leslie – Community Manager

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.