Skip to content

Instantly share code, notes, and snippets.

@digitalbricklayer
Last active July 19, 2017 16:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save digitalbricklayer/c9db544b69e7d4159546bcacff7c5c90 to your computer and use it in GitHub Desktop.
How to find switch sensor data from the Room Alert using PowerShell
# Switch sensor data
# The examples below use a Room Alert 3E with firmware v2.0.0 and Powershell v5
$result = Invoke-RestMethod -URI 'http://10.0.0.1/getData.json'
# Find the sensor named 'Switch Sen 1'
$result.switch_sen|where{$_.label -eq 'Switch Sens 1'}
# Prints out the following to the console:
# label enabled alarm status
# ----- ------- ----- ------
# Switch Sen 1 1 1 0
# Find all enabled switch sensors
$result.switch_sen |where{$_.enabled -eq 1}
# Prints out the same as above in this case...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment