Skip to main content

CLI tool for Netatmo thermostat control using py-netatmo-truetemp

Project description

py-netatmo-truetemp-cli

Official CLI tool for py-netatmo-truetemp - control your Netatmo thermostats from the command line.

PyPI version Python 3.13+ License: MIT

⚠️ Disclaimer

This is an unofficial CLI tool for Netatmo thermostats. It is:

  • Not affiliated with or endorsed by Netatmo
  • Not officially supported - use at your own risk
  • For personal/educational use - production use not recommended
  • Subject to archival - may become unmaintained if I lose access to Netatmo hardware

Use responsibly: This tool controls heating equipment. Test thoroughly before relying on it.

Features

  • Accurate Temperature Control: Uses TrueTemperature calibration system for precise setpoints
  • Room-by-Room Management: Control individual rooms by name or ID
  • Beautiful Terminal Output: Rich formatting with tables and styled panels
  • Secure Configuration: Environment variable-based credential management
  • Cross-Platform: Works on Linux, macOS, and Windows
  • Robust Error Handling: User-friendly error messages with actionable guidance

Installation

pip install py-netatmo-truetemp-cli

Quick Start

1. Set Environment Variables

export NETATMO_USERNAME="your.email@example.com"
export NETATMO_PASSWORD="your-password"
export NETATMO_HOME_ID="your-home-id"  # Optional, auto-detected if omitted

2. List Rooms

netatmo-truetemp list-rooms

3. Set Temperature

# By room name (case-insensitive)
netatmo-truetemp set-truetemperature --room-name "Living Room" --temperature 20.5

# By room ID
netatmo-truetemp set-truetemperature --room-id 1234567890 --temperature 20.5

Commands

list-rooms

Lists all rooms with thermostats in your home.

Options:

  • --home-id TEXT: Home ID (optional, uses default if not provided)

Example:

netatmo-truetemp list-rooms
netatmo-truetemp list-rooms --home-id <home_id>

set-truetemperature

Sets the calibrated temperature for a Netatmo room.

Options:

  • --temperature FLOAT: Temperature value (required)
  • --room-id TEXT: Room ID to set temperature for
  • --room-name TEXT: Room name to set temperature for (alternative to --room-id)
  • --home-id TEXT: Home ID (optional, uses default if not provided)

Examples:

netatmo-truetemp set-truetemperature --room-name "Living Room" --temperature 20.5
netatmo-truetemp set-truetemperature --room-id 1234567890 --temperature 19.0

Common Use Cases

List Available Rooms

netatmo-truetemp list-rooms

Set Room Temperature

# By room name (case-insensitive)
netatmo-truetemp set-truetemperature --room-name "Living Room" --temperature 21.0

# By room ID (for automation scripts)
netatmo-truetemp set-truetemperature --room-id "1234567890abcdef" --temperature 21.0

Automation Example

#!/bin/bash
# Adjust bedroom temperature based on time of day
HOUR=$(date +%H)

if [ $HOUR -ge 22 ]; then
    netatmo-truetemp set-truetemperature --room-name "Bedroom" --temperature 18.0
fi

Configuration

Environment Variables

Variable Required Description
NETATMO_USERNAME Yes Your Netatmo account email
NETATMO_PASSWORD Yes Your Netatmo account password
NETATMO_HOME_ID No Home ID (auto-detected if omitted)

Security

Credential Management:

  • Store credentials in environment variables (never commit to version control)
  • For CI/CD or automation, use your platform's secret management system

Authentication Cache: The underlying library caches authentication tokens at:

  • Linux: ~/.local/share/netatmo-truetemp/
  • macOS: ~/Library/Application Support/netatmo-truetemp/
  • Windows: %LOCALAPPDATA%\netatmo-truetemp\

To report security vulnerabilities, see SECURITY.md.

Development

Setup

git clone https://github.com/py-netatmo-unofficial/py-netatmo-truetemp-cli.git
cd py-netatmo-truetemp-cli
uv venv
uv sync
uv run pre-commit install

Run Tests

uv run pytest

Run Linting

uv run ruff check src/ tests/
uv run ruff format src/ tests/

Run Type Checking

uv run mypy src/

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

MIT License - see LICENSE for details.

Support

Having issues or want to contribute?

Related Projects:

Acknowledgments

Built with py-netatmo-truetemp, Typer, and Rich.

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

py_netatmo_truetemp_cli-1.0.0.tar.gz (69.9 kB view details)

Uploaded Source

Built Distribution

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

py_netatmo_truetemp_cli-1.0.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file py_netatmo_truetemp_cli-1.0.0.tar.gz.

File metadata

  • Download URL: py_netatmo_truetemp_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 69.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for py_netatmo_truetemp_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7021532fb235c96362fe4b3eae55959f3fd89d38e4e94417873ed2cc68c60802
MD5 f96436314251fba05a5032b53c31ebae
BLAKE2b-256 ed426ccec0f17d02819170e3eb8305b1a3d4eb4fcede2923c89f0ac6ea5f231b

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_netatmo_truetemp_cli-1.0.0.tar.gz:

Publisher: publish.yml on py-netatmo-unofficial/py-netatmo-truetemp-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_netatmo_truetemp_cli-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for py_netatmo_truetemp_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 650726668258bffb8954af3bf03ee468d6bef6d99b548f89d09a8c74390efffe
MD5 0431784916009f812c4061386d04a809
BLAKE2b-256 824ce13cbbb2d96572384b7b43814e66be1194f978c2c5b6be64e80152e30097

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_netatmo_truetemp_cli-1.0.0-py3-none-any.whl:

Publisher: publish.yml on py-netatmo-unofficial/py-netatmo-truetemp-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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