Forum

Browse topics, discover Works With Legrand community!

plantId and moduleId are the same. Get-Chronothermostat-Status does not work

I am using the API for smarther thermostat, I find the plantId with the API https://portal.developer.legrand.com/docs/services/smartherV2/operations/Plants/console

and then I look for the moduleId with the following API passing the plantId obtained previously
https://portal.developer.legrand.com/docs/services/smartherV2/operations/Topology/console

it happens that plantId and moduleId are identical.

Finally, if I try to use the API for Get-Chronothermostat-Status by putting the two Ids, obtaining 404 Resource not found.

can someone help me?
thank you

Hi Mariano,

I didn't reproduce your issue via the Try-It of the Smarther API

Here is what I retrieve :

For GET Plants : { "plants": [{ "id": "9840cb9c-3f00-484a-e053-1e182d0XXXXX", "name": "Eliot" }] }

For GET Topology : { "plant": { "modules": [{ "device": "chronothermostat", "id": "c0f96067-c981-f041-e053-XXXXXXXXXX", "name": "Eliot",

Can you please send me screenshots of your different requests ? (don't forget to hide private information, or send me the screenshots via the contact form : https://developer.legrand.com/contact/)

 

Have a good day,

Leslie - Community Manager

hello I retry today the calls for get plant and get topology, these are the result:

PlantId and DeviceId are perfect equal :(. Can anybody helm me? How I can reset all into my thermosthat or account for avoid this problem? I attach also the screen as you request.

1st Request

"request

Request URL
https://api.developer.legrand.com/smarther/v2.0/plants

HTTP request
GET https://api.developer.legrand.com/smarther/v2.0/plants HTTP/1.1
Host: api.developer.legrand.com
Ocp-Apim-Subscription-Key: ••••••••••••••••••••••••••••••••

200 OK

Response content
Vary: Host
X-Frame-Options: SAMEORIGIN
X-OneAgent-JS-Injection: true
X-MULE_SESSION: ••••••••••••••••••••••••••••••••
Node_Id: nd1
http.status: 200
Service_Release: 3.19.1
Set-Cookie: dtCookie=••••••••••••••••••••••••••••••••
Date: Sat, 16 May 2020 09:42:24 GMT
Content-Length: 72
Content-Type: application/json
{
“plants”: [{
“id”: “6c663d9f-44fd-c20f-e053-1e182d0aa61c”,
“name”: “casa”
}]
}

 

2dn Request

"request

Request URL
https://api.developer.legrand.com/smarther/v2.0/plants/6c663d9f-44fd-c20f-e053-1e182d0aa61c/topology

HTTP request
GET https://api.developer.legrand.com/smarther/v2.0/plants/6c663d9f-44fd-c20f-e053-1e182d0aa61c/topology HTTP/1.1
Host: api.developer.legrand.com
Ocp-Apim-Subscription-Key: ••••••••••••••••••••••••••••••••
Authorization: ••••••••••••••••••••••••••••••••

200 OK

Response content
Vary: Host
X-Frame-Options: SAMEORIGIN
X-OneAgent-JS-Injection: true
X-MULE_SESSION: ••••••••••••••••••••••••••••••••
Node_Id: nd1
http.status: 200
Service_Release: 3.19.1
Request-Context: appId=cid-v1:17d898fc-adbd-487e-96a4-c4287796f34d
Date: Sat, 16 May 2020 09:55:05 GMT
Set-Cookie: dtCookie=v_4_srv_6_sn_C64D323C00400FD7A3A58E4A49E558E4_perc_100000_ol_0_mul_1; Path=/; Domain=.myhomeweb.com
Content-Length: 830
Content-Type: application/json
{
“plant”: {
“modules”: [{
“device”: “chronothermostat”,
“id”: “6c663d9f-46fd-c20f-e053-1e182d0aa61c”,
“name”: “ciccio”,
“capabilities”: [{
“capability”: “function”,
“canDo”: {
“command”: {
“do”: true
},
“request”: {
“do”: true
},
“notification”: {
“do”: true
}
}
}, {
“capability”: “mode”,
“canDo”: {
“command”: {
“do”: true
},
“request”: {
“do”: true
},
“notification”: {
“do”: true
}
}
}, {
“capability”: “setPoint”,
“canDo”: {
“command”: {
“do”: true
},
“request”: {
“do”: true
},
“notification”: {
“do”: true
}
}
}, {
“capability”: “programlist”,
“canDo”: {
“command”: {
“do”: false
},
“request”: {
“do”: true
},
“notification”: {
“do”: false
}
}
}, {
“capability”: “measures”,
“canDo”: {
“command”: {
“do”: false
},
“request”: {
“do”: true
},
“notification”: {
“do”: true
}
}
}, {
“capability”: “time”,
“canDo”: {
“command”: {
“do”: false
},
“request”: {
“do”: true
},
“notification”: {
“do”: false
}
}
}]
}],
“id”: “6c663d9f-44fd-c20f-e053-1e182d0aa61c”,
“name”: “casa”
}
}

Hello Mariano,

Your IDs look like the same but are different. Look at the 2nd part of the digits :

  • Plant_id : -44fd-
  • Module_id : -46fd-

Using the right IDs should resolve your issue

Have a good day,

Leslie - Community Manager

this almost total similarity has deceived me. you're absolutely right, I was going crazy.
thanks

if i query for the plant id say

{
"statusCode": "401",
"message": "Unauthorized"
}

what i need to do?

Hello Antonio,

In most of cases, this issue arrives when you use wrong credentials. To be sure you are using the correct one go in Thermostat application > Menu > Account > Third-party access. You will be sure to know which email address is linked to your account

Have a good day,

Leslie - Community Manager

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

You must be logged in to reply to this topic.

Information

message6 replies
people3 participants