Skip to main content

A simple Python SDK for the Netatmo Energy API (thermostats).

Project description

netatmo-energy

A simple Python SDK for the Netatmo Energy API (thermostats).

Setup

  1. Create an app at dev.netatmo.com to get your API credentials
  2. Create a .env file:
CLIENT_ID=your_client_id
CLIENT_SECRET=your_client_secret
ACCESS_TOKEN=your_access_token
REFRESH_TOKEN=your_refresh_token

Usage

from netatmo import Thermostat

t = Thermostat()
homes = t.homesdata()
home_id = homes.homes[0].id

# Get current status
t.room_temperatures(home_id)

# Set room to 20°C for 1 hour
t.setroomthermpoint(home_id, room_id, mode='manual', temp=20, endtime=int(time())+3600)

# Get temperature history
t.getroommeasure(home_id, room_id)

Methods

  • homesdata() — get homes and topology
  • homestatus(home_id) — current device status
  • room_temperatures(home_id) — quick view of all room temps
  • getroommeasure(home_id, room_id, ...) — temperature history
  • setroomthermpoint(home_id, room_id, mode, ...) — set room temperature
  • setthermmode(home_id, mode) — set home mode (schedule/away/hg)
  • getmeasure(device_id, ...) — boiler history
  • createnewhomeschedule(...) — create weekly schedule
  • synchomeschedule(...) — modify schedule
  • switchhomeschedule(home_id, schedule_id) — activate schedule

Background

Inspired by Andrej Karpathy's tweet about using Claude Code for home automation. Instead of burning tokens on network scanning, this takes the "boring" approach: read the docs, write a simple SDK.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netatmo_thermostat-0.0.1.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netatmo_thermostat-0.0.1-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file netatmo_thermostat-0.0.1.tar.gz.

File metadata

  • Download URL: netatmo_thermostat-0.0.1.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for netatmo_thermostat-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1e77920b300be01935ba69ebf1799e713bbea6f57b0497da923e6e75ccb79795
MD5 dd06e4a8e0ea1b714ff5a0479f52b4b3
BLAKE2b-256 d2cafc6e7e33e25241c1e6bcc98b9529e876a651b3ca8581fe7ef6e3b88791f8

See more details on using hashes here.

File details

Details for the file netatmo_thermostat-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for netatmo_thermostat-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a4b24bd21d7b8e305a799c3632bbbd56951c0ebf94b2ba7493bda6a0d4f73ee
MD5 94c3b2b16d3c8781508d3daaddb3181a
BLAKE2b-256 ecb586003e0cc2856d90d24f3750d56609191ca0c4b73ad78cb74a35bcebf76e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page