Comments (3)
Hello again,
Managed to get help from ChatGPT!
Here's the working code:
const {} = require('zigbee-herdsman-converters/lib/modernExtend');
// Add the lines below
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 ota = require('zigbee-herdsman-converters/lib/ota');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['Aidoo Zigbee'],
model: 'Aidoo Zigbee',
vendor: 'Airzone',
description: 'Aidoo Zigbee Controller',
fromZigbee: [fz.thermostat, fz.on_off, fz.fan],
toZigbee: [
tz.thermostat_local_temperature,
tz.thermostat_occupied_heating_setpoint,
tz.thermostat_occupied_cooling_setpoint,
tz.thermostat_system_mode,
tz.on_off,
tz.fan_mode,
],
exposes: [
e.local_temperature(),
e.numeric('occupied_heating_setpoint', ea.ALL).withUnit('°C').withDescription('Occupied heating setpoint'),
e.numeric('occupied_cooling_setpoint', ea.ALL).withUnit('°C').withDescription('Specifies the cooling mode setpoint when the room is occupied.'),
exposes.enum('system_mode', ea.ALL, ['off', 'auto', 'cool', 'heat', 'fan_only', 'dry'])
.withDescription('Specifies the current operating mode of the thermostat.'),
e.switch(),
exposes.enum('fan_mode', ea.ALL, ['off', 'low', 'medium', 'high', 'on', 'auto']).withDescription('Fan mode'),
],
endpoint: (device) => {
return { 'system': 1 };
},
meta: { configureKey: 1 },
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['hvacThermostat', 'hvacFanCtrl', 'genOnOff']);
await reporting.thermostatTemperature(endpoint);
await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
await reporting.onOff(endpoint);
await reporting.fanMode(endpoint);
},
};
module.exports = definition;
from zigbee2mqtt.
Hello,
Changes to make it a climate type device and a few other tweaks:
const {} = require('zigbee-herdsman-converters/lib/modernExtend');
// Add the lines below
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 ota = require('zigbee-herdsman-converters/lib/ota');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['Aidoo Zigbee'],
model: 'Aidoo Zigbee AZAI6ZBEMHI',
vendor: 'Airzone',
description: 'Gateway for two-way control and integration of AirCon Units.AZAI6ZBEMHI for Mitsubishi Heavy',
fromZigbee: [fz.thermostat, fz.on_off, fz.fan],
toZigbee: [
tz.thermostat_local_temperature,
tz.thermostat_occupied_heating_setpoint,
tz.thermostat_occupied_cooling_setpoint,
tz.thermostat_system_mode,
tz.on_off,
tz.fan_mode,
],
exposes: [
e.climate()
.withLocalTemperature()
.withSystemMode(['off', 'auto', 'cool', 'heat', 'fan_only', 'dry'])
.withFanMode(['off', 'low', 'medium', 'high', 'on', 'auto'])
.withSetpoint('occupied_heating_setpoint', 5, 30, 0.5)
.withSetpoint('occupied_cooling_setpoint', 5, 30, 0.5),
e.switch(),
],
endpoint: (device) => {
return { 'system': 1 };
},
meta: { configureKey: 1 },
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['hvacThermostat', 'hvacFanCtrl', 'genOnOff']);
await reporting.thermostatTemperature(endpoint);
await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
await reporting.onOff(endpoint);
await reporting.fanMode(endpoint);
},
};
module.exports = definition;
from zigbee2mqtt.
Lets continue in your PR
from zigbee2mqtt.
Related Issues (20)
- Error while starting zigbee-herdsman / Error Resource temporarily unavailable Cannot lock port HOT 3
- [New device support]: TS0601 _TZE204_kapvnnlk - Help need for fixing converter
- [Feature request]: Power On Behavior for FUT035Z+
- zigbee2mqtt restart every 2 minutes
- Unstable network on EmberZNet
- How can I flash SLZB-06M to cp-uart-hw-v7.4.1.0-slzb-06m-230400.gbl ? HOT 8
- BMCT-RZ does not react to external switches after pairing with Zigbee2MQTT HOT 2
- TS0042 without action HOT 2
- TS110E stopped working (unsupported) HOT 2
- [New device support]: Develco EMI 2 - P1 - EMIZB-151 HOT 1
- [New device support]: Gledopto gl-sd-001p
- Ember not working properly HOT 3
- Invalid WebSocket frame: RSV1 must be clear
- z2m doesn't even try to read my local OTA index file HOT 1
- When selecting checkboxes or typing in fields in device/settings the checkboxes/fields clear themselves HOT 1
- [Wrong device]:
- [Wrong device]:
- [Wrong device]:
- Tuya Motion Sensor - ZG-204ZL - Setting Illuminance interval results in 'Data request failed with error: 'MAC transaction expired' (240)'
- Tuya Connection Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zigbee2mqtt.