Quick links

Sunday, June 24, 2018

Use Windows WMI and Powershell to send data to Homeseer

For instance if you want to sent the average temperature or the CPU cores on your Windows PC to Homeseer virtual devices so you can trigger and action on temperature too high.
Create a user to use for updating if you do not already have one

Create a virtual device in Homeseer similar to this

Be sure and uncheck "Do not update device last change time if device value does not change:"

Note -1 is set by script if it encounters and error getting data for the virtual

When I deployed to my second PC I found not even the Administrator could run scripts and had to set its policy to RemoteSigned and unblock the file.PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSignedPS C:\> Unblock-File -Path"C:\diags\cpuTemp.ps1"
See this Microsoft doc for more info on that.

Also the temperature readings are the same and unchanging on both PCs I've deployed to so far so they might not be useful despite all the posts out there claiming they are.