DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#76 2008-10-16 21:02:18

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: Windows Vista Gadget

ps uninstalling v0.95 and installing v0.995 still reports uptime as 0:1:41....
unplugging my wap and router doesn't change it either ....
pps now I have installed the latest version I get no temp graph at all !!  Is the graph fixed to 20-40degrees?  I run two 1tb drives and the box runs a lot hotter than that (average is 45-49 degrees)
ppps is it possible to get the gadget to stay on the same pane/tab when it refreshes on the timer? it reverts to the status pane on refresh

Last edited by luusac (2008-10-16 23:12:57)

Offline

 

#77 2008-10-17 20:51:36

philw
Member
Registered: 2008-09-19
Posts: 41
Website

Re: Windows Vista Gadget

I just posted 0.996 which auto-scales the temperature graph; the space graphs are 0-100% so there's no issue there. I put a few other tweaks in there to as listed.

As per email, there must be something funny in your system as mine can parse your uptime data without problem. We are still looking at that, but it's an obvious problem and no one else has reported it, so perhaps it's something specific about your setup. It still makes no sense, as parsing that is about the easiest bit of all this.

This one dumps the built-in settings storage and sticks them in an ini file, so from this one onwards you can upgrade without having to type your password in again. No, it doesn't encrypt your password and I've no plans to make it do so.

Offline

 

#78 2008-10-18 13:00:40

RunaR
Member
Registered: 2008-08-14
Posts: 49

Re: Windows Vista Gadget

I got the uptime function working (sort of) for the CH3SNAS. The uptime now reports  154 days and some, it should be a few day's. When I type uptime in ssh it reports 14170 days, which is not right. I could be just my machine. Can anyone tell me what is shown on the /proc/uptime page??

Anyway, here is what I did to get it working. Since the firmware webpages are in a read-olny spot and the /proc pages are not available on the CH3SNAS, I need a different place to get the data from. I already had lighttpd with php on my machine.  I made a small php script

Code:

<?php

$uptime= @exec('cat /proc/uptime');
echo $uptime;

?>

and placed it in www/pages/system/uptime.php
When I got to http://<nas-ip>:8080/system/uptime.php I get an empty webpage with just the uptime in seconds (output from cat /proc/uptime)

Code:

1224327268.37 574580.16

Now I changed the gadget by editing default.js.  I changed the line

Code:

new StateObject("/proc/uptime", "<p style='padding-top:5px'>Up time: {0} </p>", "StatusData", formatUptime, null, true),

into

Code:

new StateObject(":8080/system/uptime.php", "<p style='padding-top:5px'>Up time: {0} </p>",  "StatusData", formatUptime, null, false ),

:8080/system/uptime.php is converted in the gadget to http://<ip-nas>:8080/system/uptime.php
and the last bit is changed from true to false. This directs if the function is DNS-323 only or not.

Now just reload the gadget and the uptime is reported. This method could be used to expose other bits of information about your nas. Aslong as the info is available through php.

Last edited by RunaR (2008-10-18 13:34:44)

Offline

 

#79 2008-10-18 14:22:05

philw
Member
Registered: 2008-09-19
Posts: 41
Website

Re: Windows Vista Gadget

Cool. I just took your data ("1224327268.37 574580.16") and tested it on my Gadget.

The process I used (good for other testing too) is:
(1) Uncomment the "debugOut" line (in utils.js for 0.996).
(2) Add the line: "debugOut( formatUptime("1224327268.37 574580.16") );" in the place where it stops on login failure (line 205 in default.js).
(3) Change the password so login fails and runs the line in (2).
Perhaps I should change the thing so there's a permanent hook for test code; I'll think about how to do that.

From this test my debugger output is:  159:36:20. That's hours: minutes: seconds.

(a) I think I will change the code so it reports instead days: hours: minutes: seconds which would be easier to read.

(b) As you need your custom hack to make that work, I need a way to selectively enable and disable the commands without having to change the flag in the JS, so you retain the change across upgrades. I could just expose the whole state table in the settings and then let you override what's enabled/ disabled there, and save the thing to the settings file. I'll put that on the list for a rainy day.

I mailed you on proc/uptime generally.

Offline

 

#80 2008-10-18 14:31:29

RunaR
Member
Registered: 2008-08-14
Posts: 49

Re: Windows Vista Gadget

Thanks, looks like it's working then, I misinterpreted it for days:hours:minutes. I'll hack the days calculation in there. This machine is supposed to run for long times. displaying in days makes more sense.

-edit-
Hmm, it looks like the data is cached somewhere. My Uptime is static. I'm also trying to get the client list from /proc/net/arp and it seems to be static too. Might be something in lighttpd.

Last edited by RunaR (2008-10-18 17:57:30)

Offline

 

#81 2008-10-19 20:01:46

philw
Member
Registered: 2008-09-19
Posts: 41
Website

Re: Windows Vista Gadget

Ok, the "uptime doesn't change thing" is your cache settings in IE7. If you have the cache switched on, then it doesn't re-GET the unix command pages at all, which makes sense. It does re-GET the pages with the magic id=783647864 strings on the end... perhaps that's why those strings are there.

So your quick-fix is to switch the IE7 cache to "check every time" (which is what I have it on anyway...).

The good news is that I can also use the same trick... so http://192.168.0.32/proc/uptime?87484 works. So if I put a random number as a parameter to the url that should trick IE7 I think... no more cache problem. I will put that in the next version.

Ok, I just posted 0.998 which does this and therefore solves the cache business.

Last edited by philw (2008-10-19 21:00:02)

Offline

 

#82 2008-10-19 21:29:45

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: Windows Vista Gadget

philw wrote:

Ok, I just posted 0.998 which does this and therefore solves the cache business.

The link on http://philwigglesworth.net/BlogEngine. … adget.aspx is still showing v0.996, so gadget is not saying that there is a new version.  I also had a problem earlier where installed version 996 didn't know 996a was an updated version (or was it?  I just realise that the v.a was a pm'ed one), so forget that.

Since 996 (inc 998) I get nothing on OS,CLI,SVR pages and status only shows Vol bar and %age, no uptime.

Offline

 

#83 2008-10-19 21:56:05

philw
Member
Registered: 2008-09-19
Posts: 41
Website

Re: Windows Vista Gadget

Sorry - 0.998 fixed now.

Mail me about the other thing - those pages are disabled for the CH3NAS, but they should work for the DNS323.

Offline

 

#84 2008-10-19 22:11:11

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: Windows Vista Gadget

I couldn't shut everything down at the time when I posted, but now what I was busy with has finished a powercycle has resolved everything.

ahem, spoke too soon.  Everything appears ok on boot, but on a reload gadget stops with "adv_status ok" in green, but doesn't paint temp/uptime / os/cli/svr

I think that this may be a glitch on my setup, though don't know what wouold be causing it.  Is anybody else seeing this (first page no temp/uptime and nothing on OS/CLI/SVR pages)?

Last edited by luusac (2008-10-19 22:42:02)

Offline

 

#85 2008-10-20 09:15:47

RunaR
Member
Registered: 2008-08-14
Posts: 49

Re: Windows Vista Gadget

philw wrote:

Ok, the "uptime doesn't change thing" is your cache settings in IE7. If you have the cache switched on, then it doesn't re-GET the unix command pages at all, which makes sense. It does re-GET the pages with the magic id=783647864 strings on the end... perhaps that's why those strings are there.

So your quick-fix is to switch the IE7 cache to "check every time" (which is what I have it on anyway...).
.....

This did the trick! Thanks. I got version, client and uptime info working for the CH3SNAS with the procedure I described above.
I just  replaced one line in the php script to get the other info. instead of /proc/uptime I used /proc/version and /proc/net/arp

Offline

 

#86 2008-12-08 00:16:27

Cirip
Member
Registered: 2008-10-12
Posts: 42

Re: Windows Vista Gadget

Hi all!

Cirip wrote:

Maybe it is a lama question but can I use this gadget under XP?
I tried some applications like: Windows Sidebar, Thoojse Sidebar but without success.
Thank you for help!

Best regards:
                 C.

The problem resolved I wrote a tutorial here:
http://dns323.kood.org/forum/viewtopic. … 775#p23775


C.

Last edited by Cirip (2008-12-10 22:35:25)

Offline

 

#87 2008-12-08 05:00:09

philw
Member
Registered: 2008-09-19
Posts: 41
Website

Re: Windows Vista Gadget

The short answer is "no", as the gadget works on the Vista framework. It could be ported to another similar framework - for example the google one or Yahoo... I looked at that but couldn't find the motivation to do it... someone could re-build or port this of course...

Offline

 

#88 2008-12-10 22:31:03

Shotgun
New member
From: US
Registered: 2008-09-26
Posts: 3

Re: Windows Vista Gadget

Maybe some monetary contribution would motivate you?  I have tried to port this to OSX dash and not succeeded.  I would gladly donate some money if someone were to port it to google format.. I can take it from there pretty easily.

Offline

 

#89 2008-12-16 22:27:05

bodbod
Member
Registered: 2007-11-22
Posts: 109

Re: Windows Vista Gadget

Fantastic ! Thx a million for your nice job, very usefull !
Very good job Philw !

Offline

 

#90 2008-12-25 03:29:41

dP21
Member
Registered: 2008-11-29
Posts: 33

Re: Windows Vista Gadget

Awesome tool.  Thanks!

Offline

 

#91 2008-12-27 19:28:14

poggsuk
Member
Registered: 2008-03-17
Posts: 8

Re: Windows Vista Gadget

I have installed this widget and it was fab.
However I have flashed the DNS323 to firmware 1.06b65 and now the widget is sort of broken.

Well everything other than the temp works, but the widget doesn't display the temp anymore.

Offline

 

#92 2008-12-31 09:02:11

dP21
Member
Registered: 2008-11-29
Posts: 33

Re: Windows Vista Gadget

I'm having a problem after re-installing Vista.  My gadget does not update.  See screen cap

http://img237.imageshack.us/img237/4797/capturecu6.jpg

Any ideas what's wrong?

Last edited by dP21 (2008-12-31 09:03:36)

Offline

 

#93 2008-12-31 20:23:28

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: Windows Vista Gadget

poggsuk wrote:

However I have flashed the DNS323 to firmware 1.06b65 and now the widget is sort of broken.
Well everything other than the temp works, but the widget doesn't display the temp anymore.

Post the html output (attach it as a .txt) of the staus page of the dns323 - the page where the temp is displayed.  It is to be expected that new f/w will break the gadget as dlink tweak their html.  Posting the page will allow the author to tweak the parsing of the page by the gadget - it should be a simple/quick fix.  I haven;t kept up with the f/w numbers - is the v.1.06b65 the official released version from the dlink website?

Offline

 

#94 2009-01-01 00:32:35

poggsuk
Member
Registered: 2008-03-17
Posts: 8

Re: Windows Vista Gadget

Hopefully this is the txt file you were referring to.

thanks for the tip.


Attachments:
Attachment Icon dlink-EE11C7.txt, Size: 1,352 bytes, Downloads: 309

Offline

 

#95 2009-01-01 22:07:49

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: Windows Vista Gadget

no, that won't do it.  You have copied and pasted ? what was displayed in your browser window.  What is needed is the html source.  Load the page in your browser and look for something like 'View Source' and then post that.  In the version of Internet Explorer that I am using I would right-click on the page and choose 'View Source' or go to the 'Page' menu and then select 'View Source'

Offline

 

#96 2009-01-02 19:37:03

dilettanti
Member
Registered: 2008-11-30
Posts: 9

Re: Windows Vista Gadget

Awesome little tool.  Thanks!  This community is amazing - I am constantly amazed at what I can do with my little NAS and a whole lot of fantastic help from all of you.

Offline

 

#97 2009-01-02 22:28:52

poggsuk
Member
Registered: 2008-03-17
Posts: 8

Re: Windows Vista Gadget

luusac wrote:

no, that won't do it.  You have copied and pasted ? what was displayed in your browser window.  What is needed is the html source.  Load the page in your browser and look for something like 'View Source' and then post that.  In the version of Internet Explorer that I am using I would right-click on the page and choose 'View Source' or go to the 'Page' menu and then select 'View Source'

Ok thanks.

hopefully I've got it right this time!


Attachments:
Attachment Icon device_status.txt, Size: 9,829 bytes, Downloads: 367

Offline

 

#98 2009-01-03 23:34:08

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: Windows Vista Gadget

yes, that should do it.

Offline

 

#99 2009-01-09 06:45:53

pbls
Member
Registered: 2008-11-20
Posts: 15

Re: Windows Vista Gadget

Hi ,does anyone have a donload link from this gadget that really works???

Offline

 

#100 2009-01-12 01:13:36

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: Windows Vista Gadget

same place as always - Phil's site
http://philwigglesworth.net/BlogEngine. … adget.aspx

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB