Jump to content

KASA NS - Can't communicate with any devices


tmorse305
Go to solution Solved by bpwwer,

Recommended Posts

Posted

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:

image.png.3054a993a70f90d1d97f11907f01de8d.png

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?

Posted

@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?

  • Like 2
Posted

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
Posted

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.

  • Like 2
Posted
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.

Posted

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.

  • Like 1
Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...