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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • tommysharp
    • Dec 2014
    • 1

    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?
  • back_ache
    Automated Home Jr Member
    • Oct 2009
    • 40

    #2
    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

    Comment

    • Paul_B
      Automated Home Legend
      • Jul 2006
      • 608

      #3
      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

      Comment

      • Bobby
        • Feb 2015
        • 2

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

        Comment

        • wywywywy
          Automated Home Sr Member
          • Dec 2005
          • 86

          #5
          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.

          Comment

          Working...
          X