almottier / TapoP100

A module for controlling the TP-Link Tapo P100 Plugs
MIT License
75 stars 23 forks source link

Error -1012 trying to turn on Tapo P105 #21

Open L1ght94 opened 8 months ago

L1ght94 commented 8 months ago

I have a Tapo P105 with following information: Hardware Version: 1.0.0 Firmware Version: 1.4.1

I can execute .getDeviceInfo() and .get_status(), but if I try to execute .turnOn(), I get Exception: Error Code: -1012

How do I solve this?

TomohiroUchida commented 7 months ago

Hello , I'm facing same issue now. p100.getDeviceInfo() is OK. When I execute p100.turnOn() , I got "Error: {'error_code': -1012}". My device is , 'fw_ver': '1.4.1 Build 20231103 Rel. 36519', 'hw_ver': '1.0.0', 'type': 'SMART.TAPOPLUG', 'model': 'P105', .

I hope it will be work fine.

yabeenico commented 4 months ago

I found a workaround for this problem and created the PR (#29). P105 requires terminalUUID in payload set to the mac address of the device. You can temporary resolve the problem by changing code like following until the PR merged.

before: https://github.com/almottier/TapoP100/blob/04c452fd8af9d8505e4177ba3df157372ce3ee0c/PyP100/auth_protocol.py#L52

after:

        payload = {"method": method, "terminalUUID": "AB-CD-EF-01-23-45"} 

You can get the device mac address in Tapo App or p100.getDeviceInfo().