Created
March 13, 2024 08:28
-
-
Save akomarovsky/bc81027e04e83b85b55b334f7f158966 to your computer and use it in GitHub Desktop.
Nisko Water Heater Controller zigbee2mqtt convertor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const exposes = require('zigbee-herdsman-converters/lib/exposes'); | |
const tuya = require('zigbee-herdsman-converters/lib/tuya'); | |
const e = exposes.presets; | |
const definition = { | |
zigbeeModel: ['TS0601'], | |
model: 'TS0601', | |
vendor: '_TZE204_apiu8k13', | |
description: 'Smart water heater controller', | |
fromZigbee: [tuya.fz.datapoints], | |
toZigbee: [tuya.tz.datapoints], | |
onEvent: tuya.onEventSetTime, // Add this if you are getting no converter for 'commandMcuSyncTime' | |
configure: tuya.configureMagicPacket, | |
exposes: [ | |
e.switch(), | |
e.numeric('countdown', exposes.access.ALL).withDescription('Countdown timer for the water heater').withUnit('minute').withValueMin(0).withValueMax(120), | |
e.current(), | |
e.power(), | |
e.voltage(), | |
], | |
meta: { | |
// All datapoints go in here | |
tuyaDatapoints: [ | |
[1, 'state', tuya.valueConverter.onOff], | |
[7, 'countdown', tuya.valueConverter.countdown], | |
// [20, '???', tuya.valueConverter.raw], | |
[21, 'current', tuya.valueConverter.divideBy1000], | |
[22, 'power', tuya.valueConverter.raw], | |
[23, 'voltage', tuya.valueConverter.raw], | |
// [105, '???', tuya.valueConverter.raw], | |
], | |
}, | |
}; | |
module.exports = definition; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment