8000 Can’t connect to Create Wind Calm (2025) · Issue #605 · jasonacox/tinytuya · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Can’t connect to Create Wind Calm (2025) #605

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

Closed
didrocks opened this issue Apr 16, 2025 · 6 comments
Closed

Can’t connect to Create Wind Calm (2025) #605

didrocks opened this issue Apr 16, 2025 · 6 comments

Comments

@didrocks
Copy link

It seems that recent Create Wind Calm can’t be contacted with tinytuya. After successfully retrieving their dev_id and local_key, connecting with a simple tinytuya program (see below) returns: {'Error': 'Network Error: Unable to Connect', 'Err': '901', 'Payload': None}.
I did try different version too.

I can ping the device and I have other tuya device using tinytuya on the same vlan.

Here is the result when scanning the device:

    {
        "name": "Ceiling Fan",
        "id": "<REDACTED>",
        "key": "<REDACTED>",
        "mac": "<REDACTED>",
        "uuid": "<REDACTED>",
        "sn": "100135117014D6",
        "category": "fsd",
        "product_name": "Ceiling Fan",
        "product_id": "p8z27dfdwc4riyp9",
        "biz_type": 0,
        "model": "XW-FAN-215-D(\u5e26\u706f\u4e0d\u8c03\u5149)",
        "sub": false,
        "icon": "https://images.tuyaeu.com/smart/icon/bay1672726785747y0qr/3b49bc6df24934ee95e68cbf0d8b62e9.png",
        "mapping": {
            "20": {	
                "code": "switch_led",
                "type": "Boolean",
                "values": {}
            },
            "21": {
                "code": "work_mode",
                "type": "Enum",
                "values": {
                    "range": [
                        "white",
                        "colour",
                        "scene",
                        "music"
                    ]
                }
            },
            "23": {
                "code": "temp_value",
                "type": "Integer",
                "values": {
                    "min": 0,
                    "max": 1000,
                    "scale": 0,
                    "step": 1
                }
            },
            "25": {
                "code": "scene_data",
                "type": "String",
                "values": "{\"maxlen\":255}"
            },
            "60": {
                "code": "fan_switch",
                "type": "Boolean",
                "values": {}
            },
            "62": {
                "code": "fan_speed",
                "type": "Integer",
                "values": {
                    "unit": "",
                    "min": 1,
                    "max": 6,
                    "scale": 0,
                    "step": 1
                }
            },
            "63": {
                "code": "fan_direction",
                "type": "Enum",
                "values": {
                    "range": [
                        "forward",
                        "reverse"
                    ]
                }
            },
            "64": {
                "code": "countdown_left_fan",
                "type": "Integer",
                "values": {
                    "unit": "min",
                    "min": 0,
                    "max": 540,
                    "scale": 0,
                    "step": 1
                }
            }
        }
    },

I’m happy to test anything/add more debug as needed!

FYI, this is the simple python script I tried from the README example:

import tinytuya

# Connect to Device
d = tinytuya.OutletDevice(
    dev_id='<REDACTED>',
    address='192.168.20.60',
    local_key='<REDACTED>', 
    version=3.3)

# Get Status
data = d.status() 
print('set_status() result %r' % data)
@uzlonewolf
Copy link
Collaborator

How did you determine it was a v3.3 device? Is that what a scan reported? If not, I'd try 3.5 and then 3.4.

@didrocks
Copy link
Author

At first, this is what the Home Assistant integration reported, but I did try with them without success, as they both returns {'Error': 'Check device key or version', 'Err': '914', 'Payload': None}

I did ensure also that I killed my android application (and still had the same issue after 12h of waiting approximately).

@uzlonewolf
Copy link
Collaborator

Does running python3 -m tinytuya scan see it?

@didrocks
Copy link
Author

So, weirdly, scanning didn’t work at first.

For the 3rd time, I tried to remove and erase the data of the device from the tuya app, used the create app, then decommisionned to readd it to the tuya, fetch back new device id and local key. Then, scanning worked and told that the protocol was 3.4 (there was no firmware update in between though as I can see), and the sample program works.

So clearly something is fishy. Then, I didn’t have any issue witht he new device id and local key to control it. Sorry for bothering you and not being able to give more details. I hope that can help anyone else that go through the same issues: removing it more than once to the app, try again this procedure and cross fingers…

@uzlonewolf
8000 Copy link
Collaborator

Well that's a new one. For the first 2 times, did you run that README sample before the scan?

Most v3.4 devices have a bug where they will randomly "forget" what their local key is and refuse connections until they are power cycled. We're still not sure what exactly triggers this, and how long they work before this happens is seemingly random (they could work fine for months before forgetting, or it could be just a few minutes), but a power cycle brings them back. #443

@didrocks
Copy link
Author

Right, I didn’t run the scan for the first 2 times, as I had all the needed DPs and so on from the Tuya cloud directly.

Ack of the v3.4 devices. I did a lot of power cycle before opening this bug without any success, but I will report back if this come again! Thanks for your swift answers :)

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
0