Open Foxtrottg opened 1 week ago
Which version of companion?
Which version of companion and OS? Companion 3.4.2 Windows 10
I have a PC for testing and just loaded Companion 3.4.2. The error I got was expected (because the plug IP changes), but the scan worked fine as well as changing to the correct IP. I have a plug-strip across town I can test the IP via VPN as well as several in my office.
Your error is happening before the module starts up. Try re-installing companion.
After resetting the config and reinstalling companion, the issue is still occurring.
Every once in a while, I see one of the smart plugs listed but then it will still be unable to connect.
What other modules do you have configured? Try disabling them one at a time to see if that helps. There are some modules that hog companion's attention.
I have attempted to run the Smartplug module while no other modules are in use. I also notice that the other Kasa modules seem to work, it is only the smart plug one that is presenting the issue.
Start the debug log for the module and post those results. I cannot fix what I cannot reproduce.
Starting up module class: E error: Module registration failed Error: Call timed out at t.IpcWrapper.sendWithCb (C:\Program Files\Companion\resources\bundled-modules\tplink-kasasmartplug\main.js:1:64167) at C:\Program Files\Companion\resources\bundled-modules\tplink-kasasmartplug\main.js:1:56938 Starting up module class: E error: Module registration failed Error: Call timed out at t.IpcWrapper.sendWithCb (C:\Program Files\Companion\resources\bundled-modules\tplink-kasasmartplug\main.js:1:64167) at C:\Program Files\Companion\resources\bundled-modules\tplink-kasasmartplug\main.js:1:56938 Starting up module class: E error: Module registration failed Error: Call timed out at t.IpcWrapper.sendWithCb (C:\Program Files\Companion\resources\bundled-modules\tplink-kasasmartplug\main.js:1:64167) at C:\Program Files\Companion\resources\bundled-modules\tplink-kasasmartplug\main.js:1:56938
It just repeats this.
That error is companion failing to start the module but does not say why :( I still cannot recreate the error.
I downloaded to another Windows laptop, and intentionally pointed it to a non-plug device. Correct error shows up, but no crash. Have you rebooted the plug?
Yes. I have 4 smart plugs and have power cycled them all.
Other than re-downloading companion, I can't think of anything else at the moment. I have 2 for 2 successful PC install and configure.
@Foxtrottg Are you able to test a custom package? I can send zip file with sources unpacked for a better idea where the error is.
Possibly. I'm relatively new to companion, but I can probably figure it out. Go ahead and shoot it over to me.
Click on the cog in the upper right to expose the Developer modules path Point that to a directory to use for custom modules Unpack this file in there: tplink-kasasmartplug.zip
Restart companion.
Starting up module class: kasaplugInstance error: Error getting config fields: Call timed out error: Error getting config fields: Call timed out error: Module registration failed Error: Call timed out at IpcWrapper.sendWithCb (webpack://tplink-kasasmartplug/./node_modules/@companion-module/base/dist/host-api/ipc-wrapper.js?:39:30) at eval (webpack://tplink-kasasmartplug/./node_modules/@companion-module/base/dist/entrypoint.js?:111:20) error: Error getting config fields: Call timed out
Found something. Try this one: tplink-kasasmartplug2.zip
Same error message
So after doing some more testing.
I isolated a smart plug to a new separate vlan (we'll call it vlan2) from the main network (call this vlan1).
If I only connect my PC to vlan2 and only vlan2. It works normally. If I connect my PC to vlan2 and vlan1 (wifi and wired ethernet) it does not work. Even if I select the vlan2 ip address as the companion interface.
Settings for each vlan are the exact same.
I'm not sure how I can work around this. The error is happening at the Companion level and not propagating to my code where I could try again or ignore. My primary workstation (linux) has 3 addresses, and the PC's I are both attached hard-wire and wireless.
I have seen similar weirdness if there are duplicate IPs on the network.
This is a windows only issue and happening in the smarthome library, not the module itself. The same laptop that I tested from my home network via VPN fails when directly attached to the office network. I do not have a full dev kit installed on that laptop yet so this will take a couple of days to locate where I can prevent or work around the problem.
When attempting to connect to a smart plug, no devices show up on the scan networks dropdown. and manually inputting an IP address times out consistently.
Starting up module class: E error: Module registration failed Error: Call timed out at t.IpcWrapper.sendWithCb (C:\Program Files\Companion\resources\bundled-modules\tplink-kasasmartplug\main.js:1:64167) at C:\Program Files\Companion\resources\bundled-modules\tplink-kasasmartplug\main.js:1:56938