+ Post New Thread
Results 1 to 14 of 14
Netbooks, PDA and Phones Thread, BattStats: Display charge level of laptops before login in Technical; I originally intended to do a really nice thread for this, but over 2 years have gone by and I've ...
  1. #1

    Join Date
    May 2009
    Location
    Kent
    Posts
    6
    Thank Post
    1
    Thanked 9 Times in 3 Posts
    Rep Power
    0

    BattStats: Display charge level of laptops before login

    I originally intended to do a really nice thread for this, but over 2 years have gone by and I've still not got around to it, maybe now others have done something similar, I haven't looked. certainly there was nothing I could find after extensive searches when it was developed. I am hoping other institutions will want to use it and develop it beyond its current state.

    After implementing laptop loans in our library, student were saying "I hate it when I pick up a laptop, take it to a study zone, log in only to find the battery is almost flat". The cheaper laptops and netbooks we buy tend not to have battery charge indicator on, so another solution was required.

    In response to this we have put screens on top of all our laptop trollies, showing the charge level of all laptops in the library, students seem to like them. They grab any laptop they want, check the number on the lid against the BattStats display... simple.

    Laptop Charge Levels

    It's a fairly simple PowerShell script that generates and XML file. If you are interested in implementing this at your institution I will happily send you a zip of the code, as long as you share any development you do back to the community.

    Stuart
    Universities at Medway

  2. 7 Thanks to StueyMonster:

    AngryTechnician (4th December 2012), FN-GM (4th December 2012), JJonas (4th December 2012), john (4th December 2012), mac_shinobi (7th December 2012), Meldrew (10th December 2012), plexer (4th December 2012)

  3. #2

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,609
    Thank Post
    730
    Thanked 1,688 Times in 1,502 Posts
    Rep Power
    433
    That is awesome.

    Ben

  4. #3

    JJonas's Avatar
    Join Date
    Jan 2008
    Location
    North Walsham, Norfolk
    Posts
    3,158
    Thank Post
    404
    Thanked 445 Times in 330 Posts
    Rep Power
    387
    I like that very much, do share

  5. #4

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,234
    Thank Post
    894
    Thanked 1,780 Times in 1,534 Posts
    Blog Entries
    12
    Rep Power
    462
    Please do looks pretty good!

  6. #5
    Hawkeyez's Avatar
    Join Date
    Jul 2005
    Posts
    281
    Thank Post
    21
    Thanked 27 Times in 23 Posts
    Rep Power
    26
    Yes, would like to give that a try he also!

  7. #6

    Join Date
    May 2009
    Location
    Kent
    Posts
    6
    Thank Post
    1
    Thanked 9 Times in 3 Posts
    Rep Power
    0
    Here are the files in their native form (suitable for our environment): https://dl.dropbox.com/u/1487955/BattStats.zip

    It's pretty self-explanatory and easy to implement if you already have a server with IIS on it that you can stick it on. Make sure that server can run PowerShell scripts remotely on the laptops, you may need to allow WMI on the clients firewall. Initial try running the command:

    get-wmiobject -class win32_battery -computername <ip or hostname here>

    Once you have that working, populate your laptops.txt list with all your hostnames and you should be good to go. If you have a smaller or larger number of laptops to us, you will need to alter the index.htm to get the layout correct.

    Finally, get a gold star from your boss, because students have been complaining about not being able to see the charge levels for laptops for ages

    The script just loops continuously and will take longer to run the more when more laptops are offline and obviously the more you have, ours completes 106 devices (4 have been stolen so removed from the list) in about 90 seconds, the page is set to refresh every 60 seconds. I set it to run as a scheduled task every morning at 8am for 23 hours. We don't sleep the laptops in the day, just switch the display off when the lid is shut. We sleep them after close at midnight, and they wake and perform a restart at 8am.

    Myself and my colleague Rob will try to help where we can, but we're fairly busy with student hand-in time for the next few weeks.

    Thanks

    Stuart

  8. Thanks to StueyMonster from:

    JJonas (4th December 2012)

  9. #7

    Join Date
    Jul 2009
    Posts
    288
    Thank Post
    8
    Thanked 43 Times in 37 Posts
    Rep Power
    16
    Stuart this is amazing and I have implemented for all my laptops (450 of them), they are all inputted correctly into the laptops.txt and the powershell script runs fine!
    But I cannot "edit the index.html" to accommodate them all, it only shows the first 30, i have exhausted my knowledge of HTML "tables" , any help anyone?
    much appreciated.

  10. #8

    Join Date
    May 2009
    Location
    Kent
    Posts
    6
    Thank Post
    1
    Thanked 9 Times in 3 Posts
    Rep Power
    0
    Great, good to hear someone has tried it. Rob did the web code for me, I think he understands the ins and outs better, but to enable us to help, can you tell us what res you will be running the screens at and how many are on each screen? I think about 120 would be the max I would fit on a single 16:9 screen without the need for scrolling (we don't have a keyboard or mouse on our cabinets). Are you having multiple screens?

    Basically, if you can give me as many details as possible, I'm sure we can help.

    I'd also be interested to hear what company/institution you are from, you can PM me that info if you prefer.

    Cheers

    Stuart

  11. #9

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,909
    Thank Post
    3,435
    Thanked 1,084 Times in 1,000 Posts
    Rep Power
    370
    please share that would be great

    edit
    - no way to make it loop through an ip range or are you using the list of computer names in the text file as the way of enumerating through each of the computers ?
    Last edited by mac_shinobi; 7th December 2012 at 03:57 PM.

  12. #10

    Join Date
    May 2009
    Location
    Kent
    Posts
    6
    Thank Post
    1
    Thanked 9 Times in 3 Posts
    Rep Power
    0
    Quote Originally Posted by mac_shinobi View Post
    please share that would be great
    I did share a Dropbox link if you look a few posts up

    Yes, it uses the hostnames in the text file, so you need your DNS to be working. Otherwise the web page just shows IP addresses, which isn't so clear to students
    Last edited by StueyMonster; 7th December 2012 at 03:59 PM.

  13. Thanks to StueyMonster from:

    mac_shinobi (7th December 2012)

  14. #11

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,909
    Thank Post
    3,435
    Thanked 1,084 Times in 1,000 Posts
    Rep Power
    370
    Thanks @StueyMonster

  15. #12

    Join Date
    May 2009
    Location
    Kent
    Posts
    6
    Thank Post
    1
    Thanked 9 Times in 3 Posts
    Rep Power
    0
    Hi Andy, here are the files for 450, you can compare them with the originals to see what Rob has changed. https://dl.dropbox.com/u/1487955/Bat...ed%20Files.zip

    He has played around with making the icons smaller, you may find that works for you better, but let us know.

  16. #13

    Join Date
    Jul 2009
    Posts
    288
    Thank Post
    8
    Thanked 43 Times in 37 Posts
    Rep Power
    16
    Hi Stuart,

    the new layout gives me 42 viewable Laptops(with scrolling) . For some reason it just doesn't seem to manage to display them all.

  17. #14
    fairm010's Avatar
    Join Date
    Jun 2010
    Location
    C:/Windows/System32/
    Posts
    1,308
    Thank Post
    53
    Thanked 170 Times in 150 Posts
    Rep Power
    49
    I'm new to powershell and am keen to get this implemented!

    Could somebody tell me what to do with the powershell script? and once that is working how i implement it in GP?

    I have the battstats site set up and working in IIS, i just need to populate the list now!

    matt

SHARE:
+ Post New Thread

Similar Threads

  1. Folder Redirection - creation of folders before first login?
    By not_rich_yet in forum Windows Server 2008 R2
    Replies: 8
    Last Post: 8th May 2012, 09:27 AM
  2. which brand of laptops do you have
    By projector1 in forum General Chat
    Replies: 37
    Last Post: 15th March 2007, 10:26 PM
  3. popup before login thing
    By browolf in forum Windows
    Replies: 3
    Last Post: 12th March 2007, 04:05 PM
  4. Wireless networks and large groups of laptops
    By maniac in forum Wireless Networks
    Replies: 33
    Last Post: 8th February 2007, 10:52 PM
  5. Opinion on SLT final choice of laptops.
    By tosca925 in forum Hardware
    Replies: 13
    Last Post: 30th January 2006, 11:09 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •