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

SBDV-00185 as a Tuya white-label device #8677

Merged
merged 3 commits into from
Jan 27, 2025
Merged

Conversation

thenixan
Copy link
Contributor

No description provided.

@Koenkk Koenkk merged commit 7201875 into Koenkk:master Jan 27, 2025
2 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Jan 27, 2025

Thanks!

Could you also submit a picture for the docs? This can be done by:

  1. Create a fork by clicking here
  2. Go to the public/images/devices directory, Add file -> Upload files
  3. Upload the files and press Commit changes
  4. Press Contribute -> Open pull request -> update title/description -> Create pull request

Make sure that:

  • The filename is SBDV-00185.png
  • The size is 512x512
  • The background is transparent (use e.g. Adobe remove background)

@faplug
Copy link

faplug commented Feb 7, 2025

The battery percentage is not processed correctly and there is no brightness control.
I am attaching the output of the properties tab and my converter.
I still couldn't figure out how to use the batteries. I deleted the timer schedule on purpose - I don't need it.
I wrote through Google Translate

{
    "battery": 100,
    "battery_percentage": 96,
    "child_lock": "LOCK",
    "current_heating_setpoint": 22,
    "display_brightness": "high",
    "last_seen": "2025-02-07T16:12:20.316Z",
    "linkquality": 228,
    "local_temperature": 24.1,
    "local_temperature_calibration": -3.2,
    "max_temperature": 30,
    "min_temperature": 5,
    "mode": "eco",
    "position": 0,
    "preset": "manual",
    "running_state": "idle",
    "screen_orientation": "up",
    "switch_type": "ON",
    "system_mode": "auto",
    "update": {
        "installed_version": 73,
        "latest_version": 73,
        "state": "idle"
    },
    "window": "CLOSE",
    "window_detection": "ON",
    "working_status": 240
}
const legacy = require('zigbee-herdsman-converters/lib/legacy');
const fz = {...require('zigbee-herdsman-converters/converters/fromZigbee'), legacy: require('zigbee-herdsman-converters/lib/legacy').fromZigbee};
const tz = {...require('zigbee-herdsman-converters/converters/toZigbee'), legacy: require('zigbee-herdsman-converters/lib/legacy').toZigbee};
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const ota = require('zigbee-herdsman-converters/lib/ota');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['TS0601'],
    fingerprint: [
        {modelID: 'TS0601', manufacturerName: '_TZE204_cvcu2p6e'}, //Thaleos Connect
    ],
    model: 'SBDV-00185',
    vendor: 'Sber',
    description: 'Sber Smart Thermostat',
    fromZigbee: [fz.cover_position_tilt, tuya.fz.datapoints],
    toZigbee: [tz.cover_position_tilt, tz.cover_state, tuya.tz.datapoints],
    onEvent: tuya.onEventSetTime,
        configure: tuya.configureMagicPacket,
        ota: ota.zigbeeOTA,
        exposes: [
            e.battery('battery_percentage'),
            e.child_lock(),
            e.max_temperature(),
            e.min_temperature(),
            e.position(),
            e.window_detection(),
            e.binary('window', ea.STATE, 'OPEN', 'CLOSE').withDescription('Window status closed or open '),
            e.binary('alarm_switch', ea.STATE, 'ON', 'OFF').withDescription('Thermostat in error state'),
            e
                .climate()
                .withLocalTemperature(ea.STATE)
                .withSetpoint('current_heating_setpoint', 5, 30, 0.5, ea.STATE_SET)
                .withLocalTemperatureCalibration(-10, 10, 0.1, ea.STATE_SET)
                .withPreset(
                    ['auto', 'manual', 'off', 'on'],
                    'MANUAL MODE ☝ - In this mode, the device executes manual temperature setting. ' +
                        'When the set temperature is lower than the "minimum temperature", the valve is closed (forced closed). ' +
                        'AUTO MODE ⏱ - In this mode, the device executes a preset week programming temperature time and temperature. ' +
                        'ON - In this mode, the thermostat stays open ' +
                        'OFF - In this mode, the thermostat stays closed',
                )
                .withRunningState(['idle', 'heat'], ea.STATE),
            e.enum('display_brightness', ea.STATE_SET, ['high', 'medium', 'low']).withDescription('Display brightness'),
            e.enum('screen_orientation', ea.STATE_SET, ['up',  'down']).withDescription('Screen orientation'),
            e
                .enum('mode', ea.STATE_SET, ['comfort', 'eco'])
                .withDescription(
                    'Hysteresis - comfort > switches off/on exactly at reached ' +
                        'temperature with valve smooth from 0 to 100%, eco > 0.5 degrees above or below, valve either 0 or 100%',
                ),
        ],
        meta: {
            tuyaDatapoints: [
                //[1, 'system_mode', tuya.valueConverter.thermostatSystemModeAndPreset('system_mode')],
                [1, 'preset', tuya.valueConverter.thermostatSystemModeAndPreset('preset')],
                [2, 'current_heating_setpoint', tuya.valueConverter.divideBy10],
                [3, 'local_temperature', tuya.valueConverter.divideBy10],
                [6, 'running_state', tuya.valueConverterBasic.lookup({heat: 1, idle: 0})],
                [7, 'window', tuya.valueConverterBasic.lookup({OPEN: 1, CLOSE: 0})],
                [8, 'window_detection', tuya.valueConverter.onOff],
                //[10, 'battery', tuya.valueConverter.raw],
                [12, 'child_lock', tuya.valueConverter.lockUnlock],
                [13, 'battery_percentage', tuya.valueConverter.raw],
                [14, 'alarm_switch', tuya.valueConverter.onOff],
                [15, 'min_temperature', tuya.valueConverter.divideBy10],
                [16, 'max_temperature', tuya.valueConverter.divideBy10],
                [101, 'local_temperature_calibration', tuya.valueConverter.localTempCalibration1],
                [102, 'frost_protection', tuya.valueConverter.onOff],
                [103, 'factory_reset', tuya.valueConverter.onOff],
                [106, 'sensor', tuya.valueConverterBasic.lookup({internal: tuya.enum(0), external: tuya.enum(1), both: tuya.enum(2)})],
                [107, 'temperature_delta', tuya.valueConverter.divideBy10],                
                [108, 'position', tuya.valueConverter.divideBy10],
                [111, 'display_brightness', tuya.valueConverterBasic.lookup({high: tuya.enum(0), medium: tuya.enum(1), low: tuya.enum(2)})],
                [
                    113,
                    'screen_orientation',
                    tuya.valueConverterBasic.lookup({
                        up: tuya.enum(0),
                        down: tuya.enum(2),
                    }),
                ],
                [114, 'mode', tuya.valueConverterBasic.lookup({comfort: tuya.enum(0), eco: tuya.enum(1)})],
            ],
        },
};

module.exports = definition;

@faplug faplug mentioned this pull request Feb 9, 2025
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

Successfully merging this pull request may close these issues.

3 participants