Comments (7)
the "ready" event still isn't firing, but I am getting connect and disconnect events now. Thanks.
from unifi-events.
Nothing? No problems at all or any help anyone?
from unifi-events.
Fixed it by myself.
from unifi-events.
How did you fix this? I can't get it to connect to my controller at all, ip of "http://192.168.xx.xx:8443". Does the controller need to have an SSL cert for this library to work?
It never fires the 'Connected To UniFi Controller' event and if when I issue a getDevices(), I get an error that says "error: self-signed certificate"
from unifi-events.
Have you set rejectUnauthorized: false
?
This is for connecting to a controller without valid SSL cert.
from unifi-events.
yes, still doesn't work. Doesn't fire the connected event and when I issue getClients(), I get "bad request, this combination of host and port requires TLS".
This is my code:
`const UnifiEvents = require('unifi-events');
let unifi = new UnifiEvents({
controller: http://192.168.X.XX:8443,
username: settings.user,
password: settings.password,
rejectUnauthorized: false
})
unifi.on('ready', () => {
console.log('Connected To UniFi Controller')
})
unifi.on('connected', (data) => {
unifi.getAp(data.ap).then((ap) => {
sendNotification(Device *${data.hostname}* has Connected to *${data.ssid}* (${ap.name}) on channel ${data.channel}.
)
})
})
unifi.on('disconnected', (data) => {
unifi.getAp(data.ap).then((ap) => {
sendNotification(Device *${data.hostname}* has Disconnected from *${data.ssid}* (${ap.name})
)
})
})
unifi.getClients()`
from unifi-events.
You have configured HTTP
instead of HTTPS
.
Try controller: https://192.168.X.XX:8443,
from unifi-events.
Related Issues (10)
- client alias HOT 2
- Keeps disconnecting HOT 1
- Many Disconnects From Clients HOT 1
- Port to Axios since request is deprecated HOT 3
- Issue with / prepending
- ws-connect requires Node 6+ but README says 4+ supported HOT 1
- TypeError: Cannot read property 'prototype' of undefined HOT 1
- Help: Not working
- Listen to all sites? HOT 1
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 unifi-events.