Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Device Support Request] Elko Super TR thermostat #999

Closed
lodegaard opened this issue Aug 18, 2021 · 0 comments
Closed

[Device Support Request] Elko Super TR thermostat #999

lodegaard opened this issue Aug 18, 2021 · 0 comments

Comments

@lodegaard
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I have attempted to create a quirk for the Elko Super TR thermostat based on the work in the DeConz REST plugin, but I think I must be missing something since none of the manufaturer attributes appear in Home Assistant. I also get failure: [{1043: Status.UNSUPPORTED_ATTRIBUTE: 134>}] when I try to read some of the manufaturer paramters from the custom cluster.

Describe the solution you'd like
I'm probably missing something essential here, and any pointers are appreciated.

Device signature - this can be acquired by removing the device from ZHA and pairing it again from the add devices screen. Be sure to add the entire content of the log panel after pairing the device to a code block below this line.
<SimpleDescriptor endpoint=1 profile=260 device_type=769 device_version=0 input_clusters=[0, 3, 4, 5, 513] output_clusters=[3, 25]>

Additional context
Below is the draft for the quirk for the thermostat:
`
"""Module to handle quirks of the Elko Smart Super thermostat.

"""

import zigpy.types as t
import zigpy.profiles.zha as zha_p

from zigpy.quirks import CustomCluster, CustomDevice
from zigpy.zcl.clusters.hvac import Thermostat
from zigpy.zcl.clusters.general import (
Basic,
Identify,
Groups,
Scenes,
Ota,
)

from zhaquirks.const import (
DEVICE_TYPE,
ENDPOINTS,
INPUT_CLUSTERS,
MODELS_INFO,
OUTPUT_CLUSTERS,
PROFILE_ID
)
from zhaquirks.elko import ELKO

DISPLAY_TEXT = 0x0402
ACTIVE_SENSOR = 0x0403
REGULATOR_MODE = 0x0405
DEVICE_ON = 0x0406
POWER_CONSUMPTION = 0x0408
FLOOR_SENSOR_TEMPERATURE = 0x0409
NIGHT_LOWERING = 0x0411
CHILD_LOCK = 0x0413
HEATING_ACTIVE = 0X0415

class ElkoThermostatCluster(CustomCluster, Thermostat):
"""Elko custom thermostat cluster."""

class Sensor(t.enum8):
    """Working modes of the thermostat."""

    Air = 0x00
    Floor = 0x01
    Protection = 0x03

manufacturer_attributes = {
    DISPLAY_TEXT: ("display_text", t.CharacterString),
    ACTIVE_SENSOR: ("active_sensor", Sensor),
    REGULATOR_MODE: ("regulator_mode", t.Bool),
    DEVICE_ON: ("device_on", t.Bool),
    POWER_CONSUMPTION: ("power_consumtion", t.uint16_t),
    FLOOR_SENSOR_TEMPERATURE: ("floor_sensor_temperature", t.int16s),
    NIGHT_LOWERING: ("night_lowering", t.Bool),
    CHILD_LOCK: ("child_lock", t.Bool),
    HEATING_ACTIVE: ("heating_active", t.Bool),
}

class ElkoThermostat(CustomDevice):
"""Elko thermostat custom device"""

signature = {
    MODELS_INFO: [(ELKO, "Super TR")],
    ENDPOINTS: {
        1: {
            PROFILE_ID: zha_p.PROFILE_ID,
            DEVICE_TYPE: zha_p.DeviceType.THERMOSTAT,
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Identify.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                Thermostat.cluster_id,
            ],
            OUTPUT_CLUSTERS: [
                Identify.cluster_id,
                Ota.cluster_id,
            ]
        }
    },
}

replacement = {
    ENDPOINTS: {
        1: {
            INPUT_CLUSTERS: [
                Basic.cluster_id,
                Identify.cluster_id,
                Groups.cluster_id,
                Scenes.cluster_id,
                ElkoThermostatCluster,
            ],
            OUTPUT_CLUSTERS: [
                Identify.cluster_id,
                Ota.cluster_id,
            ]
        }
    }
}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant