Code: Select all
for i in 1 2 3; do qcsapi_sockrpc get_station_mac_addr wifi0 $i; done
Moderator: leecollings
Code: Select all
for i in 1 2 3; do qcsapi_sockrpc get_station_mac_addr wifi0 $i; done
I missed this postEscApe wrote: ↑Monday 27 August 2018 21:45 @wizzard72
My bad The router os does not have the seq command.
If that was the only problem, then this should work (at least the loop works on my asus with dummy echo commands)If it doesn't can you try the following script on the router itself and share the output?Code: Select all
pollscript=pollscript + ";concount=$(qcsapi_sockrpc get_count_assoc " + knownif + ");i=1;while [[ $i -le $concount ]]; do qcsapi_sockrpc get_station_mac_addr " + knownif + " $i;i=$((i+1));done"
If the script on the router works but the plugin doesn't then i'm very interested in the debug log. You can share it as PM if you want to keep mac addresses and such secret.Code: Select all
concount=$(qcsapi_sockrpc get_count_assoc wifi0) i=1 while [[ $i -le $concount ]]; do qcsapi_sockrpc get_station_mac_addr wifi0 $i i=$((i+1)) done
EDIT: Did you try if get_station_mac_addr is indeed faster (real-time'ish) then get_assoc_records? Otherwise getting this loop to work might be a waste of time for both of us.
Code: Select all
pollscript=pollscript + ";concount=$(qcsapi_sockrpc get_count_assoc " + knownif + ");i=1;while [[ $i -le $concount ]]; do qcsapi_sockrpc get_station_mac_addr " + knownif + " $i;i=$((i+1));done"
That's good news!This is working:Code: Select all
pollscript=pollscript + ";concount=$(qcsapi_sockrpc get_count_assoc " + knownif + ");i=1;while [[ $i -le $concount ]]; do qcsapi_sockrpc get_station_mac_addr " + knownif + " $i;i=$((i+1));done"
EscApe wrote:Yes it's working perfectly. It's fast and accurate. Thank you for adjusting the plugin so it works with the AC87U. It's very appreciated.That's good news!
So the AC87 is now queried on both chipsets and the plugin is responding quickly to absence/presence?
+ on that dealing with the same issue with an external AC87 and my own AC68.mvzut wrote: ↑Wednesday 29 August 2018 11:46 I can also confirm it works on my AC87U!
However, for normal use I have to revert to the #forcegeneric flag, as it will not detect devices which are picked up by my (wired) second access point. Would be great if a better solution could once be found for this. Adding the plugin a second time for my other access point probably won't work, it's a pretty old router. Plus it gives me double the amount of switches which requires extra logic.
This updated plugin works good alsoEscApe wrote: ↑Tuesday 28 August 2018 10:38That's good news!This is working:Code: Select all
pollscript=pollscript + ";concount=$(qcsapi_sockrpc get_count_assoc " + knownif + ");i=1;while [[ $i -le $concount ]]; do qcsapi_sockrpc get_station_mac_addr " + knownif + " $i;i=$((i+1));done"
So the AC87 is now queried on both chipsets and the plugin is responding quickly to absence/presence?
Thanks again for all of you digging around for information en experimenting! I think the plugin should be ready for "production" now, but would love to hear from other testers if they encounter any trouble on the AC87 or other routers.
The latest changes and some extra error handling are in this new version. It is running fine on my (single brand chipset) AC86 and should also work for the AC87 and many other routers. I'm not sure if anybody else is testing, but if i don't get any complaints i will soon publish this version on GitHub.
For now it should still be considered 'experimental' but i would like to encourage everyone to try this version and share your findings. You can easily go back to the previous version, which is still on GitHub.
(remove the .txt extension and replace the original plugin.py with this one. It still needs the other (icon) files included with the original plugin.
Code: Select all
2018-08-29 17:55:54.277 Status: (IemandThuisDetector) Started.
2018-08-29 17:55:54.635 Status: (IemandThuisDetector) Entering work loop.
2018-08-29 17:55:54.637 Status: (IemandThuisDetector) Initialized version 0.4.5, author 'ESCape'
2018-08-29 17:55:55.357 Status: (IemandThuisDetector) Using chipset specific (wl) command on router for interfaces ['eth1']
2018-08-29 17:55:55.357 Status: (IemandThuisDetector) Using chipset specific (qcsapi_sockrpc) command on router for interfaces ['wifi0']
2018-08-29 17:56:04.619 Status: (IemandThuisDetector) Homecount=0; Gonecount=0; Totalmacs=2
2018-08-29 17:56:04.619 Status: (IemandThuisDetector) Awaiting confirmation on absence of 2 devices
Code: Select all
2018-08-29 17:58:09.767 Status: (IemandThuisDetector) Started.
2018-08-29 17:58:10.111 Status: (IemandThuisDetector) Entering work loop.
2018-08-29 17:58:10.113 Status: (IemandThuisDetector) Initialized version 0.4.5, author 'ESCape'
2018-08-29 17:58:10.634 Status: (IemandThuisDetector) Using generic (brctl) instead of chipset specific command on router (slower response to absence)
2018-08-29 17:58:20.193 Status: (IemandThuisDetector) Homecount=1; Gonecount=1; Totalmacs=2
2018-08-29 17:58:20.193 Status: (IemandThuisDetector) Awaiting confirmation on absence of 1 devices
Ah, okay.. ThnxEscApe wrote: ↑Wednesday 29 August 2018 19:47 @BarryT
Actually it is working as intended, since idea behind the plugin is directly monitoring the wifi chipset from the OS of the device. The router in your case can not monitor a chip that is in a different device.
If you only use wifi on the AP then you should let the plugin connect to the AP instead of the router. The plugin is all about wifi chipsets and has nothing to do with dhcp or routing.
Great!EscApe wrote: If you can keep an eye on the arp reliability i would love to hear how it behaves in your setup over a longer period of time.
Users browsing this forum: underscore4 and 1 guest