Would you consider adding a few states to client devices?
If you grab the data from this endpoint:
- Code: Select all
... /stat/report/5minute.user
params:
interval: '5minutes',
mac: <mac-address>,
start: <current-epoch-in-ms>
you'll get:
- Code: Select all
{'rx_bytes': 79681.82352941176, 'tx_bytes': 4924685.94117647, 'time': 1612926300000, 'user': 'xx:xx:xx:xx:xx:xx', 'o': 'user', 'oid': 'xx:xx:xx:xx:xx:xx'}
this could become, for a particular Indigo device representing:
states['data_5min_rx'] => 79681.82352941176
states['data_5min_tx'] => 4924685.94117647
states['data_5min_time'] => 1612926300
And this could be extended to cover the 'hourly' and 'daily' intervals.
I'm trying to determine some advanced presence knowing the current RSSI of a given client as measured at each AP, and then combining that with data usage for the past 5 minutes. Something like the trilateration that you do for PiBeacon, but simpler. This could tell me, for example, that even though no motion was noticed in the lounge, a laptop and phone had "meaningful threshold" data usage from the AP in that room, so maybe someone is sitting motionless while browsing the web. (Or someone left their phone on YouTube and left...)
Just a thought....