Comments (4)
Although I understand your point, I don't think that resetting states based on the online status of a client is the way to go. Which states should be resetted? Only the one you proposed or all? What about devices? Should they be treated the same way?
Instead I'm working on implementing the new state .clients.*.is_online
. The state will be calculated for all clients and devices and will reflect the online status.
from iobroker.unifi.
Instead I'm working on implementing the new state .clients.*.is_online. The state will be calculated for all clients and devices and will reflect the online status.
That would already solve my problem.
I'm planing to keep track of client-devices and their position by signal strength and connected AP. therefor it is misleading to report a connected AP when the client isn't actually connected. But if there will be a is_online
state this would make it simple to simply ignore the reported AP.
Furthermore, a Presence checkup would be simplified to the highest extent by your implementation.
What is your time schedule for that?
Can I contribute in any way?
Please keep reporting speed on high priority for that reporting. Preferably monitor uptime stalls instead of waiting for Unifi to report a definitive disconnect. Unify is terribly slow on detecting disconnects in my opinion.
from iobroker.unifi.
I'm planing to keep track of client-devices and their position by signal strength and connected AP. therefor it is misleading to report a connected AP when the client isn't actually connected.
The adapter polls the UniFi controller at a defined intervall. In my tests it turned out, that disconnected clients are not included in the response really fast (usually with the next poll). The adapter uses the response to only update clients that are included in the controllers response. Therefore the adapter is not reporting a connected AP when the client is not connected. It simply does not update/remove existing information.
Furthermore, a Presence checkup would be simplified to the highest extent by your implementation.
What is your time schedule for that?
v0.5.1 is already on it's way into beta testing. It includes WLAN on/off, the creation of vouchers and more states for clients and devices.
Setting the is_online
state for connected clients/devices is easy to implement with the underlying JsonLogic. I just need to select the state to use for the calculation (e.g. .clients.*._uptime_by_uap
) and find a smart way to update not connected clients/devices. Maybe the state finds it's way into v0.5.1.
Unify is terribly slow on detecting disconnects in my opinion.
As I said above, the UniFi controller is actually really fast in detecting disconnected clients and not including it in the response anymore. You can try it yourself by comparing the update of the states of a connected and a disconnected client in ioBroker. You'll notice that only the states of the connected client will be updated.
I don't know your usecase, but IMHO it is more important to get an instant feedback on connected devices (e.g. to turn on the light), than on disconnected devices as I see a huge risk of false positives (e.g. due to a restarting client/device). Therefore my personal usecase includes a buffer time when triggering an action based on disconnected clients/devices.
Besides that I noticed that many users use the states in their VIS visualization and maybe this is the background of your questions. Everything that is related to VIS visualization is not in scope of the adapter. If states need to be transferred to look nice in a VIS visualization, this has to be done outside of the adapter (e.g. with scripts). The problem is the variety of user demands I don't want to take care of (e.g. User A wants the list of connected clients to appear in red, whereas User B wants blue).
from iobroker.unifi.
Implemented is_online
state for clients with 37c4c44 and 90b0d1b.
from iobroker.unifi.
Related Issues (20)
- AxiosError: Request failed with status code 500
- TypeError: Cannot read properties of undefined (reading 'reconnectClient')
- TypeError: Cannot read properties of undefined (reading 'unblockClient')
- TypeError: data.map is not a function
- Error timeout Axios HOT 23
- Update stable version in repo from 0.6.6 to 0.6.7 HOT 1
- AxiosError: timeout of 10000ms exceeded HOT 1
- Warning for alarm sync - Excessive number of states created HOT 1
- Online status of adapter not showing correctly HOT 2
- 2FA not Working HOT 5
- multi-factor authentication - beginning July 22, 2024 HOT 1
- error: timeout of 5000ms exceeded, stack: AxiosError Adapter Absturz HOT 2
- Update stable version in repo from 0.6.7 to 0.7.0 HOT 1
- Turn on / off switch port
- State "blocked" is missing on wired devices
- error: Cannot read properties of undefined (reading 'getAccessDevices')
- Adapter stops updating client states HOT 2
- Gateway Ultra HOT 2
- No current data since MFA activation HOT 1
- Not possible to activate or deactivate Wlan HOT 4
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 iobroker.unifi.