We use cookies to make your experience better. To comply with the new e-Privacy directive, we need to ask for your consent to set the cookies. Learn more.
Guide to using PowerShell with your Room Alert 3E
A description of how to retrieve sensor data from your Room Alert 3E using Windows PowerShell. Whilst the examples here use the Room Alert 3E as the target, very similar techniques would work with all of the other Room Alert models as well.
Introduction to PowerShell
PowerShell (including Windows PowerShell and PowerShell Core) is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework and .NET Core.
Accessing Room Alert Data
You can read the data from your Room Alert with the following Powershell command:
Invoke-RestMethod is quite a useful Powershell cmdlet because it does a lot of the heavy lifting for you. $room_alert_data will now contain a .NET object containing a number of properties taken from the JSON data retrieved from the Room Alert. You can access the data as you would a regular object property.
Room Alert Data
Property | Description | Example Data |
---|---|---|
name | Name of the Room Alert. Defaults to the serial number. | RA3E-129912 |
date | Date / time as set on the Room Alert | 07/19/17 09:50:58 |
uptime | How long the Room Alert has been running | 1d 18:36:45 |
scale | Temperature scale. 1 for Fahrenheit, 0 for Celsius | 1 |
macaddr | MAC address of the Room Alert | 00:80:A3:93:EC:C8 |
serial | Serial number of the Room Alert | RA3E-129912 |
refresh | Interval in seconds between refreshes of the web interface | 60 |
gtmd_interval | Number of seconds between sending data to GoToMyDevices.com | 3600 |
version | Firmware version number | v2.0.0 |
port | Port for the Room Alert web interface | 80 |
ip | IP address of the Room Alert | 10.0.0.152 |
gtmd_disabled | Status of the GoToMyDevices.com synchronisation. 0 for enabled, 1 for disabled | 0 |
time_config | Time zone and daylight saving information | @{timezone=0; format=0; display=0; daylight_saving_en=0} |
sensor | Collection of digital sensor data | {@{label=Internal Sensor; tempf=75.30; tempc=24.06; highf=76.87; highc=24.93; lowf=72.37; lowc=22.43; alarm=4; type=16; enabled=1}, @{label=Ext Sensor 1; tempf=75.65; tempc=24.25; highf=77.32; highc=25.18; lowf=74.40; lowc=23.56; alarm=0; type=16; enabled=1}} |
switch_sen | Collection of switch sensor data | {@{label=Switch Sen 1; enabled=1; alarm=1; status=0}} |
Sensor Data
Now you've read all of the data from your Room Alert, how do you access the sensor data?
The data for each sensor type is stored separately. The digital sensor data is stored in the sensor collection and the switch sensor data is stored inside switch_sen.
First we'll tackle how to access the digital sensor data.
Next up is the switch sensor collection. This works much the same as the digital sensor collection but the properties vary slightly.