Coder Social home page Coder Social logo

iobroker-community-adapters / iobroker.unifi Goto Github PK

View Code? Open in Web Editor NEW
73.0 14.0 24.0 2.07 MB

ioBroker.unifi is an ioBroker adapter for your UniFi network devices.

License: MIT License

JavaScript 88.38% HTML 11.45% CSS 0.12% Dockerfile 0.05%
nodejs javascript unifi unifi-controller iobroker home-automation

iobroker.unifi's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iobroker.unifi's Issues

"is_online" not working.

As i understand it, "is_online" could be used to detect presence!? My client (smartphone) is permanetely online even if i deactivate the WiFi.

Up- and download monitoring doesn´t work since update to 0.5.0

I´m monitoring current up- and download of my USG with grafana. Since version 0.5.0 unifi.0.default.health.www.tx_bytes-r and unifi.0.default.health.www.rx_bytes-r are not updated anymore. In adaptersettings "health" is activated an all options are set.
Could you please reimplement this or tell me how to activate?

Please check ioBroker.unifi with js-controller 2.0

Hi,

the new js-controller 2.0 will come into latest repository in the next days and we want to make sure that all adapters are working well. We already did a 2 weeks Beta test and so some adapter were aleady checked and some needed slight adjustments.

You can find more information in ioBroker/ioBroker.js-controller#482 and in the ioBroker Forum. If you have more technical questions please write in the referenced issue or in the Developer thread please. General questions are best in the genral thread.

Please update your systems to js-controller 2.0 and check your adapter.

Please close this issue once you have checked your adapter or received successfull reports from users.

Thank you very much for your support. Please contact us in the other Threads or Forum on any question.

An in-range update of snyk is breaking the build 🚨


🚨 Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! 💜 🚚💨 💚

Find out how to migrate to Snyk at greenkeeper.io


The dependency snyk was updated from 1.320.2 to 1.320.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

snyk is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • Travis CI - Branch: The build errored.

Release Notes for v1.320.3

1.320.3 (2020-05-13)

Bug Fixes

  • enable mvn plugin logging when running with -d (5414755)
Commits

The new version differs by 6 commits.

  • 6e7fb38 Merge pull request #1119 from snyk/fix/enable-mvn-logging
  • 5414755 fix: enable mvn plugin logging when running with -d
  • 505720d Merge pull request #1117 from snyk/chore/release-notes-review-fix
  • 649c770 chore: release notes preview fix.
  • 6e448ca Merge pull request #1114 from snyk/chore/run-tests-on-linux
  • a67adee chore: update test:acceptance include root tests

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Adapter installieren

Hallo Jens,
Kannst du mir bitte helfen, wie kann ich den Adapter in IOBroker installieren.
Habe bei mir 2 Ubiquiti AP stehen.
DANKE
SG

Enable and disable PoE Ports via ioBroker

Hello Jens,
I currently use your plugin for reading different values of my Unifi Controller. I would like to remotely activate or deactivate PoE on separate ports. One AP is located outside and just need to be activated when people are outside. So I would like to turn on PoE via your plugin.
Is this somehow possible?
Regards,
Harald

Abfrage ob Client inaktiv

Hi Jens,
kannst du mir sagen wie ich am ehesten raus finde, ob ein Client inaktiv (also disconnected) ist?
Ich habe mich schon durch die Objekte gesucht, werde aber nicht so richtig schlau draus.
Ich denke, dass last_seen ist hierzu gedacht, richtig?
Wenn ich das richtig interpretiere, nehme ich https://www.w3schools.com/jsref/jsref_gettime.asp / 1000 und prüfe dann die Differenz zwischen dem Ergebnis und dem Wert in last_seen. Wenn dieser bspw. 300 ist, wurde der Client seit 5 Minuten nicht mehr gesehen und ich kann ggf. davon ausgehen, dass er disconnected ist.
Bitte korrigier mich falls ich das falsch verstehe oder es einfach geht.

Beste Grüße,
Daniel

Adapter doesn't reconnect after a broken connection

If the communication connection to the unifi controller gets broken, the adapter issues a info message in iobroker log:

unifi.0 date info ERROR: Error: connect ECONNREFUSED 192.168.xx.xx:8443

After this point the unifi adapter stopps working, even though the connection to the unifi controller is available again. The queries from a node-unifi script return wrong results. It is then required to restart the adapter instance.

The adapter should try to reconnect by the update interval. If a connection is broken, it should issue an error in the log rather than an info message only.

Missing Client Datapoints

Please add following missing datapoints in client settings if possible.

TX-bytes-r
RX-bytes-r

It´s actual activity of wlan clients in bit. I need this dp´s for visualisation my network in iobroker.

Best regards

Cannot read property 'subsystem' of null

Hallo Zusammen
Ich habe seit Anfang an immer den gleichen Fehler mit dem unifi Adapter

`

host.raspberrypi 2020-04-15 11:24:28.035 error Caught by controller[0]: at traverseArray (/opt/iobroker/node_modules/iobroker.unifi/main.js:165:7)
host.raspberrypi 2020-04-15 11:24:28.034 error Caught by controller[0]: at Array.every ()
host.raspberrypi 2020-04-15 11:24:28.034 error Caught by controller[0]: at /opt/iobroker/node_modules/iobroker.unifi/main.js:168:7
host.raspberrypi 2020-04-15 11:24:28.033 error Caught by controller[0]: at traverse (/opt/iobroker/node_modules/iobroker.unifi/main.js:155:5)
host.raspberrypi 2020-04-15 11:24:28.033 error Caught by controller[0]: at traverseObject (/opt/iobroker/node_modules/iobroker.unifi/main.js:178:27)
host.raspberrypi 2020-04-15 11:24:28.032 error Caught by controller[0]: at /opt/iobroker/node_modules/iobroker.unifi/main.js:288:13
host.raspberrypi 2020-04-15 11:24:28.031 error Caught by controller[0]: at traverse (/opt/iobroker/node_modules/iobroker.unifi/main.js:155:5)
host.raspberrypi 2020-04-15 11:24:28.031 error Caught by controller[0]: at traverseObject (/opt/iobroker/node_modules/iobroker.unifi/main.js:184:7)
host.raspberrypi 2020-04-15 11:24:28.030 error Caught by controller[0]: at traverse (/opt/iobroker/node_modules/iobroker.unifi/main.js:156:32)
host.raspberrypi 2020-04-15 11:24:28.029 error Caught by controller[0]: at /opt/iobroker/node_modules/iobroker.unifi/main.js:292:58
host.raspberrypi 2020-04-15 11:24:28.028 error Caught by controller[0]: TypeError: Cannot read property 'subsystem' of null
unifi.0 2020-04-15 11:24:27.485 info (6264) Terminated (NO_ERROR): Without reason
unifi.0 2020-04-15 11:24:27.481 info (6264) terminating
unifi.0 2020-04-15 11:24:27.414 info (6264) cleaned everything up...
unifi.0 2020-04-15 11:24:27.410 error (6264) TypeError: Cannot read property 'subsystem' of null at /opt/iobroker/node_modules/iobroker.unifi/main.js:292:58 at traverse (/opt/iobroker/node_modules/iobroker.unifi/main.js:156:32)
unifi.0 2020-04-15 11:24:27.408 error (6264) uncaught exception: Cannot read property 'subsystem' of null
unifi.0 2020-04-15 11:24:27.360 info (6264) getSitesStats: default
unifi.0 2020-04-15 11:24:24.276 info (6264) controller = 192.168.1.8:8443
unifi.0 2020-04-15 11:24:24.274 info (6264) update_interval = 60
unifi.0 2020-04-15 11:24:24.272 info (6264) Starting UniFi-Controller query
unifi.0 2020-04-15 11:24:24.195 info (6264) starting. Version 0.3.1 in /opt/iobroker/node_modules/iobroker.unifi, node: v10.20.1
`

Hat jemand eine Idee was ich noch machen kann? Ich habe den Login auch schon angepasst, damit es keine Sonderzeichen oder der gleichen beinhaltet. Leider geht es trotzdem nicht.

Adapter TOT! Nicht mehr verwenden!

Hallo zusammen,

heute habe ich was gelesen, wo sich jedem Informatiker die Nackenhaare aufstellen.
Kommt bloß nicht auf die Idee euren Unifi-Controller downzugraden nur damit ihr nen paar Datenpunkte im Iobroker bekommt.
Dieser Adapter wurde seit 2 Jahren nicht mehr aktuallisiert und ist somit als TOT zu betrachten.
Fangt euch für ein paar Datenpunkte kein anderen Risiken ein!!

Hoffe Herr Maus wird sich vielleicht irgendwann mal bequemen dem Adapter ein Update zu verpassen, oder es findet sich jemand anderes der ein wenig Javascript kann und hängt sich hier rein.

Add vouchers to the adapter

node-unifi functions:

  • getVouchers(sites, cb, create_time)
  • createVouchers(sites, minutes, cb, count, quota, note, up, down, mbytes)

api.err.Invalid 0.5.0 beta2

js-controller 3.1.0
Node.js 12.16.3
NPM 6.14.4

Adapter bleibt gelb. Folgende Log-Einträge:
`

unifi.0 2020-05-09 14:44:05.266 error (21251) Error: api.err.Invalid
unifi.0 2020-05-09 14:44:04.394 info (21251) UniFi adapter is ready
unifi.0 2020-05-09 14:44:04.374 info (21251) starting. Version 0.5.0-beta.2 in /opt/iobroker/node_modules/iobroker.unifi, node: v12.16.3, js-controller: 3.1.0
host.iobroker 2020-05-09 14:44:03.143 info instance system.adapter.unifi.0 started with pid 21251
host.iobroker 2020-05-09 14:44:03.114 info "system.adapter.unifi.0" enabled

`

Implement configuration of updateable objects

Users should have the possibility to select the objects they want to be updated. Things to concider:

  • Assumption: Most users only have one site. Therefore one configuration for all existing sites is fine.
  • Some objects are required for certain features (e.g. WLAN ID for enabling/disabling of WLANs)
  • What to do with existing objects, if user decides to not update them anymore? Same applies for blacklists.

set clients ap_mac to none when disconected

Could you implement, that the clients .clients.*.ap_mac is set to "none" or something that clarifies that the client is not connected to that AP anymore?
It would be best if this is set as early as possible for example by checking if .clients.*._uptime_by_uap hasn't increased on the latest update.

"Error: api.err.Invalid" after controller update to 5.12.66

Describe the bug
After updating my controller to 5.12.66 my adapter is failing to connect or receive any data..

Log
unifi.0 | 2020-05-14 11:12:25.508 | error | (9185) Error: api.err.Invalid
unifi.0 | 2020-05-14 11:12:23.729 | info | (9185) Unifi adapter is ready
unifi.0 | 2020-05-14 11:12:23.704 | info | (9185) starting. Version 0.4.3 in

Versions:

  • Adapter version: 0.4.3
  • JS-Controller version: 2.2.9
  • Node version: v10.20.1
  • Operating system: linux (docker container)

Bitte Objekte für Drahtlos-Netzwerke implementieren.

Es wäre schön wenn es für die einzelnen Drahtlos-Netzwerke entsprechende Objekte geben würde. Das aktivieren und deaktievieren einzelner WLAN sollte allerdings auch möglich sein um die Drahtlos-Netze via iobroker ein- und ausschalten zu können.

Adapter Grün keine Objekte Fehler im Log

Guten Tag zusammen,

leider bekomme ich den Unifi Adpater nicht zum laufen.

unifi.0 | 2019-08-17 13:10:13.070 | info | ERROR: Error: connect EHOSTUNREACH 192.168.2.13:8443
unifi.0 | 2019-08-17 13:10:10.075 | info | controller = 192.168.2.13:8443
unifi.0 | 2019-08-17 13:10:10.075 | info | update_interval = 60
unifi.0 | 2019-08-17 13:10:10.075 | info | Starting UniFi-Controller query
unifi.0 | 2019-08-17 13:10:10.075 | info | starting. Version 0.3.1 in /opt/iobroker/node_modules/iobroker.unifi, node: v8.16.0

Die IP stimmt komme über Chrome ja auf den Unifi.

Iobroker sowie Unifi laufen beide auf dem selben Gerät Synology NAS 218+

Unifi verwendet die Netzwerkschnittselle von der Nas bridge Mode
Iobroker hat eine eigene Ip mit macvlan

Wäre über Ideen dankbar

Gruß Julian

Unifi Adapter startet nicht

Hi,
ich habe gerade einen neuen unifi AP LR installiert und wollte den natürlich über den Unifi updater mit iobroker verbinden. Leider bekomme ich einen Fehler und alle Versuche diesen zu fixen sind fehlgeschlagen.
Node 4.81 (habe es aber schon vorher mit 4.7.3 versucht)
Auch deinstall und iobroker neustart usw - alles probiert. Anbei das log. Ich habe Zeile 283 aktiviert. Auch alle anderen Zeilen zu loggen. eine JSON kann ich nicht finden.
Objekte werden ebenfalls nicht angelegt. Es scheint, dass der Adapter sehr frueh aussteigt.

host.iobroker	2017-03-22 14:53:44.040	info	Restart adapter system.adapter.unifi.0 because enabled
host.iobroker	2017-03-22 14:53:44.039	error	instance system.adapter.unifi.0 terminated with code 0 (OK)
unifi.0	2017-03-22 14:53:44.030	debug	redis publish io.system.adapter.unifi.0.alive {"val":false,"ack":true,"ts":1490190824030,"q":0,"from":"system.adapter.unifi.0","lc":1490190824030}
unifi.0	2017-03-22 14:53:44.030	debug	redis publish io.system.adapter.unifi.0.alive {"val":false,"ack":true,"ts":1490190824030,"q":0,"from":"system.adapter.unifi.0","lc":1490190824030}
unifi.0	2017-03-22 14:53:44.029	debug	redis mget 1 1
unifi.0	2017-03-22 14:53:44.027	info	cleaned everything up...
unifi.0	2017-03-22 14:53:44.027	error	at ClientRequest.emit (events.js:169:7)
unifi.0	2017-03-22 14:53:44.027	error	at emitOne (events.js:77:13)
unifi.0	2017-03-22 14:53:44.027	error	at Request.onRequestError (/opt/iobroker/node_modules/iobroker.unifi/node_modules/node-unifi/node_modules/request/request.js:884:8)
unifi.0	2017-03-22 14:53:44.027	error	at Request.emit (events.js:169:7)
unifi.0	2017-03-22 14:53:44.027	error	at emitOne (events.js:82:20)
unifi.0	2017-03-22 14:53:44.027	error	at Request. (/opt/iobroker/node_modules/iobroker.unifi/node_modules/node-unifi/unifi.js:1099:11)
unifi.0	2017-03-22 14:53:44.027	error	at /opt/iobroker/node_modules/iobroker.unifi/node_modules/node-unifi/node_modules/async/dist/async.js:56:12
unifi.0	2017-03-22 14:53:44.027	error	at apply (/opt/iobroker/node_modules/iobroker.unifi/node_modules/node-unifi/node_modules/async/dist/async.js:21:25)
unifi.0	2017-03-22 14:53:44.027	error	at /opt/iobroker/node_modules/iobroker.unifi/node_modules/node-unifi/node_modules/async/dist/async.js:4956:25
unifi.0	2017-03-22 14:53:44.027	error	at /opt/iobroker/node_modules/iobroker.unifi/node_modules/node-unifi/node_modules/async/dist/async.js:840:32
unifi.0	2017-03-22 14:53:44.027	error	Error: Callback was already called.
unifi.0	2017-03-22 14:53:44.026	error	uncaught exception: Callback was already called.
unifi.0	2017-03-22 14:53:44.025	info	cleaned everything up...
unifi.0	2017-03-22 14:53:44.025	error	at ClientRequest.emit (events.js:169:7)
unifi.0	2017-03-22 14:53:44.025	error	at emitOne (events.js:77:13)
unifi.0	2017-03-22 14:53:44.025	error	at Request.onRequestError (/opt/iobroker/node_modules/iobroker.unifi/node_modules/node-unifi/node_modules/request/request.js:884:8)
unifi.0	2017-03-22 14:53:44.025	error	at Request.emit (events.js:169:7)
unifi.0	2017-03-22 14:53:44.025	error	at emitOne (events.js:82:20)
unifi.0	2017-03-22 14:53:44.025	error	at Request. (/opt/iobroker/node_modules/iobroker.unifi/node_modules/node-unifi/unifi.js:1099:11)
unifi.0	2017-03-22 14:53:44.025	error	at /opt/iobroker/node_modules/iobroker.unifi/node_modules/node-unifi/node_modules/async/dist/async.js:56:12
unifi.0	2017-03-22 14:53:44.025	error	at apply (/opt/iobroker/node_modules/iobroker.unifi/node_modules/node-unifi/node_modules/async/dist/async.js:21:25)
unifi.0	2017-03-22 14:53:44.025	error	at /opt/iobroker/node_modules/iobroker.unifi/node_modules/node-unifi/node_modules/async/dist/async.js:4956:25
unifi.0	2017-03-22 14:53:44.025	error	at /opt/iobroker/node_modules/iobroker.unifi/node_modules/node-unifi/node_modules/async/dist/async.js:840:32
unifi.0	2017-03-22 14:53:44.025	error	Error: Callback was already called.
unifi.0	2017-03-22 14:53:44.023	error	uncaught exception: Callback was already called.
unifi.0	2017-03-22 14:53:44.020	info	ERROR: ERROR: [object Object]
unifi.0	2017-03-22 14:53:44.015	debug	redis publish io.system.adapter.unifi.0.outputCount {"val":8,"ack":true,"ts":1490190824015,"q":0,"from":"system.adapter.unifi.0","lc":1490187778531}
unifi.0	2017-03-22 14:53:44.015	debug	redis publish io.system.adapter.unifi.0.inputCount {"val":0,"ack":true,"ts":1490190824015,"q":0,"from":"system.adapter.unifi.0","lc":1490187778531}
unifi.0	2017-03-22 14:53:44.014	debug	redis publish io.system.adapter.unifi.0.uptime {"val":0,"ack":true,"ts":1490190824014,"q":0,"from":"system.adapter.unifi.0","lc":1490183717263}
unifi.0	2017-03-22 14:53:44.014	debug	redis publish io.system.adapter.unifi.0.memHeapUsed {"val":9.89,"ack":true,"ts":1490190824014,"q":0,"from":"system.adapter.unifi.0","lc":1490190824014}
unifi.0	2017-03-22 14:53:44.014	debug	redis publish io.system.adapter.unifi.0.memHeapTotal {"val":16.26,"ack":true,"ts":1490190824014,"q":0,"from":"system.adapter.unifi.0","lc":1490181971384}
unifi.0	2017-03-22 14:53:44.013	debug	redis publish io.system.adapter.unifi.0.memRss {"val":28.23,"ack":true,"ts":1490190824013,"q":0,"from":"system.adapter.unifi.0","lc":1490190824013}
unifi.0	2017-03-22 14:53:44.013	debug	redis publish io.system.adapter.unifi.0.connected {"val":true,"ack":true,"ts":1490190824012,"q":0,"from":"system.adapter.unifi.0","lc":1490190824012}
unifi.0	2017-03-22 14:53:44.012	debug	redis publish io.system.adapter.unifi.0.alive {"val":true,"ack":true,"ts":1490190824012,"q":0,"from":"system.adapter.unifi.0","lc":1490190824012}
unifi.0	2017-03-22 14:53:44.011	debug	redis keys 1 *.logging
unifi.0	2017-03-22 14:53:43.993	debug	redis psubscribe io.unifi.0.checkLogging
unifi.0	2017-03-22 14:53:43.789	info	controller = 192.168.0.126:8443
unifi.0	2017-03-22 14:53:43.789	info	update_interval = 60
unifi.0	2017-03-22 14:53:43.788	info	Starting UniFi-Controller query

Fix issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.unifi

  • [E150] No common.connectionType found in io-package.json
  • [E152] No common.dataSource found in io-package.json
  • [E154] common.dependencies must contain {"js-controller": ">=2.0.0"} or {"js-controller": ">=3.0.0"}
  • [E605] No actual year found in copyright. Please add "Copyright (c) 2016-2022 braindead1 [email protected]" at the end of README.md
  • [E701] No actual year found in LICENSE. Please add "Copyright (c) 2016-2022 braindead1 [email protected]" at the start of LICENSE
  • [E816] file tsconfig.json found in repository, but not found in .npmignore

Thanks,
your automatic adapter checker.

Keine Aktualisierung der Clientdaten

Auch wenn die Entwicklung des Adapters leider tot zu sein scheint, muss ich doch was loswerden.
Die States unter Clients werden mal so überhaupt nicht aktualisiert. (z.B. wenn ein Client nicht mehr im WLAN ist, bleibt der state "noted" immer auf true.

Temperature of Security Gateway 4P missing in 0.5.0

In der 0.4.x war es möglich die 4 Temperaturen des Security Gateway 4P auszulesen.
das ist in der 0.5.x Reihe aktuell nicht möglich wäre aber schön wenn das wieder einfließen würde.

In 0.4.x it was possible to read out the 4 temperatures of the Security Gateway 4P.
this is currently not possible in the 0.5.x series but it would be nice if this would be included again.

(17321) Adapter deactivated due to missing configuration.

Hi,

I used the old Unifi adapter which was working fine.
As per instruction I uninstalled the old Unifi adapter before installing 0.5.0.
I entered my credentials and clicked through the configuration pages.
I saved and started the adapter.
Then it immediately terminated again with:
(17321) Adapter deactivated due to missing configuration.

Tried uninstalling and installing again. Same problem.

  • Adapter version: 0.5.0
  • JS-Controller version: 3.1.0
  • Node version: 10.20.1
  • Operating system: Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-96-generic x86_64)

Thanks for help,
Alex

Zu viele Objekte im ioBroker

Erst einmal vielen Dank für den super Adapter für den IOBroker! Genau das, was ich gesucht habe!

Hier mein Problem:
Ich habe einen Unifi-Controller mit 4 Devices (USG, 24-Port Switch und 2 APs - es hängen 26 Endgeräte daran) laufen. Die Abfrage bringt binnen 3 Sekunden mehr als 200 Events, weshalb permanent eine Fehlermeldung auftritt. Eine Anpassung, welche Daten ausgelesen werden sollen, wäre hilfreich. Man braucht ja nicht alle Informationen jedes Mal auslesen. Zwei Abfragemodi, welche separat getimed werden können und deren Auslese-Optionen angepasst werden können, wäre perfekt. Dann kann man z.B. alle 10 oder 15 oder 60 Minuten eine "große" Abfrage starten und eine kleine alle 10 oder 30 oder 60 Sekunden eine "kleine" Abfrage. Abfrageinhalte sollten selbst bestimmt werden können, da die große Abfrage (wenn sie denn alles umfassen würde), schon bei meiner Umgebung den Rahmen des IOBroker komplett sprengt.

Uptime in stunden

Ist es möglich die Uptime in stunden zu bekommen ? XXXXXXX Sekunden ist schon eine echt lange zahl.

??

Please add your adapter to ioBroker.discovery

I am an automatic service from ioBroker that searches adapters and makes suggestions.

I noticed that your adapter is not integrated in the ioBroker.discovery. Using the Discovery adapter, ioBroker can automatically find devices or suggest services to the user for installation. If possible I would live to see your adapter added there.

Some adapters have already been added and you can use them as blueprints. See: https://github.com/ioBroker/ioBroker.discovery You need to fork this project and then create a PR for your adapter to be added.

Basically the plugins can do HTTP calls, UDP discovery, MDNS, UPNP and will iterate over all devices found by IP scan and check local serial ports. If you want you can also add new discovery methods but please try to do that with at least dependencies as possible.

Then create one file under lib/adapters for your adapter to implement the detection and proposal of an instance to the user.

On questions, the other developers will support in the forum or via GitHub issues too.

If no detection is possible, simply close this issue and I won't bother you again. ;-)

Thanks,
your automatic adapter checker.

P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

Speedtest results don't include throughput

Describe the bug
unifi.0.default.health.www.speedtest is missing upload/download results from last speedtest. Only latency and success is enumerated.

Expected behavior
The node should show the complete set of speedtest results, including measured up/down throughput.

Versions:

  • Adapter version: 0.5.1-b3

Additional context
I'm using the adapter with an UDMP 1.7. Prior to using it, I used a node red flow to query the UDM and parsed the returned JSON. Therefore I've seen that the health/www branch also included the throughput results. Maybe it's just a matter of parsing the desired node.

Adapter wird grün, bekomme aber API Fehler im Log

Hier die relevanten ioBroker Log-Einträge:

unifi.0 2018-12-05 03:10:20.616 info ERROR: api.err.Invalid
unifi.0 2018-12-05 03:10:20.015 info controller = 192.168.0.3:8443
unifi.0 2018-12-05 03:10:20.015 info update_interval = 30
unifi.0 2018-12-05 03:10:20.013 info Starting UniFi-Controller query
unifi.0 2018-12-05 03:10:19.979 info starting. Version 0.3.1 in /opt/iobroker/node_modules/iobroker.unifi, node: v6.14.4

Weitere DPs (PoE / WiFi)

Mein Wunsch nach weiteren DPs:

Pro Port (Switche):
poe_class
poe_power
poe_current
poe_voltage

Pro Band (APs):
tx_power
cu_self_tx
cu_self_rx

Adopt logging behavior of the adapter

I have configured loglevel "warn" in the iobroker.json and the unifi adapter is still logging infos every minute (udpate interval of the unifi instance).

All over adapters work as expected (only logging warnings and errors) so it seems that this is a misbehavior of the unifi adapter.

Include API URLs in README

Update README to include the URLs of the API the UniFi adapter uses. Users can use the URLs to find and report missing states.

Fehlermeldung bei Vouchers

Mit der 0.5.2 habe ich plötzlich eine Fehlermeldung wenn ich Vouchers aktiv habe:

host.ioBroker 2020-05-27 21:59:38.283 info instance system.adapter.unifi.0 terminated with code 0 (NO_ERROR) host.ioBroker 2020-05-27 21:59:38.282 error Caught by controller[1]: at /opt/iobroker/node_modules/iobroker.unifi/main.js:633:21 host.ioBroker 2020-05-27 21:59:38.282 error Caught by controller[1]: at Unifi.processVouchers (/opt/iobroker/node_modules/iobroker.unifi/main.js:653:13) host.ioBroker 2020-05-27 21:59:38.282 error Caught by controller[1]: at processTicksAndRejections (internal/process/task_queues.js:97:5) host.ioBroker 2020-05-27 21:59:38.282 error Caught by controller[1]: at runMicrotasks (<anonymous>) host.ioBroker 2020-05-27 21:59:38.282 error Caught by controller[1]: at Unifi.applyJsonLogic (/opt/iobroker/node_modules/iobroker.unifi/main.js:903:44) host.ioBroker 2020-05-27 21:59:38.281 error Caught by controller[1]: at Unifi.applyJsonLogic (/opt/iobroker/node_modules/iobroker.unifi/main.js:791:42) host.ioBroker 2020-05-27 21:59:38.281 error Caught by controller[1]: at Unifi.applyRule (/opt/iobroker/node_modules/iobroker.unifi/main.js:926:26) host.ioBroker 2020-05-27 21:59:38.281 error Caught by controller[1]: at Object.jsonLogic.apply (/opt/iobroker/node_modules/json-logic-js/logic.js:352:29) host.ioBroker 2020-05-27 21:59:38.281 error Caught by controller[1]: at Array.<anonymous> (/opt/iobroker/node_modules/iobroker.unifi/admin/lib/json_logic.js:57:20) host.ioBroker 2020-05-27 21:59:38.280 error Caught by controller[1]: TypeError: Cannot read property 'replace' of null host.ioBroker 2020-05-27 21:59:38.280 error Caught by controller[0]: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejecte unifi.0 2020-05-27 21:59:37.728 error at /opt/iobroker/node_modules/iobroker.unifi/main.js:633:21 unifi.0 2020-05-27 21:59:37.728 error at Unifi.processVouchers (/opt/iobroker/node_modules/iobroker.unifi/main.js:653:13) unifi.0 2020-05-27 21:59:37.728 error at processTicksAndRejections (internal/process/task_queues.js:97:5) unifi.0 2020-05-27 21:59:37.728 error at runMicrotasks (<anonymous>) unifi.0 2020-05-27 21:59:37.728 error at Unifi.applyJsonLogic (/opt/iobroker/node_modules/iobroker.unifi/main.js:903:44) unifi.0 2020-05-27 21:59:37.728 error at Unifi.applyJsonLogic (/opt/iobroker/node_modules/iobroker.unifi/main.js:791:42) unifi.0 2020-05-27 21:59:37.728 error at Unifi.applyRule (/opt/iobroker/node_modules/iobroker.unifi/main.js:926:26) unifi.0 2020-05-27 21:59:37.728 error at Object.jsonLogic.apply (/opt/iobroker/node_modules/json-logic-js/logic.js:352:29) unifi.0 2020-05-27 21:59:37.728 error at Array.<anonymous> (/opt/iobroker/node_modules/iobroker.unifi/admin/lib/json_logic.js:57:20) unifi.0 2020-05-27 21:59:37.728 error (5747) TypeError: Cannot read property 'replace' of null unifi.0 2020-05-27 21:59:37.722 error (5747) unhandled promise rejection: Cannot read property 'replace' of null Unhandled 2020-05-27 21:59:37.717 error promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). host.ioBroker 2020-05-27 21:59:28.149 info instance system.adapter.unifi.0 started with pid 5747
Wenn ich den Haken bei "Vouchers aktualisieren" rausnehme ist die Meldung weg. Mit der vorherigen Version hat das noch fehlerlos geklappt.

Adapter stürzt ab, wenn ein USG hinzugefügt wird.

Nach dem hinzufügen des USG im Controller kann der Adapter scheinbar keine Daten mehr auslesen. Wenn das USG wieder entfernt wird (Controller->Forget Device) , funktioniert es wieder problemlos. Laut Google läuft es aber bei einigen scheinbar trotz USG im Netzwerk.

Hat da schon jemand was herausgefunden ?

Hier das Log , nachdem das USG hinzugefügt wurde:

2019-03-14 16:05:25.099 - info: unifi.0 starting. Version 0.3.1 in /opt/iobroker/node_modules/iobroker.unifi, node: v8.15.0
2019-03-14 16:05:25.105 - info: unifi.0 Starting UniFi-Controller query
2019-03-14 16:05:25.106 - info: unifi.0 update_interval = 60
2019-03-14 16:05:25.106 - info: unifi.0 controller = 127.0.0.1:8443
2019-03-14 16:05:25.900 - info: unifi.0 getSitesStats: default
2019-03-14 16:05:25.909 - error: unifi.0 uncaught exception: Cannot read property 'subsystem' of null
2019-03-14 16:05:25.909 - error: unifi.0 TypeError: Cannot read property 'subsystem' of null
at /opt/iobroker/node_modules/iobroker.unifi/main.js:292:58
at traverse (/opt/iobroker/node_modules/iobroker.unifi/main.js:156:32)
at traverseObject (/opt/iobroker/node_modules/iobroker.unifi/main.js:184:7)
at traverse (/opt/iobroker/node_modules/iobroker.unifi/main.js:155:5)
at /opt/iobroker/node_modules/iobroker.unifi/main.js:288:13
at traverseObject (/opt/iobroker/node_modules/iobroker.unifi/main.js:178:27)
at traverse (/opt/iobroker/node_modules/iobroker.unifi/main.js:155:5)
at /opt/iobroker/node_modules/iobroker.unifi/main.js:168:7
at Array.every ()
at traverseArray (/opt/iobroker/node_modules/iobroker.unifi/main.js:165:7)
2019-03-14 16:05:25.910 - info: unifi.0 cleaned everything up...
2019-03-14 16:05:25.934 - error: Caught by controller[0]: TypeError: Cannot read property 'subsystem' of null
2019-03-14 16:05:25.935 - error: Caught by controller[0]: at /opt/iobroker/node_modules/iobroker.unifi/main.js:292:58
2019-03-14 16:05:25.935 - error: Caught by controller[0]: at traverse (/opt/iobroker/node_modules/iobroker.unifi/main.js:156:32)
2019-03-14 16:05:25.935 - error: Caught by controller[0]: at traverseObject (/opt/iobroker/node_modules/iobroker.unifi/main.js:184:7)
2019-03-14 16:05:25.935 - error: Caught by controller[0]: at traverse (/opt/iobroker/node_modules/iobroker.unifi/main.js:155:5)
2019-03-14 16:05:25.935 - error: Caught by controller[0]: at /opt/iobroker/node_modules/iobroker.unifi/main.js:288:13
2019-03-14 16:05:25.935 - error: Caught by controller[0]: at traverseObject (/opt/iobroker/node_modules/iobroker.unifi/main.js:178:27)
2019-03-14 16:05:25.935 - error: Caught by controller[0]: at traverse (/opt/iobroker/node_modules/iobroker.unifi/main.js:155:5)
2019-03-14 16:05:25.935 - error: Caught by controller[0]: at /opt/iobroker/node_modules/iobroker.unifi/main.js:168:7
2019-03-14 16:05:25.935 - error: Caught by controller[0]: at Array.every ()
2019-03-14 16:05:25.935 - error: Caught by controller[0]: at traverseArray (/opt/iobroker/node_modules/iobroker.unifi/main.js:165:7)
2019-03-14 16:05:25.936 - error: host.nuc1 instance system.adapter.unifi.0 terminated with code 0 (OK)
2019-03-14 16:05:25.936 - info: host.nuc1 Restart adapter system.adapter.unifi.0 because enabled

"is online" state

Hello,

with the following commit the online status should also be visible as dp in iobroker.
37c4c44

Unfortunately I could not find it after updating to the latest version.

is_online is not calculated

Describe the bug
After enabling is_online, the state is created for every client but has no value.

To Reproduce
Steps to reproduce the behavior:
Activate state "isonline" in Objects-Selection in section "Clients":
image

Expected behavior
is_online should either show true or false depending on the availability of the client.

Versions:

  • Adapter version: 0.5.2
  • JS-Controller version: 2.2.9
  • Node version: 10.20.1
  • Operating system: Raspbian

Additional context
There's a note to enable both, last_seen_by_uap und last_seen_by_usw, for this feature to work. I have no USW but enabled it as noted. Is a USW required for this to work?
image

image

Add Discovery Support for this Adapter

Hey,

please check out the Discovery-Adapter (https://github.com/ioBroker/ioBroker.discovery) and check if the device can be detected somehow (special url with defined answer, special port, upnp, udp or other technologies?!). If yes it would great if you could add a pull request to the Discovery-Adapter with the needed code.
Support needed? Contact me (Apollon77) in Forum as forum thread or PN ;-)

Ingo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.