Activation/Desactivation de la camera via REST API

waewoo

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

0

Comments

2 comments

  • Comment author
    yh

    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: 

    https://api.netatmo.com/api/setstate

    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!

    0
  • Comment author
    Giada Community manager

    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 !

    0

Please sign in to leave a comment.