Camera type NOC / change floodlight through api/setstate

frederic.astic

Hi, 

I have a basic implementation of viewing live streaming of a Netatmo NOC Camera and I only use api/homestatus to achieve this.
So i retrieve the vpn_url, then appending "live/index.m3u8" to this value, and open it from a mediaplayer.

GET https://api.netatmo.com/api/homestatus?device_types=NOC&device_types=NACamera&home_id=xxxx
Status code: 200
Response: {
"status" : "ok",
"time_server" : 1760558554,
"body" : {
"home" : {
"id" : "xxxx",
"modules" : [
{
"floodlight" : "off",
"wifi_state" : "full",
"wifi_strength" : 39,
"id" : "module_id",
"vpn_url" : "vpn_url",
"monitoring" : "on",
"firmware_revision" : 3026000,
"type" : "NOC",
"sd_status" : 4,
"alim_status" : 2,
"is_local" : false
}
]
}
}
}
I would like to implement now 
floodlight - auto/on/off
monitoring - on/off : But I doubt it's possible since it's not mentioned into documentation, and then, after digging for my problem, I found this one: https://github.com/openhab/openhab-addons/issues/14617#issuecomment-1495546551

 
I have the same issue for this following request, switch on floodlight through api : 

-H "Content-Type: application/json" \
-H "Authorization: Bearer my-working-bearer-for-previous-request" \
-d '{
"home": {
"id": "homeId", (found in previous request)
"modules": [
{
"floodlight": "on",
"id": "module_id" (found in previous request)
}
]
}
}'
And response is : 
{"error":{"code":21,"message":"Invalid device_id, 70:ee:50:55:f6:ee"}}


The much funny thing is I had the exact same request sent from Netatmo Security app, with same home_id & module_id
Here is an example of request sent from netatmo app

accept: */*
content-type: application/json; charset=utf-8
x-correlationid: 15961355151
content-length: 132
authorization: Bearer token
accept-language: fr-FR;q=1.0, en-FR;q=0.9
user-agent: NetatmoSecurity/6.16.1 (com.netatmo.camera; build:1161; iOS 18.6.2) Alamofire/5.10.2
accept-encoding: br;q=1.0, gzip;q=0.9, deflate;q=0.8

{
"home": {
"modules": [
{
"id": "module_id",
"floodlight": "on"
}
],
"id": "home_id"
},
"app_identifier": "app_security"
}

Someone could explain what's happen here ?

Thanks to all :)
0

Commentaires

2 commentaires

Vous devez vous connecter pour laisser un commentaire.