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 initial support for Tuya siren #4379

Merged
merged 18 commits into from
Mar 3, 2021

Conversation

Smanar
Copy link
Collaborator

@Smanar Smanar commented Feb 8, 2021

Manufacture name : _TYST11_d0yu2xgi issue #3183
It s a USB or battery siren https://zigbee.blakadder.com/Neo_NAS-AB02B0.html

  • Remove the ZHAtuya sensor
  • Add initial support for the siren.
  • Correct missing state update for tuya sensor, some device can't work on FHEM without that.

This device create 3 sensors, ZHAAlarm + ZHAhumidity + ZHAtemperature.

All settings are on the ZHAAlarm (melody, volume, trigger, ect ...)
The threshold need to be set with Array [min, max], need to improve it.

@Smanar Smanar linked an issue Feb 8, 2021 that may be closed by this pull request
@manup manup added this to the v2.10.0-beta milestone Feb 10, 2021
Copy link
Member

@manup manup left a comment

Choose a reason for hiding this comment

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

I've added a few comments. Can you please have a look, I think this PR needs to wait for a 2.10.1 release in roughly a week.

rest_sensors.cpp Outdated Show resolved Hide resolved
database.cpp Outdated Show resolved Hide resolved
de_web_plugin.cpp Outdated Show resolved Hide resolved
de_web_plugin.cpp Outdated Show resolved Hide resolved
rest_sensors.cpp Outdated Show resolved Hide resolved
rest_sensors.cpp Outdated Show resolved Hide resolved
rest_sensors.cpp Outdated Show resolved Hide resolved
@manup manup modified the milestones: v2.10.0-beta, v2.10.1-beta Feb 15, 2021
Copy link
Member

@manup manup left a comment

Choose a reason for hiding this comment

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

Another round of comments

de_web_plugin.cpp Outdated Show resolved Hide resolved
rest_lights.cpp Outdated Show resolved Hide resolved
rest_lights.cpp Outdated Show resolved Hide resolved
rest_sensors.cpp Outdated Show resolved Hide resolved
rest_sensors.cpp Outdated Show resolved Hide resolved
tuya.cpp Outdated Show resolved Hide resolved
tuya.cpp Outdated Show resolved Hide resolved
tuya.cpp Outdated Show resolved Hide resolved
tuya.cpp Outdated Show resolved Hide resolved
tuya.cpp Outdated Show resolved Hide resolved
Copy link
Member

@manup manup left a comment

Choose a reason for hiding this comment

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

Getting closer :)

de_web_plugin.cpp Outdated Show resolved Hide resolved
tuya.cpp Outdated
}
quint8 valve = static_cast<quint8>(dp & 0xFF);
quint8 temperature = static_cast<quint8>((dp >> 8) & 0xFF);
quint8 minute = static_cast<quint8>((dp >> 16) & 0xFF); // TODO, U16 >> 16 ... this is always 0?!
Copy link
Member

Choose a reason for hiding this comment

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

In that case I wouldn't add it to the PR or at least comment it out with a note what it is and why it isn't used.
In general I'm very against adding dead code since usually it stays there for years with nobody having a clue why it's there and everybody afraid of removing it ;)

tuya.cpp Outdated Show resolved Hide resolved
tuya.cpp Outdated Show resolved Hide resolved
@manup manup merged commit 9092777 into dresden-elektronik:master Mar 3, 2021
@Smanar Smanar deleted the tuya_siren_clean branch April 21, 2021 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tuya Thermostat (HY368 Zigbee Radiator Actuator) ZigBee Siren Alarm Tuya neo
2 participants