Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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 ''
# 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