Problems with Welcome and setpersonshome

The Netatmo API is a set of webservices allowing developers and third parties to access Netatmo device's data.
Post Reply
Waldone
Posts: 5
Joined: 23 Jun 2020, 06:32

Problems with Welcome and setpersonshome

Post by Waldone »

Hello all,
I have problems with the ( setpersonshome ) in my NodeRED.

The structure is like this:
1. as: (POST)
2. to: https://api.netatmo.com/api/setpersonshome
3. with this specification:
{
"access_token": "5a4xxxxxxxxxxxxxxx|xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"home_id": "5eaxxxxxxxxxxxxxxxxx",
"person_id": "f6dxxxxx-xxxx-xxxx-xxxxxxxxxx"
}

In response I get:
"{"error":{"code":10, "message": "One arg is missing"}}"


When I execute ( setpersonsaway ) with same date only to this address:
https://api.netatmo.com/api/setpersonsaway
everything works and I leave.

I am grateful for your help.
Leslie
Posts: 113
Joined: 12 Feb 2020, 11:07

Re: Problems with Welcome and setpersonshome

Post by Leslie »

Hello Waldone,

I don't know NodeRED, but I think your issue comes from the way you declared persons ID
An array is needed for person_ids[0] (https://dev.netatmo.com/apidocumentatio ... ersonshome)
Maybe that fixing it will resolve your issue

Have a good day,
Leslie - Community Manager
Waldone
Posts: 5
Joined: 23 Jun 2020, 06:32

Re: Problems with Welcome and setpersonshome

Post by Waldone »

Thanks for the tip!

I have already found an error,

- with setpersonsaway it says == "person_id"
- with setpersonshome it says == "person_ids%5B0%5D".


Unfortunately, the ( setpersonshome ) still doesn't work :(

I'll keep looking 😊

Thank you Waldone
humpty83
Posts: 8
Joined: 10 May 2017, 21:13

Re: Problems with Welcome and setpersonshome

Post by humpty83 »

As Leslie already pointed out, you gotta pass an array of person ids, so instead of

Code: Select all

{
"access_token": "5a4xxxxxxxxxxxxxxx|xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"home_id": "5eaxxxxxxxxxxxxxxxxx",
"person_id": "f6dxxxxx-xxxx-xxxx-xxxxxxxxxx"
}
you have to pass in

Code: Select all

{
"access_token": "5a4xxxxxxxxxxxxxxx|xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"home_id": "5eaxxxxxxxxxxxxxxxxx",
"person_ids": ["f6dxxxxx-xxxx-xxxx-xxxxxxxxxx"]
}
Post Reply

Return to “Netatmo API”