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 functionality #10

Open
2hdlockness opened this issue Nov 20, 2021 · 6 comments
Open

Add functionality #10

2hdlockness opened this issue Nov 20, 2021 · 6 comments

Comments

@2hdlockness
Copy link

Hello
First of all, well done for your module, it's great!
Do you think it would be possible to add a feature to retrieve the value of a connected temperature sensor?
Obviously a sensor that works with TUYA.
Thank you

@slametps
Copy link
Owner

sorry, I don't have that device. To make it works, we must know the transmited message for that kind of device since I don't use the official Tuya API.

@2hdlockness
Copy link
Author

Can you tell me what you need?
I accessed the device log from Tuya IoT Platform.
Maybe I can provide you with the necessary information?

@2hdlockness
Copy link
Author

Hello
I allow myself to rewrite a little message to you which has not had an answer to my previous one.

@slametps
Copy link
Owner

slametps commented Dec 2, 2021

Sorry. Unfortunately, I have no time to tinkering and update the code for the new Tuya device. Besides, I don't have the device for the research because the method I use is unofficial by sniffing the transmitted package from Tuya cloud server to MM.

@slametps
Copy link
Owner

slametps commented Dec 2, 2021

But, for start you may uncomment line 258 in node_helper.js, and see the MM console log output for listed devices and their properties:

//console.log("DEBUG: arrDevices = [" + this.dump(arrDevices) + "]");

@2hdlockness
Copy link
Author

Thank you for your reply.
This is what I have in my logs after uncommenting line 258.

[02.12.2021 12:55.15.459] [LOG] Getting device list...
[02.12.2021 12:55.15.788] [LOG] DEBUG: regionTuya : eu
[02.12.2021 12:55.15.790] [LOG] DEBUG: Number of Devices = 11
[02.12.2021 12:55.45.572] [ERROR] Whoops! There was an uncaught exception...
[02.12.2021 12:55.45.576] [ERROR] TypeError: this.dump is not a function
at Timeout.sendInfo [as _onTimeout] (/home/pi/MagicMirror/modules/MMM-TuyaSL/node_helper.js:258:54)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)

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

No branches or pull requests

2 participants