tmorse305 Posted September 9, 2023 Posted September 9, 2023 Hi @Jimbo.Automates, I can't communicate with any of the Kasa devices. The NS is up, the AC reports it to be connected, but if I try to operate a device I get this error message: The are no errors in the log, and no log entry of any kind is generated when I get this error. I restarted the NS and rebooted eISY but no luck. Suggestions?
Jimbo.Automates Posted September 9, 2023 Posted September 9, 2023 This is a PG3 issue, not sure what it means. Will need help from @bmercier or @Michel Kohanim Sent from my Pixel 6 Pro using Tapatalk
bpwwer Posted September 9, 2023 Posted September 9, 2023 @Jimbo.Automates That error means that IoX sent a command but didn't get a response back within it's timeout period. Could be something in PG3 or could be the node server. Probably need to trace through both the PG3 log and node server log to determine why. This can also happen if the IoX is too busy and doesn't process the response in time. But I agree, that it's unlikely to be a node server issue. Does this happen when sending commands to any other node servers? 2
tmorse305 Posted September 9, 2023 Author Posted September 9, 2023 Thanks @bpwwer, I didn't think to look in the PG3 log. At exactly 18:44:00 Using the AC I tried to turn on a Kasa switch which generated the above error. I watched the KASA NS log as I did it and there were no entries (on debug level). I then checked the PG3 log and found this: 9/9/2023, 18:44:00 [pg3] error: IoX Inbound Status: UnauthorizedError: Unauthorized at Object.throw (/var/polyglot/node_modules/koa/lib/context.js:97:11) at checkAuth (/var/polyglot/node_modules/@universaldevices/pg3x/lib/routes/nodeserver.js:30:56) at getNodeserver (/var/polyglot/node_modules/@universaldevices/pg3x/lib/routes/nodeserver.js:40:11) at async /var/polyglot/node_modules/@universaldevices/pg3x/lib/routes/nodeserver.js:166:16 at async /var/polyglot/node_modules/@universaldevices/pg3x/lib/services/https.js:48:9 Hopefully that provides a clue.
Solution bpwwer Posted September 10, 2023 Solution Posted September 10, 2023 When the IoX sends a command to PG3x, it does so by sending an http request (as defined in the UDI Node Server REST API docs). PG3x does require a username/password for authentication. When PG3x creates the node server entry on the IoX, it provides it with a username and password. If that gets changed on the IoX, then PG3x fails to authenticate it which is what looks like is happening here. To fix this try: From the Admin Console go to the Node Servers -> Configure -> <slot number range for Kasa node server> -> Kasa menu and then click the Delete button. This will delete the node server configuration from the IoX Then re-install the Kasa node server using the PG3x re-install option from the Node Server Store -> Kasa -> Install, midway in the dialog box there should be an option to re-install to the same slot. The re-install option won't delete any of your existing configuration options and shouldn't impact any existing programs or scenes that use Kasa nodes. These two steps should refresh the node server configuration on the IoX and allow it to authenticate when sending commands to PG3x. 2
tmorse305 Posted September 10, 2023 Author Posted September 10, 2023 9 hours ago, bpwwer said: To fix this try: Thanks Bob, this solved the problem for me. So there is a unique usename/password for each NS? I experienced some other file corruption recently so maybe this was another casualty.
bpwwer Posted September 10, 2023 Posted September 10, 2023 Yes, each node server install on your IoX has a unique username/password. We don't want someone or something that's not supposed to send commands to the node server. 1
Recommended Posts