Closed TommySharpNZ closed 1 month ago
Hey there @markgodwin, mind taking a look at this issue as it has been labeled with an integration (tplink_omada
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
tplink_omada documentation tplink_omada source (message by IssueLinks)
It looks like TP-Link have had a bit of an overhaul of their API in the latest update, and added OpenAPI specs at the same time. I need to do a bit of investigation to see if we can update without breaking backward compatibility with older controllers.
I've upgraded to 5.12.9 on my OC200 (firmware 2.11.3 Build 20230906 Rel.36272), and the login and API seems to be working fine, and the HA integration is still working. I may still want to switch to the new API at some stage, but it doesn't as urgent now.
Are you using a software or hardware controller?
I will do some more detailed investigation.... I am running a software controller.
First of all, thank you for the initial integration of Omada!
After updating Omada Software Controller under Ubuntu to version 5.12.7, the connection from HA to Omada Controller no longer works. There is always a 500 error message. Even if I create an API user and use these credentials, no connection is possible.
It's possible that the software controller no longer supports the old API. Ideally we need to get a log of the login messages sent between the web page and the back-end to confirm what has changed. If you could collect these with something like fiddler, that would be great.
I looked into the new OpenAPI API a bit this weekend. The oauth interactive login isn't appropriate for HA because the tokens only last for 14 days, however, there is a client_secret auth flow that would work. Unfortunately, the API looks significantly different to the old one, so switching over won't be trivial. It also seems they rate limit calls to 1,000 a day, which could be a big problem with polling each list for updates. I don't understand why they would do that unless all the calls get routed via the cloud, which I hope is not the case.
On Mon, Oct 2, 2023 at 7:44 AM securebits @.***> wrote:
First of all, thank you for the initial integration of Omada!
After updating Omada Software Controller under Ubuntu to version 5.12.7, the connection from HA to Omada Controller no longer works. There is always a 500 error message. Even if I create an API user and use these credentials, no connection is possible.
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/101140#issuecomment-1742477486, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRD6DEC2GQPF4YG7MGUOZ3X5JPGLANCNFSM6AAAAAA5NC3N7I . You are receiving this because you were mentioned.Message ID: @.***>
Thanks for the quick reply!
I have attached you a transcript of the login process as WCAP output (formatted as TXT, otherwise I could not have uploaded it). I hope that helps!
If not, please tell me a way how I can send you the Fiddler archive.
Greetings Marcel
@MarkGodwin where are the OpenAPI specs? The docs page hosted within the controller (doc.html) doesn't seem to load correctly.
@andyjenkinson the docs link in my control looked like it wasn't working but eventually loaded up after about 30 seconds.
@MarkGodwin is there anything I can do to help troubleshoot this issue? Skills are a bit limited but I can follow instructions :-)
Sorry, I have been buried deep in another project. That is now finished, so I will look at this as soon as I have some spare time. Hopefully next weekend.I will probably try to fix the old api first, as there is more chance of a quick fix there, and less worries on API call limits. If that won’t fly, I will look into switching to the new API, which will probably have to happen eventually.On 29 Oct 2023, at 21:48, Tommy @.***> wrote: @andyjenkinson the docs link in my control looked like it wasn't working but eventually loaded up after about 30 seconds. @MarkGodwin is there anything I can do to help troubleshoot this issue? Skills are a bit limited but I can follow instructions :-)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
Awesome, appreciate the work :-)
@MarkGodwin this is a very useful and promising integration! Is there a roadmap to enable Device Trackers - per doc https://www.home-assistant.io/integrations/tplink_omada/ they're not yet supported. Device Trackers are vital for user presence detection in HA, and Omada even identifies to which AP the user is connected.
Sorry to use this issue# thread for the question - not sure a one-off question is worth its own thread and unclear in which forum to even open it to be seen. Thanks!
This is confusing. I've installed the software controller 5.12.7, and the tplink-omada-api python package is still able to connect to it without issue.
Please can you try using the omada
command line in your environment, and see if that will work?
I did see something in the release notes about a change in cookie name in the new controller version. The authentication session information is stored in a cookie, so I wonder if this is the problem. It may be possible to clear cookies in HA, or wait for the cookie to expire?
Okay, I'll have to do some reading to work out how to use the command lind.... but I will have a go...
Hey, is there a fix for this? I've tried downgrading which doesn't seem to help at all.
Hi all, has this been repaired yet? I have an OC200 on 5.12.9 and now I am unable to see data from the controller. You all mentioned to "clear cookies in HA" but I am unable to locate where that functionality is. Thanks for whatever you can do with this.
Yes, the integration works with Omada 5.13.22
Yes, the integration works with Omada 5.13.22
The OC200 does not yet have an upgrade past 5.12.9 as of today. Is there something else I can try to remedy this issue? It's not earth shattering but I want to avoid deleting and re-adding the host if I can. Thanks.
I landed here with what looks like the same issue. Running HA and have lost Omada integration. Can't achieve functionality. My OC200 has controller version 5.12.9. Appears latest.
This is very confusing to me. I have:
I'm not having any problems with the integration, so I don't think it's anything to do with the controller version.
There do seem to be occasional problems with the cookie based authentication of the controller, but I have never experienced any of them, so I can't advise you of the solution.
Not being that much of help, but i have Omada_SDN_Controller_v5.13.23_linux_x64.deb, recently upgraded from 12.7 running on debian 11.9 and it works with HA 2024.2.1 Had to remove and re-add the integration a few weeks ago after getting an error 'failed setup, will retry' but else it has been working without issues.
(PS. I have not enabled the verify SSL box as Im running with own generated certs). (PS2 I actually came here to add a feature request and got curious when I saw the bug report).
Looks like TP-Link just pushed out an new firmware version for the OC200. Last night I updated to:
This new version is working again, albeit I did have to delete and reenter the OC200 but it was easy and it rediscovered everything. Hope this helps.
So this is what I can gather. Something has definitely changed? My OC200 has always been on a different lan than my HA. It used to connect just fine even though it was on a different lan. But now it will no longer connect on different lan. No ACL denying access between lans. It used to work ? Bummer!
I also solved the problem with the new update but now there is a new problem. If you activate two-factor verification, the integration does not start.
I also solved the problem with the new update but now there is a new problem. If you activate two-factor verification, the integration does not start.
Yeah, if you think about it, two factor authentication is definitely not going to work. The whole point of 2FA is a second authentication mechanism. Is the integration going to check your SMS or email for a security code when it tries to log into the controller? Pretty obviously, it can't do that.
You'll need to do without 2FA, at least until the integration switches over to the new Open API, which will use a client_credentials
oauth flow. The problem is, the new API doesn't support many of the features that the integration already relies on, so I don't think we can switch over any time soon.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Within the last month, the HA TP-Link Omada functionality has started to work. Only change has been HA updates and a few Omada firmware updates. I could not get a connection thru various attempts to fix. Unfortunately, due to my work travel schedule, I can't pinpoint what corrected the issue. My firmware was updated thru Omada app, HA thru rolling updates.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
Upgrading the TP-Link Omada controller to version 5.12.7 seem to break the integration?
What version of Home Assistant Core has the issue?
core-2023.9.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
TP-Link Omada
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tplink_omada
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response