Results 1 to 5 of 5

Thread: Posting windows CPU temp, RAM and HDD space to JSON?

  1. #1

    Default Posting windows CPU temp, RAM and HDD space to JSON?

    Hi one and all.... My first posting....

    I'm running Domoticz on a raspberry pi and would still consider myself a beginner....

    What I'm looking to do is grab the CPU temp, RAM and HDD percentage used off my windows home server and post them to Domoticz using it's JSON interface. So basically I just need to grab the values somehow on my server using a batch file or something and call a specific url located on the raspberry pi to post the values every 15 minutes or so...

    Anyone got any idea on how to do this? Would I really need to use Powershell or something?

  2. #2
    Automated Home Jr Member
    Join Date
    Oct 2009
    Location
    Hayes, Kent
    Posts
    39

    Default

    Quote Originally Posted by tommysharp View Post
    Would I really need to use Powershell or something?
    Powershell would be the way I would do it as its lightweight, comes with OS and is completely under your control.

    As a Brucie bonus, powershell skills are a great thing to have on your CV and m$ do a course for free

    http://www.microsoftvirtualacademy.c...3-0-jump-start

  3. #3
    Automated Home Legend Paul_B's Avatar
    Join Date
    Jul 2006
    Location
    Eastbourne, UK
    Posts
    604

    Default

    I was right with you back_ache until the use of the two letter acronym for Microsoft. In this day and age it would much more pertinent to use dollar symbols for Apple and Google.

    If you are using Windows 8 or 2012 then use cmdlet get-ciminstance otherwise use the cmdlet get-wmiobject:
    e.g Get-ciminstance -class win32_logicaldisk -filter "DriveType=3" will give you the CIM information on the fixed drives in your computer

    Again depending on the OS version you are running will determine the version of PowerShell and the cmdlets available. You can upgrade PowerShell by applying the latest Windows Management Framework package, as of writing this is version four and contains PowerShell version 4 and is available on all OS beyond Windows 7 SP1. PowerShell 4 gives the cmdlet convertto-json and Invoke-RestMethod

    Good luck

    Paul

  4. #4

    Default

    How about a node js server running net-snmp. You can use SNMP to monitor nearly anything on the network.

  5. #5
    Automated Home Sr Member wywywywy's Avatar
    Join Date
    Dec 2005
    Posts
    86

    Default

    I bet you've heard of HWiNFO32?

    It's a popular generic hardware info utility, and those stats that you want are a part of it.

    And it's got a plugin here that presents the various values over network as JSON - http://www.hwinfo.com/forum/Thread-I...ful-Web-Server

    So yea it's exactly what you need I think, with a bit of scripting work.

Posting Permissions

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