Koenkk / zigbee2mqtt

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

The control of Vimar 02973.B thermostat has some problems #23006

Open amaciuc opened 5 months ago

amaciuc commented 5 months ago

What happened?

Hi,

I recently bought a Vimar 02973.B thermostat and I found that the control of it with Z2M has some problems:

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.37.1

Adapter firmware version

20211210

Adapter

Sonoff Dongle-P

Setup

Intel NUC with HAOS

Debug log

Here is my external converter that I have worked with:

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 e = exposes.presets;
// const ea = exposes.access;

// function roundToOneDecimalPlace(value) {
//   return Math.round(value * 10) / 10;
// }

const definition = {

  zigbeeModel: ['Thermostat_v0.1', 'WheelThermostat_v1.0'],
  model: '02973.B',
  vendor: 'Vimar',
  description: 'Vimar IoT thermostat',
  fromZigbee: [fz.thermostat],
  toZigbee: [
    // {
    //   key: ['occupied_heating_setpoint'],
    //   convertSet: async (entity, key, value, meta) => {
    //     value = roundToOneDecimalPlace(value);
    //     await tz.thermostat_occupied_heating_setpoint.convertSet(entity, key, value, meta);
    //   },
    // },
    // tz.thermostat_running_state,
    tz.thermostat_local_temperature,
    // tz.thermostat_local_temperature_calibration,
    tz.thermostat_occupied_heating_setpoint,
    tz.thermostat_occupied_cooling_setpoint,
    tz.thermostat_system_mode,
  ],
  exposes: [
    e.climate()
      .withLocalTemperature()
      .withSetpoint('occupied_heating_setpoint', 4, 40, 0.5)
      .withSetpoint('occupied_cooling_setpoint', 4, 40, 0.5)
      // .withLocalTemperatureCalibration(-5, 5, 0.1)
      .withSystemMode(['off', 'heat', 'cool']),
      // .withRunningState(['idle', 'heat', 'cool']),
  ],
  configure: async (device, coordinatorEndpoint) => {
      const endpoint = device.getEndpoint(10);
      const binds = ['genBasic', 'genIdentify', 'hvacThermostat'];
      await reporting.bind(endpoint, coordinatorEndpoint, binds);
      await reporting.thermostatTemperature(endpoint);
  },

};

module.exports = definition;
DavideCarboni commented 5 months ago

I have same problems, I noticed that the system_mode "off" commands and the command with the previous system_mode state work, but I can't change from "heat" to "cool" or vice versa