Forum

Browse topics, discover Works With Legrand community!

Smarther API v2 problem

Hi all,

I’ve encoured a very strange problem when using Smarther v2 API.

After this request for topology

GET https://api.developer.legrand.com/smarther/v2.0/plants/6ac6f49b-d6ca-7f51-e053-1e182d0a4a67/topology HTTP/1.1
Host: api.developer.legrand.com
Ocp-Apim-Subscription-Key: ••••••••••••••••••••••••••••••••
Authorization: ••••••••••••••••••••••••••••••••••

the response body is

{
“plant”:{
“modules”:[
{
“device”:”chronothermostat”,
“id”:”6ac6f49b-d8ca-7f51-e053-1e182d0a4a67″,
“name”:”Termostato”,
“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”:”6ac6f49b-d6ca-7f51-e053-1e182d0a4a67″,
“name”:”casa”
}
}

Is it normal that plantId is equal to moduleId of my device “chronothermostat” ?

Infact, when I ask measuses using plantId and moduleId from previus request, I receive 404 not found error.

What am I doing wrong?

Thank you

Francesco

 

Hello Francesco,

Sorry for late answer, your topic was in the spam list for unknown reason

To answer to your issue :

No, it’s not normal to have the same plant and moduleId

Can you make a GET Plant (https://portal.developer.legrand.com/docs/services/smartherV2/operations/Plants/console)

Then retrieve the id of your plant and make a GET Topology (https://portal.developer.legrand.com/docs/services/smartherV2/operations/Topology/console)

And tell me if you still reproduce the error ? (I did a test, nothing seems to be wrong)

Have a good day,

Leslie – Community Manager

Hello, I’m facing exatly the same problem.

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

1st 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 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”
}
}

 

Mariano,

I answered you on this topic : https://developer.legrand.com/forums/topic/plantid-and-moduleid-are-the-same-get-chronothermostat-status-does-not-work/

Have a good day,

Leslie – Community Manager

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

You must be logged in to reply to this topic.