DD-WRTiles - List clients in tile optic

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Goto page 1, 2  Next
Author Message
chromoxdor
DD-WRT Novice


Joined: 02 Dec 2014
Posts: 44

PostPosted: Tue Aug 08, 2023 12:04    Post subject: DD-WRTiles - List clients in tile optic Reply with quote
Since there is no right category for it, i'm posting it here:

I was in need of having an easier access to the data of connected clients.
So i wrote, with my very limited knowledge of programming, a parser that combines the Data of DHCP-Clients, WiFi-Clients and Active-Clients to have an overview of the data that is important for me.
Getting online/offline/webserver status was easy for WiFi-Clients but for wired connections it took me a while since with javascript you have very limited capability regarding the network status of devices. But it seems getting the status via the ARP table of the router works fine enough.

Go and grep your copy of DD-WRTiles (for simplicity its actually dd.html) here:
https://github.com/chromoxdor/DD-WRTiles

Copy it to whatever storage is mounted on your router and make a startup command containing this:
Code:
cp <path to file>/dd.html /tmp/www/dd.html



dd.gif
 Description:
 Filesize:  7.01 MB
 Viewed:  2732 Time(s)

dd.gif



overview.png
 Description:
 Filesize:  141.7 KB
 Viewed:  2732 Time(s)

overview.png


Sponsor
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6447
Location: UK, London, just across the river..

PostPosted: Tue Aug 08, 2023 12:23    Post subject: Reply with quote
status: error 404
_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
chromoxdor
DD-WRT Novice


Joined: 02 Dec 2014
Posts: 44

PostPosted: Tue Aug 08, 2023 12:26    Post subject: Reply with quote
Alozaros wrote:
status: error 404

That can happen to the best of us Very Happy
Maybe you can elaborate a bit where you stumbled upon it...

EDIT: i forgot to mention, that the page will be accessible via "http://<router-ip>/user/dd.html"
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1958

PostPosted: Tue Aug 08, 2023 13:37    Post subject: Reply with quote
No, he's saying that https://github.com/chromoxdor/DD-WRTiles gives a 404 not found error. Do you have to be logged into GitHub to see it? It's not visible in your repositories, either.
_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
chromoxdor
DD-WRT Novice


Joined: 02 Dec 2014
Posts: 44

PostPosted: Tue Aug 08, 2023 14:03    Post subject: Reply with quote
dale_gribble39 wrote:
No, he's saying that https://github.com/chromoxdor/DD-WRTiles gives a 404 not found error. Do you have to be logged into GitHub to see it? It's not visible in your repositories, either.


I forgot to make it public Rolling Eyes
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14249
Location: Texas, USA

PostPosted: Tue Aug 08, 2023 16:36    Post subject: Reply with quote
Are all those functions in current DD-WRT webUI code? Seems that everything in the "Test" folder would be required. Can't call functions that do not exist.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
chromoxdor
DD-WRT Novice


Joined: 02 Dec 2014
Posts: 44

PostPosted: Tue Aug 08, 2023 16:52    Post subject: Reply with quote
kernel-panic69 wrote:
Are all those functions in current DD-WRT webUI code? Seems that everything in the "Test" folder would be required. Can't call functions that do not exist.


All the functions in the test folder are combined with the css and html to the dd.html

The functions call basically every x seconds the sites "Status_Lan.live.asp" and "Status_Wireless.live.asp"
The content then is parsed and combined to create html.

Edit: The only reason dd.html needs to be hosted on the router is, that otherwise you would get CORS errors.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14249
Location: Texas, USA

PostPosted: Tue Aug 08, 2023 17:41    Post subject: Reply with quote
Guess I didn't look at it close enough, but I did notice a hard-coded router IP address, which is probably not a good idea. File would require editing to fix the issue.
Code:
fetch("http://192.168.1.1/Status_Lan.live.asp",{method:"GET",credentials:"include"});

Code:
fetch("http://192.168.1.1/Status_Wireless.live.asp",{method:"GET",credentials:"include"});

I *don't think* that the old MyPage coding has this issue, but it's been a hot minute and many changes to local development and I'm old and have slept since then...

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
chromoxdor
DD-WRT Novice


Joined: 02 Dec 2014
Posts: 44

PostPosted: Tue Aug 08, 2023 18:44    Post subject: Reply with quote
kernel-panic69 wrote:
Guess I didn't look at it close enough, but I did notice a hard-coded router IP address


Oh man.. thanks for the info...just fixed that.

Quote:
I *don't think* that the old MyPage coding has this issue, but it's been a hot minute and many changes to local development and I'm old and have slept since then...


I´ve never looked at this but i am old too and lazy. Thats why i basically reused the code of another project of mine for this. Smile
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Wed Aug 09, 2023 11:11    Post subject: Reply with quote
Thanks nice work Smile
_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
chromoxdor
DD-WRT Novice


Joined: 02 Dec 2014
Posts: 44

PostPosted: Fri Aug 18, 2023 7:50    Post subject: Reply with quote
egc wrote:
Thanks nice work Smile


Thank you! Smile

Even though i am not sure if anyone other than me will use this i did some improvements:
- added: RX/TX and offline clients to the "show" menu
- added: settings menu
- added: choose background
- added: color picker
- added: better responsiveness
- added: scaling for very small displays
- fixed: tile handling with a huge amount of tiles
- removed: theme switching
- restructured the readable code

BTW, I use this script in Administration/Commands/Startup:
Code:
#!/bin/sh

while [ ! "$(grep -s '/mnt/sda1' /proc/mounts)" ]; do
 sleep 1
 done
ln -s /mnt/sda1/www/dd.html /tmp/www/dd.html


It will wait after a reboot until the storage is mounted and then copy the file.



ddwrtiles1.jpg
 Description:
 Filesize:  335.8 KB
 Viewed:  2440 Time(s)

ddwrtiles1.jpg


mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1858
Location: Hung Hom, Hong Kong

PostPosted: Sun Aug 20, 2023 18:27    Post subject: Re: DD-WRTiles - List clients in tile optic Reply with quote
chromoxdor wrote:
Since there is no right category for it, i'm posting it here:

The following area should be appropriate:

DD-WRT :: View Forum - Contributions Upload
https://forum.dd-wrt.com/phpBB2/viewforum.php?f=11

It would be great if there is a console command to do the same, which is usable by your dd.html!

There is something related in the Contributions Upload area:

DD-WRT :: View topic - Script to sort static leases
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=288629

DD-WRT :: View topic - Synchonize DHCP leases from a CSV-file to a dd-wrt router
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=154190

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
chromoxdor
DD-WRT Novice


Joined: 02 Dec 2014
Posts: 44

PostPosted: Mon Aug 21, 2023 8:16    Post subject: Re: DD-WRTiles - List clients in tile optic Reply with quote
mwchang wrote:

The following area should be appropriate:

DD-WRT :: View Forum - Contributions Upload
https://forum.dd-wrt.com/phpBB2/viewforum.php?f=11


Thanks for the hint. If somebody could place my thread there I'd be happy.

mwchang wrote:

There is something related in the Contributions Upload area:

DD-WRT :: View topic - Script to sort static leases
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=288629

DD-WRT :: View topic - Synchonize DHCP leases from a CSV-file to a dd-wrt router
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=154190


I looked at these but i don't see the relation to the latter one.
The fist one is interesting but only if you use the build in web interface.
Having extra scripts also adds a layer of complexity for setting up DD-WRTiles
and I want to keep it as simple as possible for everyone. Having one file, that does the job (even if it is internally kind of a detour regarding the gathering of the necessary infos) makes it much more simple to use.
IONK
DD-WRT Guru


Joined: 19 Aug 2011
Posts: 967

PostPosted: Mon Aug 21, 2023 14:44    Post subject: Reply with quote
did I do something wrong?
IONK wrote:
Router/Version: Netgear XR500 (Install guide by egc)
File/Kernel: dd-wrt-webupgrade.bin (r53339) / Linux 4.9.337 #2108 SMP Tue Aug 1 02:06:41 +07 2023 armv7l
Previous/Reset: DD-WRT v3.0-r53323 std (07/15/23) / no
Mode/Status: AP, SFE, AP 5GHz Mixed 80MHz + AP 2.4GHz NG-Mixed 20MHz, 802.11r (FT), SSH (public key), 802.11 encapsulation offloading, ondemand CPU governor at night, USB Storage (guide by egc), lighttpd (using Entware’s php8), CIFS Automount, WireGuard server, Cron / working
Issues/Errors: none



202308212242381528.png
 Description:
 Filesize:  66.7 KB
 Viewed:  2249 Time(s)

202308212242381528.png



202308212248451529.png
 Description:
 Filesize:  12.84 KB
 Viewed:  2245 Time(s)

202308212248451529.png



_________________
▫ RSS feed for DD-WRT releases (2024): https://rsseverything.com/feed/7d36ab68-7733-46c3-bd8a-9c54c5cef08c.xml
easyddup - A simple upgrade/downgrade utility by yoyoma2 --- as featured in 📌 Reference Links, stickies retired back to forum (Moderator's Pick 🌟)


Last edited by IONK on Mon Aug 21, 2023 15:54; edited 1 time in total
chromoxdor
DD-WRT Novice


Joined: 02 Dec 2014
Posts: 44

PostPosted: Mon Aug 21, 2023 15:18    Post subject: Reply with quote
IONK wrote:
did I do something wrong?


No, i did. Since there are so many possibilities that something can go wrong i definitely didn’t account for all of them. I just hopefully tried to do a temporary fix for you. Can you redownload the dd.html an report?

For a more substantial fix i would need to see the content of your /Status_Wireless.live.asp and /Status_Lan.live.asp
If you want you can provide me with this info via PM.
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum