Skip to content

Feature Request: Add Thermostat Control Methods #28

@Peterka35

Description

@Peterka35

Description

Currently, JablotronPy v0.7.0 includes get_thermo_devices() method for reading thermostat data, but lacks methods to control thermostats (set temperature, change modes). This feature request asks for adding thermostat control capabilities.

Use Case

Home Assistant integration needs to control Jablotron thermostats (JA-150TP, JA-110TP, etc.) to:

  • Set target temperature
  • Switch between SCHEDULED and MANUAL modes
  • Set comfort/economic temperatures

Current Behavior

Available methods:

bridge.get_thermo_devices(service_id, service_type)  # ✅ Works - reads data
bridge.control_programmable_gate(...)  # ✅ Works - controls PG
bridge.control_section(...)  # ✅ Works - controls alarm sections
# ❌ No method for controlling thermostats

Data Available from API

The get_thermo_devices() already returns complete thermostat information:

{
    'object-device-id': 'THS-517330269',
    'temperature': 22.0,                    # Current temperature
    'last-temperature-time': '2025-10-18T14:03:51+02:00',
    'temperature-set': 22.0,                # Target temperature (writable)
    'mode': 'SCHEDULED',                    # Mode: SCHEDULED or MANUAL (writable)
    'temperature-comfort': 22.0,            # Comfort temperature (writable)
    'temperature-economic': 20.0,           # Economic temperature (writable)
    'next-temperature-change': '2025-10-18T22:00:00+0200',
    'next-temperature-mode': 'ECONOMIC',
    'heating-state': 'HEATING_OFF'          # HEATING or HEATING_OFF
}

Proposed Solution

Add a new method to control thermostats, similar to existing control methods:

def control_thermo_device(
    self,
    service_id: int,
    service_type: str,
    component_id: str,
    temperature: float = None,      # Set target temperature (5-35°C)
    mode: str = None,               # "SCHEDULED" or "MANUAL"
    temperature_comfort: float = None,
    temperature_economic: float = None
) -> bool:
    """
    Control Jablotron thermostat device.

    Args:
        service_id: Service ID
        service_type: Service type (e.g., "JA-100")
        component_id: Thermostat component ID (e.g., "THS-517330269")
        temperature: Target temperature to set
        mode: Operating mode ("SCHEDULED" or "MANUAL")
        temperature_comfort: Comfort temperature setting
        temperature_economic: Economic temperature setting

    Returns:
        True if successful, False otherwise
    """
    # Implementation needed - API endpoint discovery required
    pass

API Endpoint Information Needed

To implement this, we need to know:

  1. What HTTP endpoint does MyJablotron app use to set thermostat temperature?
  2. What is the request payload format?
  3. Does it use the same authentication as other control methods?

The MyJablotron mobile app successfully controls thermostats, so the API endpoint exists - it just needs to be reverse-engineered and added to this library.

Alternative Names

If control_thermo_device doesn't match the API, other possible names:

  • set_thermo_temperature()
  • control_thermostat()
  • set_temperature() (with service/component params)

Impact

This would enable full Home Assistant climate entity support for Jablotron thermostats, allowing users to control heating through HA automations and UI.

Additional Context

Thank you for maintaining this library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions