-
Notifications
You must be signed in to change notification settings - Fork 192
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
Can't connect to a device via tinytuya while it is available via tuya smart #567
Comments
Did the local key change? Try running wizard to get the local key. |
I recently had a similar issue with one of my Colorful-X7 (Some sort of SP107E like led controller) the only difference was I had a Network Error: Unable to Connect (901). Silly me, it turned out I swapped the IP and local key vars (I had a python snippet that looks for all the devices with the model Colorful-X7 in my local network and returns a list of tinytuya.Device()) so I couldn't connect to the devices anymore... |
I have the same issue, key has not changed, Ip has not changed, connection is available locally (ping works) and available from the cloud / app, but suddently getting "Error": "Check device key or version", "Err": "914" |
Tuya devices are by default cloud devices. The local API is a afterthought and appears to have been added to allow the SmartLife app to initial configure and control them locally if the cloud is unavailable. Unfortunately, the stability of the local API varies greatly from device to device. I wish we knew why they get in a bad state. Some suggestions:
|
Here is output of python -m tinytuya scan -d
Here is output of python -m tinytuya wizard
Here is part of devices.json related to problematic device 172.16.66.129
|
@jasonacox is there a method to reboot the device from tinytuya ? |
Sadly no, there is no way to reboot the device. I've disassembled a few firmware images and the only path to a reboot I've found is while factory defaulting the device. |
Maybe a second device to switch off/on the first one ;) I am curious how did you manage to extract the firmware ? |
There are several ways you can get the firmware.
api.loginEx({ email: "<app email here>", password: "<app password here>" }).then(async sid => {
console.log(sid);
api.request({
action: "tuya.m.device.check.for.updates",
data: {
"devId": "<device id here>",
},
}).then(async data => {
console.log('F/W data:');
console.log(data);
});
|
What language is that ? |
Javascript (Node.js) using TuyAPI. My full script is actually: const Cloud = require('@tuyapi/cloud');
const debug = require('debug');
debug.enable("@tuyapi/cloud");
let api = new Cloud({
key: "ekmnwp9f5pnh3trdtpgy",
secret: "r3me7ghmxjevrvnpemwmhw3fxtacphyg",
secret2: "jfg5rs5kkmrj5mxahugvucrsvw43t48x",
certSign: "0F:C3:61:99:9C:C0:C3:5B:A8:AC:A5:7D:AA:55:93:A2:0C:F5:57:27:70:2E:A8:5A:D7:B3:22:89:49:F8:88:FE",
apiEtVersion: '0.0.1',
region: 'AZ', // replace with EU if appropriate
endpoint: "https://a1.tuyaus.com/api.json", // replace with tuyaeu.com if appropriate
// sid: "",
});
api.loginEx({ email: "<smartlife app email here>", password: "<password here>" }).then(async sid => {
console.log(sid);
api.request({
action: "tuya.m.device.check.for.updates",
data: {
"devId": "<device id here>",
},
}).then(async data => {
console.log('F/W data:');
console.log(data);
});
}); |
I have a smart energy monitor device ("product_name": "三相重合闸") that worked fairy well in the past, but recently I noticed, that I can't connect to it via tinytuya. In the past it worked fine, but now I'm getting this when I'm trying to get device status
Meanwhile via cloud api I can connect to it without any problem. I checked and the device key remains the same. Device rebooting doesn't help.
The text was updated successfully, but these errors were encountered: