"Socket had a problem and will reconnect" after RGBTW lamp is turned off, then back on
See original GitHub issueHey, I have a problem with my RGBTW lamp after I turn it off using the power switch (like you would with a normal lamp). I’m using 1.5.0-rc.12. When I turn the lamp off, obviously tuya-lan loses connection and tries to reconnect and therefor spams the homebridge.log with [TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (Error: ERR_CONNECTION_TIMED_OUT)
First question: is there a way to disable the retries after a certain time or number of tries and wait for the next UDP packet from the lamp instead?
Now my second problem is that if I turn the lamp back on using the power switch, it seems like tuya-lan tries to reconnect to the lamp, but fails for some reason. The lamp is powered on and homebridge just started, so all is working normally:
[TuyaAccessory] Sending Küche Deckenlampe {"22":1000}
[TuyaAccessory] Sending Küche Deckenlampe {"20":true}
[TuyaAccessory] Heard back from Küche Deckenlampe with command 8
[TuyaAccessory] Heard back from Küche Deckenlampe with command 8
Now I turn the lamp off using the switch.
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (Error: ERR_PING_TIMED_OUT)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (EHOSTUNREACH)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (EHOSTUNREACH)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (EHOSTUNREACH)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (EHOSTUNREACH)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (Error: ERR_CONNECTION_TIMED_OUT)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (EHOSTUNREACH)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (Error: ERR_CONNECTION_TIMED_OUT)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (EHOSTUNREACH)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (Error: ERR_CONNECTION_TIMED_OUT)
Again, this seems normal to me, but this would soon turn into these error messages filling up the log file. Now I turn the lamp back on and would expect it to become available again, but various errors occur:
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (ECONNREFUSED)
[TuyaAccessory] Sending first query to Küche Deckenlampe (3.3)
[TuyaAccessory] Heard back from Küche Deckenlampe with command 10
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (Error: ERR_CONNECTION_TIMED_OUT)
[TuyaAccessory] Sending first query to Küche Deckenlampe (3.3)
[TuyaAccessory] Heard back from Küche Deckenlampe with command 10
[TuyaAccessory] Sending first query to Küche Deckenlampe (3.3)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (EPIPE)
[TuyaAccessory] Sending first query to Küche Deckenlampe (3.3)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (EPIPE)
...
[TuyaAccessory] Sending first query to Küche Deckenlampe (3.3)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (ECONNRESET)
...
[TuyaAccessory] Sending first query to Küche Deckenlampe (3.3)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (EPIPE)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (Error: ERR_CONNECTION_TIMED_OUT)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (Error: ERR_CONNECTION_TIMED_OUT)
...
[TuyaAccessory] Sending first query to Küche Deckenlampe (3.3)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (EPIPE)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (ECONNRESET)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (EALREADY)
[TuyaDiscovery] UDP from 192.168.178.30:6667 0x000055aa...0x0000aa55
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (Error: ERR_CONNECTION_TIMED_OUT)
[TuyaAccessory] Sending first query to Küche Deckenlampe (3.3)
[TuyaAccessory] Heard back from Küche Deckenlampe with command 10
[TuyaAccessory] Sending first query to Küche Deckenlampe (3.3)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (EPIPE)
[TuyaAccessory] Sending first query to Küche Deckenlampe (3.3)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (EPIPE)
[TuyaAccessory] Socket had a problem and will reconnect to Küche Deckenlampe (ECONNRESET)
and so on… If needed, I can provide the whole log file. If I restart homebridge, everything is working fine again and the lamp is working properly.
[TuyaDiscovery] Discovery started on port 6666.
[TuyaDiscovery] Discovery started on port 6667.
[TuyaDiscovery] UDP from 192.168.178.30:6667 0x000055aa...0x0000aa55
[2020-2-29 10:10:09 PM] [TuyaLan] Discovered Küche Deckenlampe (<id>) identified as RGBTWLight (3.3)
[TuyaAccessory] Changing ping gap for Küche Deckenlampe to 9s
[2020-2-29 10:10:09 PM] [TuyaLan] Connected to Küche Deckenlampe
[TuyaAccessory] Sending first query to Küche Deckenlampe (3.3)
[TuyaAccessory] Heard back from Küche Deckenlampe with command 10
[2020-2-29 10:10:10 PM] [TuyaLan] Ready to handle Küche Deckenlampe (RGBTWLight:3.3) with signature {"20":true,"21":"colour","22":1000,"23":579,"24":"0000000003e8","25":"000e0d0000000000000000c80000","26":0}
My homebridge config.json looks like this:
{
"platform": "TuyaLan",
"devices": [
{
"name": "Küche Deckenlampe",
"type": "RGBTWLight",
"manufacturer": "Oeegoo",
"model": "YY-CL16-220S-WF(RGB+)",
"id": "<id>",
"key": "<key>",
"dpPower": 20,
"dpMode": 21,
"dpBrightness": 22,
"dpColorTemperature": 23,
"dpColor": 24,
"minWhiteColor": 140,
"maxWhiteColor": 400,
"colorFunction": "HSB"
}
]
}
Thanks for your help!
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top GitHub Comments
Thank you. You solved one of my big problem
If I remember correctly, I googled the light’s name and found the settings in one of the issues on this repo. I don’t think there is a guide and as long as you don’t have access to the schematics of your lamp or someone else has found out the correct pins, you might have to find it out yourself by trial and error…