Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.15k stars 1.68k forks source link

Centralite 3156105 #9334

Closed anthr76 closed 2 years ago

anthr76 commented 3 years ago

Information about the device + link

Centralite thermostat sometimes provided from Cable Providers. I've recentley gotten my hands on one. I'm a two day user of zigbee and have no idea where to start.

https://community.smartthings.com/t/centralite-ha-thermostat/3317/16 https://www.amazon.com/Centralite-Thermostat-Xfinity-Comcast-3156105/dp/B00IUN4K3C https://www.manualslib.com/manual/1828381/Centralite-Zigbee-Alliance-Home-3156105.html?page=3#manual

data/database.db entry of the device

       "808 Themostat": {
            "device": {
                "applicationVersion": 2,
                "friendlyName": "808 Themostat",
                "hardwareVersion": 2,
                "ieeeAddr": "0x000d6f0003588aa3",
                "manufacturerID": 49887,
                "manufacturerName": "CentraLite Systems",
                "model": "unknown",
                "networkAddress": 815,
                "powerSource": "Mains (single phase)",
                "type": "EndDevice",
                "zclVersion": 1
            },
            "last_seen": "2021-10-25T21:56:24.625Z",
            "linkquality": 90
        }
    },
    "touchlinkDevices": [],
    "touchlinkScanInProgress": false,
    "touchlinkIdentifyInProgress": false,
    "touchlinkResetInProgress": false,
    "networkGraph": {
        "links": [],
        "nodes": []
    },
    "networkGraphIsLoading": false,
    "groups": [],
    "bridgeState": "online",
    "bridgeConfig": {},
    "bridgeInfo": {
        "commit": "4492212\n",
        "config": {
            "advanced": {
                "adapter_concurrent": null,
                "adapter_delay": null,
                "availability_blacklist": [],
                "availability_blocklist": [],
                "availability_passlist": [],
                "availability_timeout": 0,
                "availability_whitelist": [],
                "cache_state": true,
                "cache_state_persistent": true,
                "cache_state_send_on_startup": true,
                "channel": 11,
                "elapsed": false,
                "ext_pan_id": [
                    221,
                    221,
                    221,
                    221,
                    221,
                    221,
                    221,
                    221
                ],
                "homeassistant_discovery_topic": "homeassistant",
                "homeassistant_legacy_entity_attributes": false,
                "homeassistant_legacy_triggers": true,
                "homeassistant_status_topic": "homeassistant/status",
                "last_seen": "ISO_8601",
                "legacy_api": false,
                "log_directory": "/data/log/%TIMESTAMP%",
                "log_file": "log.txt",
                "log_level": "info",
                "log_output": [
                    "console"
                ],
                "log_rotation": true,
                "log_symlink_current": false,
                "log_syslog": {},
                "pan_id": 6754,
                "report": false,
                "rtscts": false,
                "soft_reset_timeout": 0,
                "timestamp_format": "YYYY-MM-DD HH:mm:ss"
            },
            "ban": [],
            "blocklist": [],
            "device_options": {
                "legacy": false,
                "retain": true
            },
anthr76 commented 3 years ago

I am testing with this configuration.. (ref: https://github.com/Koenkk/zigbee-herdsman-converters/blob/d0f7ff1eef6d40f4fbdff1faf94677468b401d50/devices/centralite.js#L143-L167)

const fz = {...require('zigbee-herdsman-converters/converters/fromZigbee'), legacy: require('zigbee-herdsman-converters/lib/legacy').fromZigbee};
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['3156105'],
    model: '3156105',
    vendor: 'Centralite',
    description: 'HA Thermostat,',
    fromZigbee: [fz.battery, fz.legacy.thermostat_att_report, fz.fan, fz.ignore_time_read],
    toZigbee: [tz.factory_reset, tz.thermostat_local_temperature, tz.thermostat_local_temperature_calibration,
        tz.thermostat_occupied_heating_setpoint, tz.thermostat_occupied_cooling_setpoint,
        tz.thermostat_setpoint_raise_lower, tz.thermostat_remote_sensing,
        tz.thermostat_control_sequence_of_operation, tz.thermostat_system_mode,
        tz.thermostat_relay_status_log, tz.fan_mode, tz.thermostat_running_state],
    exposes: [e.battery(), exposes.climate().withSetpoint('occupied_heating_setpoint', 10, 30, 1).withLocalTemperature()
        .withSystemMode(['off', 'heat', 'cool', 'emergency_heating'])
        .withRunningState(['idle', 'heat', 'cool', 'fan_only']).withFanMode(['auto', 'on'])
        .withSetpoint('occupied_cooling_setpoint', 10, 30, 1).withLocalTemperatureCalibration()],
    meta: {battery: {voltageToPercentage: '3V_1500_2800'}},
    configure: async (device, coordinatorEndpoint, logger) => {
        const endpoint = device.getEndpoint(1);
        await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'hvacThermostat', 'hvacFanCtrl']);
        await reporting.batteryVoltage(endpoint);
        await reporting.thermostatRunningState(endpoint);
        await reporting.thermostatTemperature(endpoint);
        await reporting.fanMode(endpoint);
    },
};

module.exports = definition;

So far things are reporting correctley though power thinks it's being recevied by main power but really it's on battery. Going to do futher testing.

anthr76 commented 3 years ago

https://i.imgur.com/MBmcUdx.png

It appears I cannot set a target temperature in Homeassistant. Battery status is detected but still thinks its using main power

However I am able to set targettemp in z2m

https://i.imgur.com/zmZ1Snt.png

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

bertabus commented 2 years ago

@anthr76 tried your code and with a little editing got the temperature editable in Homeassistant, mostly. It looks like it's only allowing an "auto" mode where you set both the top and bottom extremes, could be a Homeassistant issue, not sure.

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['3156105'],
    model: '3156105',
    vendor: 'Centralite',
    description: 'Centralite (xfinity/comcast) zigbee HVAC Thermostat',
    fromZigbee: [fz.battery, fz.thermostat, fz.fan, fz.ignore_time_read],
    toZigbee: [tz.factory_reset, tz.thermostat_local_temperature, tz.thermostat_local_temperature_calibration,
        tz.thermostat_occupied_heating_setpoint, tz.thermostat_occupied_cooling_setpoint,
        tz.thermostat_setpoint_raise_lower, tz.thermostat_remote_sensing,
        tz.thermostat_control_sequence_of_operation, tz.thermostat_system_mode,
        tz.thermostat_relay_status_log, tz.fan_mode, tz.thermostat_running_state], // ,tz.thermostat_temperature_setpoint_hold],
    exposes: [e.battery(),
        // exposes.binary('temperature_setpoint_hold', ea.ALL, true, false)
        // .withDescription('Prevent changes. `false` = run normally. `true` = prevent from making changes.'), 
        exposes.climate().withSetpoint('occupied_heating_setpoint', 10, 30, 0.1).withLocalTemperature()
        .withSystemMode(['heat', 'cool', 'auto', 'off'])
        .withRunningState(['idle', 'heat', 'cool', 'fan_only']).withFanMode(['auto', 'on'])
        .withSetpoint('occupied_cooling_setpoint', 10, 30, 0.1).withLocalTemperatureCalibration(-30, 30, 0.1)],
    meta: {battery: {voltageToPercentage: '3V_1500_2800'}},
    configure: async (device, coordinatorEndpoint, logger) => {
        const endpoint = device.getEndpoint(1);
        const binds = ['genBasic', 'genIdentify', 'genPowerCfg', 'genTime', 'hvacThermostat', 'hvacFanCtrl', 'hvacUserInterfaceCfg'];
        await reporting.bind(endpoint, coordinatorEndpoint, binds);

        await reporting.thermostatSystemMode(endpoint);
        await reporting.batteryVoltage(endpoint);
        await reporting.thermostatRunningState(endpoint);
        await reporting.thermostatTemperature(endpoint);
        await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
        await reporting.thermostatOccupiedCoolingSetpoint(endpoint);
        await reporting.fanMode(endpoint);
        // await reporting.thermostatTemperatureSetpointHold(endpoint);
    },
};

module.exports = definition;