dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.9k stars 500 forks source link

Tuya Zigbee Smart Siren Alarm With temperature and Humidity Sensor #4499

Closed aidbish closed 3 years ago

aidbish commented 3 years ago

Please could i request the following device be supported at your earliest opportunity

https://www.aliexpress.com/item/4000813903996.html

Screenshots

image image

If available add screenshots of other clusters.

Relevant clusters are: Simple Metering, Electrical Measurement, Power Configuration, Thermostat, etc. You can typically spare Identify, Alarms, Device Temperature, On/Off. Please ensure data has been read prior to taking any screenshots. -->

Smanar commented 3 years ago

Already in PR > https://github.com/dresden-elektronik/deconz-rest-plugin/pull/4379

Arf, fck. No your device is a different one, give me 15 mn.

Smanar commented 3 years ago

Done. do you know how to test the code ?


sudo apt install deconz-dev
git clone --branch tuya_siren_clean https://github.com/Smanar/deconz-rest-plugin.git
cd deconz-rest-plugin
qmake && make
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins
aidbish commented 3 years ago

i run deconz in docker, is there a dev tag i can pull? or can i do the above in the console of container directly

Smanar commented 3 years ago

No it s too much complicated on docker, will see on future version.

ikke-zelf commented 3 years ago

Does not recognise the device for me

Smanar commented 3 years ago

@ikke-zelf remember you need 2 inclusion without deleting the device. Wich one deconz version a re you using ? Can you share the manaufacture name to check the device ?

aidbish commented 3 years ago

Hi Smanar

i have tried with the recent beta build 2.10.2 but it doesn't show up in phoscon app. I can see it in vnc network map, but i get the following in the logs image

Mimiix commented 3 years ago

@aidbish That is supposed to happen. Phoscon needs to add support on their own. The RestAPI should expose it.

Smanar commented 3 years ago

You are not using third app ?

aidbish commented 3 years ago

hi smanar, not sure i follow, 3rd app?

Smanar commented 3 years ago

An application that use the deconz API, like home automation/openHAB/Domoticz/FHEM/nodeRed, ect ...

aidbish commented 3 years ago

Sorry, Home assistant

Smanar commented 3 years ago

And nothing is visible on HA ?

Probably same issue than here https://github.com/dresden-elektronik/deconz-rest-plugin/issues/4549 even it s not the same device.

aidbish commented 3 years ago

No nothing in HA

Smanar commented 3 years ago

You don't have linux machine to make test with code modification ?

Smanar commented 3 years ago

Probably solved by https://github.com/dresden-elektronik/deconz-rest-plugin/pull/4617

nukleuz80 commented 3 years ago

Hi all,

i have same Tuya NEO Sirene Device on Deconz 2.10-4 beta - Phoscon doesn´t show the device - pairing is not successfull:

image

What i have to do now?

Thanks

nukleuz80 commented 3 years ago

I´m working with iobroker and the deconz-adapter... I can´t see it over API too.

b2un0 commented 3 years ago

I also can’t pair this device on 2.10.4

Mimiix commented 3 years ago

The hex code indicates it isn't whitelisted in the Rest plugin. Therefore, not added/visible in API.

@Smanar can you confirm?

Smanar commented 3 years ago

Yep. I think your manufacture number is 0x1002 (the previous code work only for 0x0000) ? This PR correct this issue https://github.com/dresden-elektronik/deconz-rest-plugin/pull/4617 but it was included in v2.10.5.

nukleuz80 commented 3 years ago

Which date will come the new beta?

Smanar commented 3 years ago

Honestly the schedule is not perfect ^^. But you have at least 1 beta and 1 stable by month.

kmplngj commented 3 years ago

@Smanar Should this work in 2.11.0-beta? Thx!

Smanar commented 3 years ago

Yep https://github.com/dresden-elektronik/deconz-rest-plugin/releases/tag/v2.11.0-beta

kmplngj commented 3 years ago

Yep https://github.com/dresden-elektronik/deconz-rest-plugin/releases/tag/v2.11.0-beta

Is that correct that I only have binary sensor, humidity and temperature in HA? How to use the alarm in HA?

Screenshot 2021-04-17 at 13 47 23

I tried multiple inclusions without deleting something between.

Many thanks for the help!

Smanar commented 3 years ago

Can you take a look direclty in the api ? http://IP:PORT/api/key/lights

IP and PORT are the same than in phoscon KEY is an apikey https://dresden-elektronik.github.io/deconz-rest-doc/getting_started/

Or logs just at start, to find something about the lights entries....

clipse2004 commented 3 years ago

Hi, so with the new beta the Tuya siren is detected as alarm 75 in Deconz, nothing is detected at all in Phoscon.

I wanted to check the API for you, but the device is not listed there either. If I look in the Deconz-Gui then it looks like this:

Can it be that it is currently not yet possible to control the siren somehow? Do you need anything else so that you can implement this completely? image many thanks for your help!

Smanar commented 3 years ago

You need to use third app to control it, or direclty the API, not supported by phoscon yet.

clipse2004 commented 3 years ago

Homebridge-hue didnt work too :/ Do you know which third Party App works?

Smanar commented 3 years ago

Homebridge-hue need to work https://phoscon.de/en/conbee2#hasystems (perhaps it not support all devices ...) You can try first directly with api to be sure all is working. http://IP:PORT/api/KEY/sensors and http://IP:PORT/api/KEY/lights

IP and PORT are the same than for phoscon KEY is an API key

https://dresden-elektronik.github.io/deconz-rest-doc/getting_started/

Try first to see if you can see the device in the API.

clipse2004 commented 3 years ago

so i looked in the rest api again, now it shows up some sensors for Tuya (look in the attached file) Sensors.txt lol now it only shows a humidity sensor in deconz gui (see on my picture), but under "lights" in the rest api is nothing :/ Tuya

Smanar commented 3 years ago

Ok, so can you try to include it again, and share the logs during the inclusion (with "info" and "info_l2") Remember never delete the previous entries, just re-include it.

Deconz show only the node, so you have only one, phoscon show the sensor entry, so you need to have 1 lights (missing for you) and 3 sensors.

Edit: There is a problem, you can make the try, but some code part have disapear from original code, need to check what happen, but it will not prevent the entry creation.

Heichele commented 3 years ago

Hallo, wann kann man damit rechnen das dieses Gerät Supportet wird?

Mimiix commented 3 years ago

@Heichele Someone needs to test with smanar :) For further posts: please stick to english 😄

clipse2004 commented 3 years ago

I would, however my Deconz is now running over docker. I had huge problems with the beta and my HUE motion sensors. Now I'm back on stable :/ And there the Tuya is recognized as no sensor at all.

Heichele commented 3 years ago

@Mimiix Okay

Smanar commented 3 years ago

Oup, have forget, sorry. Have just made the PR for the removed part https://github.com/dresden-elektronik/deconz-rest-plugin/pull/4844

But it have no impact on the device detection.

Heichele commented 3 years ago

@Smanar can I help with testing?

Smanar commented 3 years ago

Sure, if you are using a recent deconz version, and have a device not reconised, I will be interested by your logs (with "info" and "info_l2") during the inclusion.

Tuya stuff need generaly 2 inclusions, without deleting anything between both.

nukleuz80 commented 3 years ago

FYI: i‘m using latest beta and the ioBroker adapter as third party component. After implementation i get three sensors - Alarm, humidity and temperature but i can‘t trigger them... How to do this?

I read that a light is missing to trigger... but there is nothing.

Thanks

Heichele commented 3 years ago

@Smanar I'm not very good at these things, i need some help executing ... "Info" and "info_I2"?

Smanar commented 3 years ago

@Heichele depend if you have headless or GUI deconz version ?

@nukleuz80 have found the problem, are you able to compile code to make test ?

You have the procedure here https://github.com/dresden-elektronik/deconz-rest-plugin#install-deconz-development-package-optional-linux-only So for you, after having installed deconz :

sudo apt install deconz-dev
git clone --branch tuya_siren_7 https://github.com/Smanar/deconz-rest-plugin.git
cd deconz-rest-plugin
qmake && make -j2
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins
Smanar commented 3 years ago

Ok so the PR is already validated, you will be able to test it on the next beta version, tell me if it's good with the correction, to close this PR.

nukleuz80 commented 3 years ago

Ok, i will test in next beta.

A question to the dev-version of deConz: Is it possible to run it on the same system as the beta runs? Then i will try it...

Smanar commented 3 years ago

Depend of what you are calling the dev-version ? and depend too your system. PR stay in waiting list, then manup valid some of them, and immediatly after make a beta or stable version with them.

But if you are taking about compiling yoursef the code to test, the procedure just replace a file, you can keep the old one on another folder to make a rollback after your tests.

But all works fine if you have a full OS, more complicated on docker.

nukleuz80 commented 3 years ago

I mean with dev-Version the link you have posted - and i understand what you wrote and how to do it .

My OS is Raspbian Buster and i will give a try to compile it myself...

Thanks...

Smanar commented 3 years ago

ha ok, so it s not realy "the" dev Version, but more "my" dev version ^^, nothing official. But yes, you just need to swap files to swap versions.

nukleuz80 commented 3 years ago

Ok, i compiled it and now i get three sensors + one light. In Phoscon i see the light but cant switch or toggle it. W How should be the workflow?

Thanks

nukleuz80 commented 3 years ago

And yes, i added it two times without deleting. 😎