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

add support new device ptvo_counter_2ch #6395

Merged
merged 6 commits into from
Nov 8, 2023
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/devices/custom_devices_diy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,24 @@ const definitions: Definition[] = [
await endpoint.read('genBasic', ['modelId', 'swBuildId', 'powerSource']);
},
},
{
zigbeeModel: ['ptvo_counter_2ch'],
model: 'ptvo_counter_2ch',
vendor: 'Custom devices (DiY)',
description: '[Configurable firmware](https://ptvo.info/zigbee-configurable-firmware-features/)',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also create some instructions on how to create this device?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also create some instructions on how to create this device?

Hi!
All can be found in this article from author :
https://modkam.ru/2021/04/29/schetchik-impulsov-zigbee/

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in Russian and therefore not understandable for a large audience, do you have an English version? If not, I propose to keep this as an ext converter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in Russian and therefore not understandable for a large audience, do you have an English version? If not, I propose to keep this as an ext converter.

https://dzen.ru/a/ZUnKTY3_Dkue45gb

fromZigbee: [fz.ignore_basic_report, fz.battery, fz.ptvo_switch_analog_input, fz.on_off],
toZigbee: [tz.ptvo_switch_trigger, tz.ptvo_switch_analog_input, tz.on_off],
exposes: [e.battery(),
e.enum('l3', ea.STATE_SET, ['set']).withDescription('Counter value. Write zero or positive value to set a counter value. Write a negative value to set a wakeup interval in minutes'),
e.enum('l5', ea.STATE_SET, ['set']).withDescription('Counter value. Write zero or positive value to set a counter value. Write a negative value to set a wakeup interval in minutes'),
e.switch().withEndpoint('l6'),
e.battery_voltage(),
],
meta: {multiEndpoint: true},
endpoint: (device) => {
return {l3: 3, l5: 5, l6: 6};
},
},
];

module.exports = definitions;
Loading