Skip to content

Instantly share code, notes, and snippets.

Jack Hughes digitalbricklayer

Block or report user

Report or block digitalbricklayer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View IpPower9850PowerSocket.ps1
# Switch socket 1 on. All other sockets are assumed to be off
Invoke-WebRequest -Uri "http://10.0.0.204/set.cmd?user=admin+pass=12345678+cmd=setpower&p61=1&p62=0&p63=0&p64=0"
@digitalbricklayer
digitalbricklayer / IpPower9850ReadSocketState.ps1
Last active Sep 28, 2018
Read the current state of the power sockets on an Aviosys IP Power 9850
View IpPower9850ReadSocketState.ps1
# Read the current state of the power sockets...
Invoke-WebRequest -Uri "http://10.0.0.204/set.cmd?user=admin+pass=12345678+cmd=getpower"
@digitalbricklayer
digitalbricklayer / IpPower9850ReadFirmwareVersion.ps1
Last active Sep 28, 2018
Read IP Power 9850 software version using Powershell
View IpPower9850ReadFirmwareVersion.ps1
# uses default user name and password. Couldn't get the HTTP form to work properly
Invoke-WebRequest -Uri "http://10.0.0.204/set.cmd?user=admin+pass=12345678+cmd=getversion"
@digitalbricklayer
digitalbricklayer / ReadRoomAlertSwitchSensorData.ps1
Last active Jul 19, 2017
How to find switch sensor data from the Room Alert using PowerShell
View ReadRoomAlertSwitchSensorData.ps1
# 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:
@digitalbricklayer
digitalbricklayer / ReadRoomAlertDigitalSensorData.ps1
Last active Jul 19, 2017
How to find digital sensor data from the Room Alert using PowerShell
View ReadRoomAlertDigitalSensorData.ps1
# Digital 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'
# To find the sensor named 'Internal Sensor'
$result.sensor|where{$_.label -eq 'Internal Sensor'}
# Prints out the following to the console:
@digitalbricklayer
digitalbricklayer / ReadRoomAlertData.ps1
Last active Jul 21, 2017
Read JSON data from a Room Alert 3E using Invoke-RestMethod
View ReadRoomAlertData.ps1
$room_alert_data = Invoke-RestMethod -URI 'http://10.0.0.1/getData.json'
@digitalbricklayer
digitalbricklayer / RoomAlert.psm1
Last active Jul 26, 2017
A Powershell module for interacting with the Room Alert 3E
View RoomAlert.psm1
<#
.Synopsis
Gets data from a Room Alert environment monitor.
.Description
Gets all of the data from a Room Alert environment monitor.
.Parameter $address
IP address or host name of the Room Alert monitor.
@digitalbricklayer
digitalbricklayer / gist:7103320
Last active Jul 21, 2017
Code throws a System.ObjectDisposedException.
View gist:7103320
// The test
[TestMethod]
public void Run_With_No_Arguments_Returns_Invalid_Args()
{
var sut = new LiteDatabaseRunner(MakeDatabaseHelperMock().Object);
var actualResult = sut.Run(Array.Empty<string>());
actualResult.Should().BeGreaterThan(0);
}
// Options class
You can’t perform that action at this time.