### Get Scenarios Source: https://dev.netatmo.com/apidocumentation/control Retrieve all defined scenarios for devices. ```APIDOC ## GET /getscenarios ### Description Retrieves all predefined and user-created scenarios. ### Method GET ### Endpoint /getscenarios ### Parameters #### Query Parameters - **device_id** (string) - Required - The ID of the device for which to retrieve scenarios. ### Response #### Success Response (200) - **body** (object) - Contains a list of scenarios. - **scenarios** (array) - A list of scenario objects. - **id** (string) - The unique identifier for the scenario. - **name** (string) - The name of the scenario. - **actions** (array) - A list of actions within the scenario. #### Response Example ```json { "scenarios": [ { "id": "scenario_1", "name": "Home", "actions": [] } ] } ``` ``` -------------------------------- ### GET /homesdata Source: https://dev.netatmo.com/apidocumentation/security Retrieves general home-level data, including information about persons in the home and device setup details. ```APIDOC ## GET /homesdata ### Description Retrieves data related to the home environment, such as the list of persons, door tag categories, and device setup dates. ### Method GET ### Endpoint /homesdata ### Response #### Success Response (200) - **homes** (array) - List of home configurations and associated persons. #### Response Example { "persons": [{"id": "1", "name": "John"}], "last_setup_date": "2023-01-01" } ``` -------------------------------- ### GET /getscenarios Source: https://dev.netatmo.com/apidocumentation/control Retrieves all available scenarios for the home. ```APIDOC ## GET /getscenarios ### Description Retrieves a list of all pre-configured scenarios (e.g., Home, Away, Wake Up, Bedtime). Note that scenarios cannot be edited via the API. ### Method GET ### Endpoint /getscenarios ### Response #### Success Response (200) - **scenarios** (array) - List of available scenario objects. #### Response Example { "scenarios": ["Home", "Away", "Wake Up", "Bedtime"] } ``` -------------------------------- ### GET /getscenarios Source: https://dev.netatmo.com/apidocumentation/control Retrieve the scenarios associated with devices in a home. ```APIDOC ## GET /getscenarios ### Description Retrieve scenarios of devices associated to the home. ### Method GET ### Endpoint /getscenarios ### Parameters #### Query Parameters - **home_id** (string) - Required - The ID of the home to retrieve scenarios for. ### Request Example None ### Response #### Success Response (200) - **scenarios** (array) - List of available scenarios. - **scenario_id** (string) - Unique identifier for the scenario. - **name** (string) - Name of the scenario. #### Response Example { "scenarios": [ { "scenario_id": "some_scenario_id", "name": "Movie Night" } ] } ``` -------------------------------- ### GET /homestatus Source: https://dev.netatmo.com/apidocumentation/control Get the current status of a home and its associated devices. ```APIDOC ## GET /homestatus ### Description Get the current status of a home and the associated devices. ### Method GET ### Endpoint /homestatus ### Parameters #### Query Parameters - **home_id** (string) - Required - The ID of the home to retrieve status for. ### Request Example None ### Response #### Success Response (200) - **status** (object) - Current status of the home and devices. - **devices** (array) - List of devices and their current states. - **device_id** (string) - Unique identifier for the device. - **state** (object) - Current state of the device (e.g., temperature, mode). #### Response Example { "status": { "devices": [ { "device_id": "some_device_id", "state": { "temperature": 22.5, "mode": "auto" } } ] } } ``` -------------------------------- ### GET /homestatus Source: https://dev.netatmo.com/apidocumentation/security Get the current status of a specific home and its associated devices. ```APIDOC ## GET /homestatus ### Description Get the current status of a home and the associated devices. ### Method GET ### Endpoint /homestatus ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token obtained through OAuth2 authentication. - **home_id** (string) - Required - The ID of the home for which to retrieve the status. ### Response #### Success Response (200) - **body** (object) - Contains the status of the home and its devices. #### Response Example ```json { "status": "ok", "home": { "id": "599ab5152d3e049f0f8b53fa", "devices": [ { "id": "70:ee:50:71:13:ee", "type": "NACamera", "status": "online", "sd_status": "ok", "vpn_url": "vpn.example.com", "reachable": true, "config": { "name": "Living Room Camera", "room_id": "605301a43d3e049f0f8b53fb" }, "firmware": 123456789, "last_update": 1678886400 } ] } } ``` ``` -------------------------------- ### GET /homestatus Source: https://dev.netatmo.com/apidocumentation/control Retrieves the current status, configured power, brightness, and appliance type for lighting devices. ```APIDOC ## GET /homestatus ### Description Retrieves operational data for lighting devices including power, brightness, and on/off status. ### Method GET ### Endpoint /homestatus ### Response #### Success Response (200) - **status** (string) - Current light status (on/off) - **power** (number) - Instant power delivered by the device - **brightness** (number) - Current brightness level for dimmable lights #### Response Example { "status": "on", "power": 10, "brightness": 80 } ``` -------------------------------- ### GET /homestatus Source: https://dev.netatmo.com/apidocumentation/energy Retrieves the current status of the boiler and room temperatures. ```APIDOC ## GET /homestatus ### Description Retrieves the current status of the boiler (if activated by a heating control device) and the current temperature of a room. It can also provide the heating power requested by a room for NRV product type. ### Method GET ### Endpoint /homestatus ### Parameters #### Query Parameters - **room_id** (string) - Required - The ID of the room to get information for. - **scale** (string) - Optional - The scale of measurement (e.g., "last"). ### Request Example ``` GET /homestatus?room_id=1234567890abcdef12345678 ``` ### Response #### Success Response (200) - **boiler_status** (boolean) - Indicates if the boiler is currently activated. - **current_temperature** (number) - The current temperature of the room in Celsius. - **heating_power** (number) - The heating power requested by the room (only for NRV). #### Response Example ```json { "boiler_status": true, "current_temperature": 21.5, "heating_power": 50 } ``` ``` -------------------------------- ### Get Home Status (homestatus) Source: https://dev.netatmo.com/apidocumentation/security This endpoint retrieves the current status of a home and its connected devices. It is a GET request to the /homestatus endpoint. ```HTTP GET /homestatus ``` -------------------------------- ### GET /homesdata Source: https://dev.netatmo.com/apidocumentation/control Retrieve a list of user's homes and their associated topology. ```APIDOC ## GET /homesdata ### Description Retrieve user's homes and their topology. ### Method GET ### Endpoint /homesdata ### Parameters #### Query Parameters None ### Request Example None ### Response #### Success Response (200) - **homes** (array) - List of homes associated with the user. - **home_id** (string) - Unique identifier for the home. - **name** (string) - Name of the home. - **rooms** (array) - List of rooms within the home. - **room_id** (string) - Unique identifier for the room. - **name** (string) - Name of the room. - **devices** (array) - List of devices within the room. - **device_id** (string) - Unique identifier for the device. - **product_name** (string) - Name of the product. - **type** (string) - Type of the device. #### Response Example { "homes": [ { "home_id": "some_home_id", "name": "My Home", "rooms": [ { "room_id": "some_room_id", "name": "Living Room", "devices": [ { "device_id": "some_device_id", "product_name": "Netatmo Thermo Hub", "type": "NTG" } ] } ] } ] } ``` -------------------------------- ### GET /homesdata Source: https://dev.netatmo.com/apidocumentation/security Retrieve a list of the user's homes and their associated topology, including devices and rooms. ```APIDOC ## GET /homesdata ### Description Retrieve user's homes and topology. ### Method GET ### Endpoint /homesdata ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token obtained through OAuth2 authentication. ### Response #### Success Response (200) - **body** (object) - Contains a list of homes, each with its ID, name, and topology information. #### Response Example ```json { "homes": [ { "id": "599ab5152d3e049f0f8b53fa", "name": "Martin office", "rooms": [ { "id": "605301a43d3e049f0f8b53fb", "name": "Living Room" } ], "devices": [ { "id": "70:ee:50:71:13:ee", "name": "Living Room Camera", "room_id": "605301a43d3e049f0f8b53fb", "type": "NACamera" } ] } ] } ``` ``` -------------------------------- ### GET /homestatus Source: https://dev.netatmo.com/apidocumentation/control Retrieves the current status of a device, including configured power and instant power consumption. ```APIDOC ## GET /homestatus ### Description Retrieves the configured power delivered by a device and the instant power consumption for NLLF devices. ### Method GET ### Endpoint /homestatus ### Response #### Success Response (200) - **configured_power** (number) - The power configured for the device mode. - **instant_power** (number) - The current power consumption in Watts. #### Response Example { "configured_power": 60, "instant_power": 60 } ``` -------------------------------- ### Get Scenarios Source: https://dev.netatmo.com/apidocumentation/control Retrieves the list of available default scenarios (Home, Away, Wake Up, Bedtime). ```APIDOC ## GET /getscenarios ### Description Retrieves the list of predefined scenarios available for manual triggering. ### Method GET ### Endpoint /getscenarios ### Parameters None ### Response #### Success Response (200) - **scenarios** (array) - List of scenario objects. - **id** (string) - Scenario ID. - **name** (string) - Scenario name (e.g., "Home", "Away"). #### Response Example ```json { "scenarios": [ { "id": "home", "name": "Home" }, { "id": "away", "name": "Away" } ] } ``` ``` -------------------------------- ### GET /homestatus Source: https://dev.netatmo.com/apidocumentation/control Retrieves the current configuration and status of heating/cooling devices, including open window mode, setpoint temperatures, and active schedules. ```APIDOC ## GET /homestatus ### Description Retrieves the current configuration, status, and operational modes for heating and cooling devices. ### Method GET ### Endpoint /homestatus ### Parameters #### Query Parameters - **home_id** (string) - Required - The unique identifier of the home. ### Request Example GET /homestatus?home_id=12345 ### Response #### Success Response (200) - **status** (object) - The current state of the heating/cooling system. #### Response Example { "status": "schedule", "setpoint_temperature": 21.0, "open_window_mode": false } ``` -------------------------------- ### GET /getroommeasure Source: https://dev.netatmo.com/apidocumentation/energy Retrieves historical temperature data for a specific room. ```APIDOC ## GET /getroommeasure ### Description Retrieves historical temperature data for a room, including historic temperatures, minimum and maximum temperatures, and the dates of these extreme temperatures. ### Method GET ### Endpoint /getroommeasure ### Parameters #### Query Parameters - **room_id** (string) - Required - The ID of the room to get historical data for. - **scale** (string) - Required - The scale of the historical data (e.g., "1" for 1 hour, "3" for 3 hours, "24" for 1 day, "12N" for 12 days, "36N" for 36 days). - **type** (string) - Required - The type of measurement to retrieve (e.g., "temperature", "min_temp", "max_temp"). ### Request Example ``` GET /getroommeasure?room_id=1234567890abcdef12345678&scale=24&type=temperature ``` ### Response #### Success Response (200) - **measures** (array) - An array of historical measurements. - **timestamp** (number) - The timestamp of the measurement. - **value** (number) - The measured value. #### Response Example ```json { "measures": [ { "timestamp": 1678886400, "value": 20.5 }, { "timestamp": 1678890000, "value": 21.0 } ] } ``` ``` -------------------------------- ### GET /homestatus Source: https://dev.netatmo.com/apidocumentation/security Retrieves the current status, configuration, and diagnostic information for security devices. ```APIDOC ## GET /homestatus ### Description Retrieves the current status, configuration, and diagnostic data for various security devices, including software versions, connectivity status, and sensor states. ### Method GET ### Endpoint /homestatus ### Response #### Success Response (200) - **status** (object) - The current state and diagnostic information of the requested device. #### Response Example { "software_version": "1.2.3", "wifi_status": "strong", "monitoring_status": "on" } ``` -------------------------------- ### GET /gethomedata Source: https://dev.netatmo.com/apidocumentation/security Retrieve detailed information about a user's homes and their topology. ```APIDOC ## GET /gethomedata ### Description Retrieve user's homes and their topology. ### Method GET ### Endpoint /gethomedata ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token obtained through OAuth2 authentication. ### Response #### Success Response (200) - **body** (object) - Contains detailed information about the user's homes and their topology. #### Response Example ```json { "homes": [ { "id": "599ab5152d3e049f0f8b53fa", "name": "Martin office", "rooms": [ { "id": "605301a43d3e049f0f8b53fb", "name": "Living Room" } ], "devices": [ { "id": "70:ee:50:71:13:ee", "name": "Living Room Camera", "room_id": "605301a43d3e049f0f8b53fb", "type": "NACamera" } ] } ] } ``` ``` -------------------------------- ### Get Measurements Source: https://dev.netatmo.com/apidocumentation/control Retrieves energy consumption measurements for devices, lines, or the entire home in kWh or currency. ```APIDOC ## GET /getmeasure ### Description Retrieves energy consumption measurements for devices, lines, or the home. Measurements can be in kWh or a specified currency. ### Method GET ### Endpoint /getmeasure ### Parameters #### Query Parameters - **device_ids** (string) - Optional - Comma-separated list of device IDs. - **scale** (string) - Required - The time scale for the measurements (e.g., "hour", "day", "week", "month"). - **type** (string) - Required - The type of measurement to retrieve (e.g., "energy", "energy_per_device", "energy_per_line"). - **date_begin** (string) - Optional - Start date for the measurement period (YYYY-MM-DD). - **date_end** (string) - Optional - End date for the measurement period (YYYY-MM-DD). - **limit** (integer) - Optional - Maximum number of measurements to return. - **offset** (integer) - Optional - Offset for pagination. ### Response #### Success Response (200) - **measurements** (array) - List of measurement objects. - **device_id** (string) - Device ID (if applicable). - **value** (number) - The measured value (in kWh or currency). - **time** (integer) - Timestamp of the measurement. #### Response Example ```json { "measurements": [ { "device_id": "1234567890abcdef12345678", "value": 15.5, "time": 1678886400 } ] } ``` ``` -------------------------------- ### GET /homesdata Source: https://dev.netatmo.com/apidocumentation/weather Retrieves the type of station (owned, friend, or favorite) for Weather devices. ```APIDOC ## GET /homesdata ### Description Retrieves the type of station, indicating whether it is an owned station, a friend station, or a favorite station. ### Method GET ### Endpoint /homesdata ### Parameters #### Query Parameters - **home_id** (string) - Required - The ID of the home to retrieve station type for. ### Response #### Success Response (200) - **body** (object) - Contains station type information. - **type** (string) - The type of the station (e.g., "owned", "friend", "favorite"). #### Response Example ```json { "type": "owned" } ``` ``` -------------------------------- ### GET /command/ping Source: https://dev.netatmo.com/apidocumentation/security Pings the camera via the VPN URL to determine the local network status and retrieve the local streaming URL. ```APIDOC ## GET /command/ping ### Description This endpoint is used to verify if the application and the camera are on the same local network. It returns the local URL of the camera if reachable. ### Method GET ### Endpoint {vpn_url}/command/ping ### Parameters #### Path Parameters - **vpn_url** (string) - Required - The base VPN URL retrieved from the /homestatus request. ### Response #### Success Response (200) - **local_url** (string) - The local network address of the camera. - **product_name** (string) - The name of the camera device. #### Response Example { "local_url": "http://192.168.128.232/52ced8bccxxxxxx", "product_name": "Smart Indoor Camera" } ``` -------------------------------- ### Get Events Until Specified (geteventsuntil) Source: https://dev.netatmo.com/apidocumentation/security This method returns all events up to a specified event in the request. It is available for Welcome, Presence, and Smart Smoke Alarm products and uses the /geteventsuntil endpoint. ```HTTP GET /geteventsuntil?event_id=SPECIFIED_EVENT_ID ``` -------------------------------- ### Get Home Status Source: https://dev.netatmo.com/apidocumentation/control Retrieves the current status and instant power delivered by various power devices. ```APIDOC ## GET /homestatus ### Description Retrieves the current status of power outlets and the instant power delivered by devices. ### Method GET ### Endpoint /homestatus ### Parameters #### Query Parameters - **device_ids** (string) - Optional - Comma-separated list of device IDs to filter the results. ### Response #### Success Response (200) - **status** (object) - Contains the status of various devices. - **devices** (array) - List of device status objects. - **id** (string) - Device ID. - **type** (string) - Device type. - **measured** (object) - Instantaneous measurements. - **power** (number) - Instant power in Watts. - **state** (string) - Power outlet status (on/off). #### Response Example ```json { "status": { "devices": [ { "id": "1234567890abcdef12345678", "type": "NLP", "measured": { "power": 1500 }, "state": "on" } ] } } ``` ``` -------------------------------- ### Get Next Events (getnextevents) Source: https://dev.netatmo.com/apidocumentation/security This endpoint returns previous events. It is available for Welcome, Presence, and Smart Smoke Alarm products and uses the /getnextevents endpoint. ```HTTP GET /getnextevents ``` -------------------------------- ### Get Configuration Data Source: https://dev.netatmo.com/apidocumentation/energy Retrieve various configuration and status details for Netatmo Energy devices, including software version, heating modes, schedules, and diagnostic information. ```APIDOC ## GET /homestatus ### Description Retrieves current configuration and status for Netatmo Energy devices, including software version, valve boost mode, open window mode, room heating mode, heating schedules, manual heating duration, and setpoint temperature. ### Method GET ### Endpoint /homestatus ### Parameters #### Query Parameters - **device_id** (string) - Required - The ID of the device to query. - **module_id** (string) - Optional - The ID of the module associated with the device. ### Response #### Success Response (200) - **body** (object) - Contains various configuration and status fields relevant to the device type. #### Response Example ```json { "status": "ok", "body": { "devices": [ { "device_id": "1234567890abcdef12345678", "module_id": "1234567890abcdef12345679", "therm_mode": "manual", "target_temp": 20.5, "room_temperature": 21.0, "schedule": [ { "wday": 0, "setpoint": 19.0, "time": 0 } ] } ] } } ``` ``` ```APIDOC ## GET /homesdata ### Description Retrieves historical data and setup information for Netatmo Energy devices, primarily used for diagnostics like last setup date. ### Method GET ### Endpoint /homesdata ### Parameters #### Query Parameters - **home_id** (string) - Required - The ID of the home associated with the devices. ### Response #### Success Response (200) - **body** (object) - Contains historical data and setup information for the home's devices. #### Response Example ```json { "status": "ok", "body": { "homes": [ { "home_id": "abcdef1234567890abcdef12345678", "devices": [ { "device_id": "1234567890abcdef12345678", "setup_date": 1678886400 } ] } ] } } ``` ``` -------------------------------- ### Retrieve Homes and Topology (homesdata) Source: https://dev.netatmo.com/apidocumentation/security This endpoint retrieves information about a user's homes and their associated topology. It is a GET request to the /homesdata endpoint. ```HTTP GET /homesdata ``` -------------------------------- ### Get Last Event (getlasteventof) Source: https://dev.netatmo.com/apidocumentation/security This endpoint returns the most recent event. This method is only available for the Welcome product and uses the /getlasteventof endpoint. ```HTTP GET /getlasteventof ``` -------------------------------- ### Authentication Token Response Structure Source: https://dev.netatmo.com/apidocumentation/security Example of the JSON response received after successful authentication, containing both standard access tokens and restricted tokens used for camera operations. ```json { "scope": [ "read_camera", "write_camera", "access_camera", "read_presence", "write_presence", "access_presence", "read_camerapro", "write_camerapro", "access_camerapro" ], "access_token": "61929906e0f96809c04ecb4a|4cf61db77df1c319b9796f3cca817c87", "expires_in": 10800, "expire_in": 10800, "refresh_token": "61929906e0f96809c04ecb4a|c820e6d1501c32ea55be6cb80a04929d", "restricted_access_token": "61929906e0f96809c04ecb4a|64c99fe55fb051b5f3d8c7b8763c50b3", "restricted_refresh_token": "61929906e0f96809c04ecb4a|62ea5ad5ee38dcb8e6a5be30ec894570" } ``` -------------------------------- ### Camera Network Connectivity and Stream Access Source: https://dev.netatmo.com/apidocumentation/security Examples of API calls for checking local network connectivity via ping and accessing live HLS video streams or snapshots. ```http https://prodvpn-eu-2.netatmo.net/10.255.0.1/d257xxxxxxxxxxxx/MTU4Nr-aMZILLg,,/command/ping ``` ```http http://192.168.128.232/52ced8bcc8149xxxxxxxxxx/command/ping ``` ```http https://prodvpn-eu-2.netatmo.net/10.255.0.1/d257xxxxxxxxxxxxx/MTU4NDDr-aMZIkmaaLLg,,/live/index.m3u8 ``` ```http https://prodvpn-eu-2.netatmo.net/10.255.0.1/d257xxxxxxxxxxxxx/MTU4NDDr-aMZIkmaaLLg,,/live/snapshot_720.jpg ``` -------------------------------- ### Retrieve Home Data and Topology (gethomedata) Source: https://dev.netatmo.com/apidocumentation/security This endpoint retrieves user's homes and their topology. It is a GET request to the /gethomedata endpoint. ```HTTP GET /gethomedata ``` -------------------------------- ### POST /webrtc/offer Source: https://dev.netatmo.com/apidocumentation/security Initiates a WebRTC offer for establishing a real-time communication stream. ```APIDOC ## POST /webrtc/offer ### Description This route is used to initiate a WebRTC offer. ### Method POST ### Endpoint /webrtc/offer ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token obtained through OAuth2 authentication. - **home_id** (string) - Required - The ID of the home. - **device_id** (string) - Required - The ID of the device for which to initiate the WebRTC offer. #### Request Body - **json** (object) - Required - Contains the WebRTC offer details. - **sdp** (string) - Required - The Session Description Protocol offer. - **type** (string) - Required - The type of the offer, typically "offer". ### Request Example ```json { "home_id": "599ab5152d3e049f0f8b53fa", "device_id": "70:ee:50:71:13:ee", "sdp": "v=0...", "type": "offer" } ``` ### Response #### Success Response (200) - **body** (object) - Contains the WebRTC answer. #### Response Example ```json { "sdp": "v=0...", "type": "answer" } ``` ``` -------------------------------- ### GET /getstationsdata Source: https://dev.netatmo.com/apidocumentation/weather Diagnoses the status of Weather devices, including radio status, Wi-Fi status, battery level, setup date, and module reachability. ```APIDOC ## GET /getstationsdata ### Description Diagnoses the status of Weather devices. This endpoint can retrieve information such as radio status, Wi-Fi status, battery level, setup date, and module reachability. ### Method GET ### Endpoint /getstationsdata ### Parameters #### Query Parameters - **device_id** (string) - Required - The ID of the device to retrieve status for. ### Response #### Success Response (200) - **body** (object) - Contains device status information. - **radio_status** (string) - The radio status of the module (e.g., "Good", "Average", "Bad"). - **wifi_status** (integer) - The Wi-Fi signal strength (0-100). - **battery_level** (string) - The battery level of the module (e.g., "Full", "High", "Medium", "Low", "Very Low"). - **setup_date** (string) - The date the device was set up (ISO 8601 format). - **reachable** (boolean) - Indicates if the module is reachable. #### Response Example ```json { "radio_status": "Good", "wifi_status": 71, "battery_level": "Full", "setup_date": "2023-01-15T10:00:00Z", "reachable": true } ``` ``` -------------------------------- ### Initiate WebRTC Offer (webrtc/offer) Source: https://dev.netatmo.com/apidocumentation/security This route is used to initiate a WebRTC offer for real-time communication. It is a POST request to the /webrtc/offer endpoint. ```HTTP POST /webrtc/offer { "sdp": "YOUR_SDP_OFFER" } ``` -------------------------------- ### GET /getmeasure Source: https://dev.netatmo.com/apidocumentation/control Retrieve global historical data. ```APIDOC ## GET /getmeasure ### Description Retrieve global historical data. ### Method GET ### Endpoint /getmeasure ### Parameters #### Query Parameters - **home_id** (string) - Required - The ID of the home. - **device_id** (string) - Required - The ID of the device. - **type** (string) - Required - The type of measurement (e.g., 'temperature', 'humidity'). - **start_time** (integer) - Required - The start of the time range (Unix timestamp). - **end_time** (integer) - Required - The end of the time range (Unix timestamp). - **scale** (string) - Optional - The scale of the measurements (e.g., '30min', '1hr', '1day'). ### Request Example None ### Response #### Success Response (200) - **measures** (array) - List of historical measurements. - **timestamp** (integer) - Unix timestamp of the measurement. - **value** (number) - The measured value. #### Response Example { "measures": [ { "timestamp": 1678886400, "value": 21.0 }, { "timestamp": 1678890000, "value": 21.5 } ] } ``` -------------------------------- ### Create New Home Schedule Source: https://dev.netatmo.com/apidocumentation/control Create a new event schedule for home devices. ```APIDOC ## POST /createnewhomeschedule ### Description Creates a new event schedule for roller shutter devices. ### Method POST ### Endpoint /createnewhomeschedule ### Parameters #### Path Parameters - **device_id** (string) - Required - The ID of the device for which to create the schedule. #### Request Body - **schedule** (object) - Required - The details of the new schedule. - **name** (string) - Required - The name of the schedule. - **zones** (array) - Required - A list of time zones and actions. ### Request Example ```json { "schedule": { "name": "Morning Routine", "zones": [ { "begin": "07:00", "end": "07:30", "action": 100 } ] } } ``` ### Response #### Success Response (200) - **body** (object) - Confirmation of the schedule creation. - **status** (string) - Indicates the success of the operation (e.g., "ok"). #### Response Example ```json { "status": "ok" } ``` ``` -------------------------------- ### GET /getcamerapicture Source: https://dev.netatmo.com/apidocumentation/security Returns the snapshot associated with an event. ```APIDOC ## GET /getcamerapicture ### Description Returns the snapshot associated to an event. ### Method GET ### Endpoint /getcamerapicture ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token obtained through OAuth2 authentication. - **home_id** (string) - Required - The ID of the home. - **event_id** (string) - Required - The ID of the event for which to retrieve the snapshot. ### Response #### Success Response (200) - **body** (image) - The snapshot image in JPEG format. #### Response Example (Returns a binary image stream) ``` -------------------------------- ### POST /createnewhomeschedule Source: https://dev.netatmo.com/apidocumentation/control Creates a new weekly schedule for a thermostat. ```APIDOC ## POST /createnewhomeschedule ### Description Creates a weekly schedule. ### Method POST ### Endpoint /createnewhomeschedule ### Parameters #### Request Body - **home_id** (string) - Required - The ID of the home. - **schedule** (object) - Required - The weekly schedule definition. - **monday** (object) - Schedule for Monday. - **tuesday** (object) - Schedule for Tuesday. - ... (up to Sunday) ### Request Example { "home_id": "some_home_id", "schedule": { "monday": { "1": {"on": true, "setpoint": 20.0}, "2": {"on": true, "setpoint": 22.0} }, "tuesday": { "1": {"on": true, "setpoint": 20.0}, "2": {"on": true, "setpoint": 22.0} } } } ### Response #### Success Response (200) - **success** (boolean) - Indicates if the schedule creation was successful. #### Response Example { "success": true } ``` -------------------------------- ### POST /createnewhomeschedule Source: https://dev.netatmo.com/apidocumentation/general Creates a new heating schedule for a specific home by providing temperature thresholds and zone configurations. ```APIDOC ## POST /createnewhomeschedule ### Description Creates a new heating schedule for a specified home. Requires home ID, schedule name, away temperature, and frost guard temperature. ### Method POST ### Endpoint /createnewhomeschedule ### Parameters #### Request Body - **home_id** (string) - Required - The unique identifier of the home. - **name** (string) - Required - The name of the schedule. - **away_temp** (integer) - Required - The temperature set when the home is in 'away' mode. - **hg_temp** (integer) - Required - The frost guard temperature setting. - **timetable** (array) - Required - The weekly timetable configuration. - **zones** (array) - Required - The heating zones configuration. ### Request Example { "home_id": "4040b5a2aa0bf10bea4837be", "name": "My Home heating schedule", "away_temp": 15, "hg_temp": 10, "timetable": [], "zones": [] } ### Response #### Success Response (200) - **status** (string) - Confirmation of schedule creation. ``` -------------------------------- ### Step 1: User Authorization Request Source: https://dev.netatmo.com/apidocumentation/oauth Initiate the OAuth2 flow by redirecting the user to Netatmo's authorization URL. This prompts the user to log in and grant your application access to their data. ```APIDOC ## GET /oauth2/authorize ### Description Redirect the user to the Netatmo OAuth2 dialog to authorize your application. ### Method GET ### Endpoint https://api.netatmo.com/oauth2/authorize ### Query Parameters - **client_id** (string) - Required - Your application's unique client ID. - **redirect_uri** (string) - Optional - The callback URL to redirect the user to after authorization. If omitted, the statically configured callback URL will be used. - **scope** (string) - Required - A space-separated list of permissions your application requests. - **state** (string) - Required - An arbitrary, unique string to maintain state and prevent CSRF attacks. - **response_type** (string) - Optional - Defaults to 'code'. Specifies the type of grant. ### Request Example ``` https://api.netatmo.com/oauth2/authorize?client_id=[YOUR_APP_ID]&redirect_uri=[YOUR_REDIRECT_URI]&scope=[SCOPE_SPACE_SEPARATED]&state=[SOME_ARBITRARY_BUT_UNIQUE_STRING] ``` ### Response Upon successful authorization, the user is redirected to your `redirect_uri` with a `code` and `state` parameter. If authorization is denied, an `error=access_denied` parameter is returned. ``` -------------------------------- ### GET /getevents Source: https://dev.netatmo.com/apidocumentation/security Returns all events until the one specified in the request. ```APIDOC ## GET /getevents ### Description Returns all the events until the one specified in the request. ### Method GET ### Endpoint /getevents ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token obtained through OAuth2 authentication. - **home_id** (string) - Required - The ID of the home. - **event_id** (string) - Required - The ID of the event until which to retrieve events. - **(Optional)filter** (string) - Optional - Filter events by type (e.g., "doorbell", "motion", "co_detected"). ### Response #### Success Response (200) - **body** (object) - Contains a list of events. #### Response Example ```json { "events": [ { "user_id": "59e4a384f5459531b28b50e1", "event_type": "co_detected", "device_id": "70:ee:50:71:13:ee", "home_id": "599ab5152d3e049f0f8b53fa", "home_name": "Martin office", "camera_id": "70:ee:50:71:13:ee", "event_id": "618a54ca021a4776227e8d18", "sub_type": 2, "push_type": "NCO-co_detected" } ] } ``` ``` -------------------------------- ### GET /getmeasure Source: https://dev.netatmo.com/apidocumentation/energy Retrieves historical boiler activity data. ```APIDOC ## GET /getmeasure ### Description Retrieves the historical boiler activity, either as mean activity or cumulated activity. ### Method GET ### Endpoint /getmeasure ### Parameters #### Query Parameters - **device_id** (string) - Required - The ID of the device. - **scale** (string) - Required - The scale of the historical data (e.g., "1" for 1 hour, "3" for 3 hours, "24" for 1 day, "12N" for 12 days, "36N" for 36 days). - **type** (string) - Required - The type of measurement to retrieve (e.g., "boiler_activity_mean", "boiler_activity_cumul"). ### Request Example ``` GET /getmeasure?device_id=1234567890abcdef12345678&scale=24&type=boiler_activity_cumul ``` ### Response #### Success Response (200) - **measures** (array) - An array of historical measurements. - **timestamp** (number) - The timestamp of the measurement. - **value** (number) - The measured value. #### Response Example ```json { "measures": [ { "timestamp": 1678886400, "value": 15.5 }, { "timestamp": 1678890000, "value": 20.0 } ] } ``` ``` -------------------------------- ### Define Room Configuration Source: https://dev.netatmo.com/apidocumentation/general This snippet shows how rooms are structured within a home, mapping specific device IDs to room identifiers to manage heating or cooling at the room level. ```JSON { "rooms": [ { "id": "1534574457", "name": "Living Room", "type": "livingroom", "module_ids": ["70:ee:52:26:4a:77"] }, { "id": "663608571", "name": "Kitchen", "type": "kitchen", "module_ids": ["70:ee:51:a1:ec:f2"] } ] } ``` -------------------------------- ### GET /getlasteventof Source: https://dev.netatmo.com/apidocumentation/security Returns the most recent event. This method is only available for Welcome devices. ```APIDOC ## GET /getlasteventof ### Description Returns most recent events. This method is only available for Welcome. ### Method GET ### Endpoint /getlasteventof ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token obtained through OAuth2 authentication. - **home_id** (string) - Required - The ID of the home. - **device_id** (string) - Required - The ID of the Welcome device. ### Response #### Success Response (200) - **body** (object) - Contains the last event details. #### Response Example ```json { "event": { "user_id": "59e4a384f5459531b28b50e1", "event_type": "motion", "device_id": "70:ee:50:71:13:ee", "home_id": "599ab5152d3e049f0f8b53fa", "home_name": "Martin office", "camera_id": "70:ee:50:71:13:ee", "event_id": "618a54ca021a4776227e8d18", "sub_type": 1, "push_type": "NOC-motion" } } ``` ``` -------------------------------- ### GET /getmeasure Source: https://dev.netatmo.com/apidocumentation/control Retrieves the total energy consumption of a device in kWh or currency. ```APIDOC ## GET /getmeasure ### Description Fetches energy consumption metrics for a specific device. ### Method GET ### Endpoint /getmeasure ### Query Parameters - **device_id** (string) - Required - The unique identifier of the device - **type** (string) - Required - 'kwh' or 'currency' ### Response #### Success Response (200) - **value** (number) - The measured energy consumption value #### Response Example { "value": 15.5 } ``` -------------------------------- ### Accessing Live Streams Source: https://dev.netatmo.com/apidocumentation/security Instructions for constructing the live stream URL based on network proximity. ```APIDOC ## Live Stream Access ### Description Construct the live stream URL by appending the appropriate path to the camera's base URL. Use local paths for same-network access and remote paths for external access. ### Method GET ### Endpoint {camera_url}/live/index.m3u8 or {camera_url}/live/index_local.m3u8 ### Parameters #### Path Parameters - **camera_url** (string) - Required - The base VPN URL or local URL of the camera. ### Request Example // Remote access https://prodvpn-eu-2.netatmo.net/.../live/index.m3u8 // Local access http://192.168.128.232/.../live/index_local.m3u8 ### Response #### Success Response (200) - **Stream** (binary) - Returns an HLS stream manifest (.m3u8) or video segments. ``` -------------------------------- ### GET /getevents Source: https://dev.netatmo.com/apidocumentation/security Retrieves event history for a home, gateway, or specific person. ```APIDOC ## GET /getevents ### Description Retrieves the last events recorded for a home, a specific gateway, or a person. Supports pagination and filtering by event type. ### Method GET ### Endpoint /getevents ### Response #### Success Response (200) - **events** (array) - A list of the most recent events. #### Response Example { "events": [{"type": "motion", "timestamp": 1672531200}] } ``` -------------------------------- ### GET /getmeasure Source: https://dev.netatmo.com/apidocumentation/aircare Retrieves the historical sensor data for a specific Aircare device. ```APIDOC ## GET /getmeasure ### Description Retrieve the history of sensor data including temperature, CO2, humidity, pressure, and noise levels. ### Method GET ### Endpoint /getmeasure ### Parameters #### Query Parameters - **device_id** (string) - Required - The ID of the Aircare device. - **scale** (string) - Required - The time scale of the history. - **type** (string) - Required - The type of data to retrieve (e.g., temperature, co2). ### Response #### Success Response (200) - **body** (array) - List of historical data points. #### Response Example { "status": "ok", "body": [ { "beg_time": 1625097600, "value": [[22.1]] } ] } ```