elad-bar / ha-edgeos

Integration with EdgeOS (Ubiquiti)
134 stars 23 forks source link

EdgeSwitch Integration #120

Open Barrow1990 opened 6 months ago

Barrow1990 commented 6 months ago

Make it possible to connect to EdgeSwitches as well

elad-bar commented 3 months ago

isn't it supported? it works with EdgeOS so any other Edge device should be supported, please let me know what is the error in case it is not working

thanks

Barrow1990 commented 3 months ago

Thanks for replying @elad-bar Unfortunately when i try to connect to an EdgeSwitch 24 500W with V1.9.3, i get the following error:


This error originated from a custom integration.

Logger: custom_components.edgeos.managers.rest_api Source: custom_components/edgeos/managers/rest_api.py:386 integration: Ubiquiti EdgeOS Routers (documentation, issues) First occurred: 10:00:43 (7 occurrences) Last logged: 10:04:14

Status changed from 'Establishing connection to API' to 'API Not found'


This error originated from a custom integration.

Logger: custom_components.edgeos.managers.rest_api Source: custom_components/edgeos/managers/rest_api.py:356 integration: Ubiquiti EdgeOS Routers (documentation, issues) First occurred: 10:00:43 (14 occurrences) Last logged: 10:04:14

Failed to login, Error: 403, message='Forbidden', url=URL('https://192.168.3.2'), Line: 316 Failed to login, Error: 403, message='Forbidden', url=URL('https://192.168.3.2:443'), Line: 316

This error originated from a custom integration.

Logger: custom_components.edgeos.managers.flow_manager Source: custom_components/edgeos/managers/flow_manager.py:106 integration: Ubiquiti EdgeOS Routers (documentation, issues) First occurred: 10:00:43 (7 occurrences) Last logged: 10:04:14

Failed to create integration, Error Key: invalid_server_details

Note: Im using credentials that have the highest privilege

elad-bar commented 3 months ago

V1.x of EdgeOS is not supported, only v2.x, I can't support any other version (v1/v3) mainly because my device is v2 and there is no emulator for other versions, what is your device model?

Barrow1990 commented 3 months ago

Hmmm.... So its an ES-24-500. Unfortunately it wont run V2

elad-bar commented 3 months ago

If you would like to create HAR file after your login (clean sensitive data out of it), maybe i will be able to do aomething with it

Barrow1990 commented 3 months ago

Please find attached the har file as requested EdgeSwitchV1.9.3.json Note: Its in json because for some reason it wouldnt accept a har file.

elad-bar commented 3 months ago

according to the HAR file the API is much different, it is not working with WebSocket as well, are you using beta version of EdgeOS or is it the official one?

thanks