Solvedzigbee2mqtt Support for "Parkside Smart Watering Timer"

Dear all,
I tried to create support for the Parkside Smart Watering Timer, but failed catastrophically :)

I created a .js file for Tuya like explained in the tutorial - but then Z2M will not start anymore.
I copied the content on the bottom of the message.
If anyone is willing to help, I'd highly appreciate.

Thanks and best regards

Information about the device + link

Parkside Smart Watering Timer
https://www.lidl.de/de/parkside-smarter-bewaesserungscomputer-zigbee-smart-home/p375570

Failure message when starting Z2M

[08:04:41] INFO: Handing over control to Zigbee2mqtt Core ...

zigbee2mqtt@1.19.0 start /app
node index.js
(node:398) UnhandledPromiseRejectionWarning: ReferenceError: tuya is not defined
(Use node --trace-warnings ... to show where the warning was created)
(node:398) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:398) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

PSBZS.js

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 = {
fingerprint: [
{
modelID: 'TS0601',
manufacturerName: '_TZE200_c88teujp'
},
],
model: 'PSBZS A1',
vendor: 'Lidl',
description: 'Smart Watering Timer',
supports: 'thermostat, temperature',
fromZigbee: [
fz.ignore_basic_report, // Add this if you are getting no converter for 'genBasic'
fz.tuya_data_point_dump, // This is a debug converter, it will be described in the next part
],
toZigbee: [
tz.tuya_data_point_test, // Another debug converter
],
onEvent: tuya.setTime, // Add this if you are getting no converter for 'commandSetTimeRequest'
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']);
},
exposes: [
// Here you should put all functionality that your device exposes
],
};

module.exports = definition;

Edit:
Link to Zigbee Alliance
https://zigbeealliance.org/zigbee_products/smarter-water-computer/

53 Answers

✔️Accepted Answer

Seems to be a bit more complex ... I have setup a device via Tuya gateway with some intervals. This intervals still ongoing even Tuya gateway is out of range and device is paired with my testbed based on a CC2531. The GenOn seem to have the same behaviour as the manuall watering Button on the Device... This button activate the valve even for about 60 sec. Unfortunately I didn't get the Tuya datapoint debuging eorking on my test bed... However will continue to work on

Other Answers:

I created a converter file that at least worked to switch the valve on and off:

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: ['TS0601'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
    model: 'HG06875', // Vendor model number, look on the device for a model number
    vendor: 'PARKSIDE', // Vendor of the device (only used for documentation and startup logging)
    description: 'Smart Watering Timer', // Description of the device, copy from vendor site. (only used for documentation and startup logging)
    fromZigbee: [fz.on_off], // We will add this later
    toZigbee: [tz.on_off], // Should be empty, unless device can be controlled (e.g. lights, switches).
    exposes: [e.switch()], // Defines what this device exposes, used for e.g. Home Assistant discovery and in the frontend
	configure: async (device, coordinatorEndpoint, logger) => {
    	const endpoint = device.getEndpoint(1);
    	await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
        await reporting.onOff(endpoint);
    },
};

module.exports = definition;

The valve doesn't seem to report back if it is switched or not and also it switches of autmaticly after about 60 sec. This time intervall can possibly be changed using the lidl gateway but I didn't found any messages that gave me a hint how to do this in z2m. I also tryed to integrate the battery state but this also doesn't seems to be reported.

Now I am able to sniff with a CC2531 between the original LIDL Gateway and the Smart Watering Timer.

Here is a example PCAP file from WireShark, if this is usefull for implementing the device in Zigbee2Mqtt I can provide more capture files for specific actions :)

LIDL-GW-Watering.txt

Related Issues:

30
zigbee2mqtt Instruction - how to migrate from CC2531 to another (better) Zigbee dongle
Hi there Just received my zzh and it works perfectly well ! It took me around 2 hours to update it a...
13
zigbee2mqtt Publish 'set' 'state' to '0x7cb03eaa0a01b20d' failed: 'Error: Data request failed with error: 'MAC channel access failure' (225)'
I had the same issue; just incase someone else gets to this Bug Report What happened This problem re...
13
zigbee2mqtt Not able to run zigbee2mqtt as a service
Just changed /usr/bin/npm start to /usr/local/bin/npm start and it worked Hello ...
8
zigbee2mqtt Flashing with fixed channel, pan_id, network_key
@bizziebis this was the key! Firmware version 20190215 can now be flashed without having to re-pair ...
5
zigbee2mqtt Support for "Lonsonho Tuya ZigBee Wireless Smart Scene Switch 4 Gang" needed
I'm having the same problem By the way Information about the device + link Lonsonho Tuya ZigBee Wire...
5
zigbee2mqtt Support for "Parkside Smart Watering Timer"
Seems to be a bit more complex .. I have setup a device via Tuya gateway with some intervals ...
4
zigbee2mqtt Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
I added this line in config and it worked for me: I can not start zigbee2mqtt Debug info Zigbee2MQTT...
3
zigbee2mqtt Xiaomi MiJia Honeywell smoke detector add support for features
Sensitivy and selftest is supported now Hello it would be nice if we are able to use the following f...
3
zigbee2mqtt aqara cube automations in home assistant
Thanks I thing this did the trick because it works now as before I already postet this in the HA com...