Activation/Desactivation de la camera via REST API
Bonjour,
Pour certains automatismes (Home Assistant...), je souhaiterai activer/desactiver la camera via REST API mais je ne trouve pas un tel endpoint dans la doc :https://dev.netatmo.com/apidocumentation/security
Pouvez vous me dire s'il existe un tel endpoint ou bien si une autre solution existe pour automatiser ce genre d'action ou bien encore si vous avez prevu de proposer un tel endpoint ?
Merci
Commentaires
2 commentaires
Bonjour,
Have you tried: https://dev.netatmo.com/apidocumentation/security#setstate ?
It shows you how you can POST a request to toggle your camera's "floodlight", but if you change "floodlight" to "monitoring" you'll find that works too (at least it did for me).
request URL:
POST payload (set your home and module id):
{"home": {
"id": "xxx",
"modules": [
{
"id": "xxx",
"monitoring": "on"
}
]
}
}
curl (set your bearer token, home id and module id):
curl -X POST "https://api.netatmo.com/api/setstate" -H "accept: application/json" -H "Authorization: Bearer xxx|xxx" -H "Content-Type: application/json" -d "{\"home\":{\"id\":\"xxx\",\"modules\":[{\"id\":\"xxx\",\"monitoring\":\"on\"}]}}"Hope that helps!
Bonjour,
Une section en anglais dédiée entièrement à l'API et aux automatisations est disponible dans notre forum à ce lien : https://helpcenter.netatmo.com/hc/en-us/community/topics/5892346495378--EN-API-automation-and-external-services
N'hésitez pas à poster votre demande 😉 Leslie, notre expert, se fera un plaisir de vous aider.
Bonne journée !
Vous devez vous connecter pour laisser un commentaire.