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
- Create an app at dev.netatmo.com to get your API credentials
- Create a
.envfile:
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 topologyhomestatus(home_id)— current device statusroom_temperatures(home_id)— quick view of all room tempsgetroommeasure(home_id, room_id, ...)— temperature historysetroomthermpoint(home_id, room_id, mode, ...)— set room temperaturesetthermmode(home_id, mode)— set home mode (schedule/away/hg)getmeasure(device_id, ...)— boiler historycreatenewhomeschedule(...)— create weekly schedulesynchomeschedule(...)— modify scheduleswitchhomeschedule(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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e77920b300be01935ba69ebf1799e713bbea6f57b0497da923e6e75ccb79795
|
|
| MD5 |
dd06e4a8e0ea1b714ff5a0479f52b4b3
|
|
| BLAKE2b-256 |
d2cafc6e7e33e25241c1e6bcc98b9529e876a651b3ca8581fe7ef6e3b88791f8
|
File details
Details for the file netatmo_thermostat-0.0.1-py3-none-any.whl.
File metadata
- Download URL: netatmo_thermostat-0.0.1-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a4b24bd21d7b8e305a799c3632bbbd56951c0ebf94b2ba7493bda6a0d4f73ee
|
|
| MD5 |
94c3b2b16d3c8781508d3daaddb3181a
|
|
| BLAKE2b-256 |
ecb586003e0cc2856d90d24f3750d56609191ca0c4b73ad78cb74a35bcebf76e
|