tinytuya icon indicating copy to clipboard operation
tinytuya copied to clipboard

Missing Data Points for Fingerprint Door Controllers

Open DonatPlayZ opened this issue 1 year ago • 8 comments

Hello,

I'm experiencing an issue with TinyTuya while trying to integrate two door controllers with fingerprint functionality. The initial setup worked, and I was able to add the devices. I also enabled the Data Points (DPs) as per the instructions.

However, after waiting for about four days, I still don't see additional DPs appearing in my TinyTuya web server. I’ve tried reinstalling everything, but the problem persists. According to the log files, the system is receiving more DPs from the Tuya Cloud, but they aren't being added to the list.

I raised this question in a different forum, and after some discussion, I was advised to open an issue here on GitHub.

Could you please help me resolve this?

Thank you!

TinyTuyaLog.txt

Code2 Code1

DonatPlayZ avatar Oct 22 '24 08:10 DonatPlayZ

Hi DonatPlayZ,

I think the issue is that the TinyTuya webapp does not use the DPS values it gets from the cloud, it uses the DPS valus that the device reports to it locally. Can you run this to see what the devices are reporting?

# Run this in the same folder where devices.json is located
python3 -m tinytuya scan

jasonacox avatar Oct 23 '24 05:10 jasonacox

Tuyacommand Hi jasonacox,

Thank you, here is the output! Hope you can see something. Looks like it only pulls the 5 or 6 DP

DonatPlayZ avatar Oct 23 '24 05:10 DonatPlayZ

So as Obi-Wan would say, these are not the DPs you are looking for? :)

We often see this with Tuya devices. There are cloud functions (DPs) that do no present locally. We have not found a way to get these. Tuya devices are "cloud first" and local access is secondary "best effort" and sometimes the firmware doesn't even bother to present those extended DPs. Having said that, some devices will emit other DPs that don't show up on the status() call when their state changes. You can run this script to see if you can get these: https://github.com/jasonacox/tinytuya/blob/master/examples/monitor.py

The TinyTuya webapp doesn't monitor, it just polls the device for status. We have been talking about making a server app that would constantly monitor. Regardless, that would still require that the DPs you are looking for will show up in that monitor.py script run.

jasonacox avatar Oct 23 '24 05:10 jasonacox

No Sadly not.. Im looking for the DPs to Unlock the Door..

Looks like i have to find a other solution for my Project! Thank you! Maybe some day Tuya will be open so people can to what they want!

Thank you!

DonatPlayZ avatar Oct 23 '24 06:10 DonatPlayZ

Ah, understood. You could use the cloud calls to do perform the unlock: https://github.com/jasonacox/tinytuya/blob/master/examples/cloud.py but there are many other tools to help wtih that.

If you are looking to monitor, or possibley change the state that doesn't show up with DPs, there is a hack that you can do where you have the SmartLife app perform an "if this, then that" action when the door is locked/unlocked that turns on/off another devices, like a smart plug. You can then use tinytuya to monitor the smart plug. It's not perfect, but is a possible way to monitor and manage it indirectly.

jasonacox avatar Oct 24 '24 03:10 jasonacox

Oh yea thats an good Point. Maybe i try this instead!

Thank you

DonatPlayZ avatar Oct 24 '24 05:10 DonatPlayZ

I suspect @DonatPlayZ this is similar to my device that I used cloud control in #541 to get working. However, watch out as when your cloud trial/license with tuya expires, you'll lose the control. Unfortunately I'm stuck in that situation now and can't get local control and suspect it's the same issue #557 if I find any more I'll let you know.

andyb2000 avatar Nov 14 '24 09:11 andyb2000

It has been my experience that these types of devices do not respond to polls. If you have a monitor script running (i.e. https://github.com/jasonacox/tinytuya/blob/master/examples/monitor.py) you will see async updates as settings are changed, however there is no way that I know of to query the current state.

uzlonewolf avatar Nov 14 '24 12:11 uzlonewolf