Skip to content

Add initial support for Tuya siren - #4379

Merged
manup merged 18 commits into
dresden-elektronik:masterfrom
Smanar:tuya_siren_clean
Mar 3, 2021
Merged

Add initial support for Tuya siren#4379
manup merged 18 commits into
dresden-elektronik:masterfrom
Smanar:tuya_siren_clean

Conversation

@Smanar

@Smanar Smanar commented Feb 8, 2021

Copy link
Copy Markdown
Collaborator

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

@manup manup left a comment

Copy link
Copy Markdown
Member

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.

Comment thread rest_sensors.cpp Outdated
Comment thread database.cpp Outdated
Comment thread de_web_plugin.cpp Outdated
Comment thread de_web_plugin.cpp Outdated
Comment thread rest_sensors.cpp Outdated
Comment thread rest_sensors.cpp Outdated
Comment thread rest_sensors.cpp Outdated
@manup manup modified the milestones: v2.10.0-beta, v2.10.1-beta Feb 15, 2021

@manup manup left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Another round of comments

Comment thread de_web_plugin.cpp Outdated
Comment thread rest_lights.cpp Outdated
Comment thread rest_lights.cpp Outdated
Comment thread rest_sensors.cpp Outdated
Comment thread rest_sensors.cpp Outdated
Comment thread tuya.cpp Outdated
Comment thread tuya.cpp Outdated
Comment thread tuya.cpp Outdated
Comment thread tuya.cpp Outdated
Comment thread tuya.cpp Outdated

@manup manup left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Getting closer :)

Comment thread de_web_plugin.cpp Outdated
Comment thread 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
Copy Markdown
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 ;)

Comment thread tuya.cpp Outdated
Comment thread tuya.cpp Outdated
@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