iobroker-community-adapters / ioBroker.unifi

ioBroker.unifi is an ioBroker adapter for your UniFi network devices.
MIT License
71 stars 23 forks source link

Login fails after update to current beta Unifi-OS 3.2.5 or 3.2.6 on UDMP #711

Closed pfanntec closed 11 months ago

pfanntec commented 12 months ago

Describe the bug
Ubiquiti must have changed something on the login. The adapter turns green but only error messages are displayed in the log. The login fails.

To Reproduce

  1. update Unifi-OS to 3.2.5 or 3.2.6
  2. login fails

Screenshots & Logfiles

2023-10-23 21:01:53.092 - info: host.Server instance system.adapter.unifi.0 started with pid 300782 2023-10-23 21:01:54.021 - info: unifi.0 (300782) starting. Version 0.6.6 in /opt/iobroker/node_modules/iobroker.unifi, node: v18.18.2, js-controller: 5.0.14 2023-10-23 21:01:54.039 - info: unifi.0 (300782) UniFi adapter is ready 2023-10-23 21:01:54.185 - error: unifi.0 (300782) Error site undefined (data): {"error":{"code":401,"message":"Unauthorized"}} 2023-10-23 21:01:54.274 - error: unifi.0 (300782) [updateUnifiData-login site undefined] error: Request failed with status code 401, stack: AxiosError: Request failed with status code 401

Versions:

dosordie commented 12 months ago

Same here on a UDM-Pro

Ilovegym66 commented 11 months ago

here the same, but the ssh login are genarelly not working any more.. ?? can anybody login with ssh to the console with firmware 3.2.5??

pfanntec commented 11 months ago

SSH access works for me. Did you enable it in the console settings?

Ilovegym66 commented 11 months ago

Yes, I enabled and disabled and enabled it again, but no chance to login.. I can test later in the evening, need downtime for this..

dosordie commented 11 months ago

They changed the SSH login to keyboard-interactive

I edited the /etc/ssh/sshd_config file to allow password auth again (PasswordAuthentication yes)

Ilovegym66 commented 11 months ago

Yes, ssh is working, I changed the sshd_config , but the adapter can't login.. same error again...

pfanntec commented 11 months ago

@Ilovegym66 The adapter fetches the json data via a web interface and not via SSH. At least that is my state of knowledge.

dosordie commented 11 months ago

If it helps anyone: the node red unifi node (node-red-contrib-unifi) works. I used this to temporarily recreate the functions of the iobroker adapter.

Ilovegym66 commented 11 months ago

ssh login is working fine, web login too. But the Adapter can't login, I've the same problem here. @pfanntec can you provide your node-red flow, please?

jens-maus commented 11 months ago

Which Network Version the Early Beta of of UnifiOS 3.2.5/3.2.6 comes with?

Ilovegym66 commented 11 months ago

Network 8.0.6 If you need more logfiles at level debug, request it, please :-)

jens-maus commented 11 months ago

Ok, then this is the same issue like in https://github.com/jens-maus/node-unifi/issues/223 where node-unifi is not able to be used with Network versions > 7.

So please go there and try to support this upstream project with debug logs/test environments because iobroker.unifi is simply using it.

pfanntec commented 11 months ago

This is the temporary solution: I replaced the unifi.js with the one provided by @jens-maus. (node-unifi) https://github.com/jens-maus/node-unifi/blob/master/unifi.js

Local iobroker path: /opt/iobroker/node_modules/node-unifi/unifi.js

Restart the unifi adapter

jens-maus commented 11 months ago

Issue should be fixed with the latest sources in master as node-unifi 2.5.0 with the fix should be integrated there.