Comments (14)
from node-unifiapi.
The PHP version seems short enough to rewrite if need be. I also found https://ubntwiki.com/products/software/unifi-controller/api. My goal is still to have a TypeScript (OK, JavaScript) library that I can use. My bias shows in https://rmf.vc/IEEEJSEco.
from node-unifiapi.
@lifewcody Same here. Apparently with the addition of UDM PROs the routes for the software-based controllers have changed. Have you been able to make any progress?
FYI: I maintain the PHP API client for UniFi but have a specific use-case where we may need to leverage CloudAccess and it would be really cool if we can achieve that with this package.
from node-unifiapi.
This is one of the two big issues slowing my adoption of the UDM pro. The other is that /etc/hosts isn't getting populated but, with an API, I can think about programming a work-around.
from node-unifiapi.
@BobFrankston If you have PHP skills you can always start off with the PHP API client which I maintain and already supports UDM PROs.
from node-unifiapi.
Thanks -- I'll see if I can figure out the fix to apply it to the node version but I'm hesitant to try to update the shared version.
from node-unifiapi.
@malle-pietje - Since I'm not up to speed on the PHP ecosystem, do you have a simpler example I can use to invoke the PHP library? I'm getting authorization issues on the UDM Pro. There seems to be a myriad of credentials) and I don't know if I have the bug in my JS code or not.
from node-unifiapi.
@BobFrankston the issue with UDM PROs is that the login route and base path have changed. Also the authentication uses a JWT token instead of cookies. Just search through the code for the is_unifi_os property to see where we change behavior of the client:
https://github.com/Art-of-WiFi/UniFi-API-client/blob/master/src/Client.php
from node-unifiapi.
Thanks. I did find /api/auth/login. The challenge now is to figure out which credentials for what since that too has changed. There are local credentials, UDM credentials, cloud credentials ... but I did get to authorization failure which is progress.
from node-unifiapi.
@BobFrankston When accessing the (non-Cloud) API you need to use a set of credentials for the UniFi controller application with local access permissions.
from node-unifiapi.
I added local credentials and tried both that and the cloud credentials which the UDM pro seems to want. Do you have a command line I can use with your PHP version so I can test the credentials? I do appreciate your help and the work you've done.
from node-unifiapi.
@BobFrankston You can use this example which can easily be executed from the command line after setting up the config file:
https://github.com/Art-of-WiFi/UniFi-API-client/blob/master/examples/list_user_stats.php
Execute like so:
# php list_user_stats.php
from node-unifiapi.
I've made lots of progress and added:
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYPEER => false,
but now need to get past
PHP Notice: cURL error: SSL: no alternative certificate subject name matches target host name
from node-unifiapi.
OK, got past that with
CURLOPT_SSL_VERIFYHOST => FALSE,
CURLOPT_SSL_VERIFYPEER => FALSE,
On to the next challenge ...
from node-unifiapi.
Related Issues (20)
- WRTC not working on Azure HOT 3
- SyntaxError using the CloudAPI/wrtc HOT 2
- version without WebRTC? HOT 12
- Promise in creating the vouchers.. HOT 1
- Still dependent on wrtc HOT 8
- Bug in implementation of UnifiAPI.stat_sta_sessions_latest HOT 1
- UnifiAPI.stat_session function not allowing single mac filtering
- cloud access problems with 5.9 controller version
- Not Working on RPI HOT 1
- Authentication Error HOT 1
- Voucher creation - voucher for desired start and end active date ?
- Login problem to the unifi api - voucher creation example ? HOT 1
- Maybe typo in unauthorise_guest method HOT 1
- 2FA not supported
- Merge with node-unifi?
- merge:^1.2.1 dependency, affected by sec vulnerability
- Running on an Issue with basic example
- Segmentation fault (core dumped) HOT 1
- Simple Example not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-unifiapi.