/setstate endpoint => { "code":7,"message":"Nothing to update" }

teiglin

Hi everyone,

I am trying to control the temperature of the rooms of my home using the API.
I already succeeded to control the shutters using the "/setstate" endpoint.
But for the temperature, I am using one of the setstate requests given as example (entitled "Apply a temperature setpoint to a room (BNS, BNTH)"):

{'home': {'id': 'my_home_id', 'rooms': [{'id': 'my_room_id', 'therm_setpoint_mode': 'manual', 'therm_setpoint_temperature': 21, 'therm_setpoint_end_time': 1716680242}]}}

Of course I replaced the ids with my own.
I tried with and without the optional 'therm_setpoint_end_time'.
Also, I took care of using a token with the permissions for all scopes to be sure.

But I am getting the following result:

<Response [406]> {"error":{"code":7,"message":"Nothing to update"}}

I would appreciate a more accurate error message, explaining why he is ignoring the given state ^^

Note that my rooms are controlled by valves (type "NRV" given by the endpoint /homesdata). In the example, it gives the type "BNS" and "BNTH", but I really don't understand why the "NRV" would be different. From the application Control, I can override the temperatures the same way I would like to do using API.

Thank you for any help you can provide me!

0

Comments

2 comments

  • Comment author
    Leslie Community moderator

    Hello,

    We have different types of thermostats based on different infrastructures (NATherm1, OTH and BNS) that can be linked with NRVs

    According to the error code it's possible that you're not using the correct APIs endpoints

    If you own a NATherm1 with NRV you must use the endpoints from the Energy API : https://dev.netatmo.com/apidocumentation/energy

    If the problem doesn't come from here, can you write me via the API contact form and send me the email address of your Netatmo end-user account ?

    Have a good day,

    Leslie - Community Manager

    1
  • Comment author
    teiglin

    Hello Leslie,

    Thank you! The energy endpoint ("setroomthermpoint") was indeed the one which works for me. I didn't see any "NATherm1" in my /homesdata result, but I have a "NAPlug" which is also mentionned in the Energy section.

    Also, now, it is no longer my issue since I wrote my wrapper to control my home. But if you want less question like that, you might want to ask the devs to return more explicit errors as result of the /setstate endpoint 😉 Something like, for each new state provided separately, a response about its success, otherwise the reason why it is invalid (missing permission, module/room not found, invalid values, case not managed by setstate with alternatives...)

    Thank you again and have a good day too!

    1

Please sign in to leave a comment.