Menu

Skip to content
Sytone's Ramblings
  • Home
  • About

Sytone's Ramblings

the occasional posts of a guy who plays with technology

Tag: Home Automation

Home automation with ISY and PowerShell

Posted on October 30, 2014 by Sytone

I am playing with ISY and automation in my home, looking at the universal devices page today I found the API for working with the unit. Turning to trusty PowerShell I came up with the following code to enable you to start interacting with the unit remotely. Ill look at a proper module at some point in the future but this increases the possibilities of the unit!

[code]
function Invoke-IsyRestMethod {
param (
$RestPath
)
$isyEndPoint = "http://192.168.0.123"
$user = "user"
$pass = "pass"
$url = "{0}{1}" -f $isyEndPoint, $RestPath
$headers = @{
Authorization = ‘Basic ‘ + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($("{0}:{1}" -f $user, $pass)))
}
invoke-restmethod -Uri $url -Method Get -Headers $headers
}

# Get all the nodes and addresses you have in the system.
(Invoke-IsyRestMethod "/rest/nodes").nodes.node | select name, address

# get information about a specific node.
Invoke-IsyRestMethod -RestPath "/rest/nodes/28 2F 24 1"

#Turn the node on, in this case my desk lamp!
Invoke-IsyRestMethod -RestPath "/rest/nodes/28 2F 24 1/cmd/DON/"

#Turn the node off, in case my desk lamp.
Invoke-IsyRestMethod -RestPath "/rest/nodes/28 2F 24 1/cmd/DOF/"
[/code]
Next to make my desk lamp flash when I should go to bed 😉

Share this:

  • Email
  • Print
  • Reddit
  • Twitter
  • Pocket
  • Pinterest
Posted in Home Automation PowerShell | Tagged Home Automation ISY PowerShell REST | Leave a comment

Post navigation

  • Newer posts

Tags

API autohotkey Binding c# cache Content Deployment development engineering forge Games General Gnomoria hack Home Assistant Home Automation hosting ISO ISY JSON libraries Microsoft Microsoft Flow minecraft MoCA mod network openhab outlook paper PowerShell REST Security SharePoint site SQL toodledo troubleshooting Tweak Visual Studio Visual Studio Code windows 7 Windows 8 Windows Phone winkhub XAML

Recent Posts

  • Filling your calendar for the week, increase productivity! Mileage may vary
  • New PowerShell module for Home Assistant
  • Getting PowerShell to work with Home Assistant
  • iPhone hotspot issues? Getting it to work with windows.
  • Getting a DietPi image running on Hyper-V

Recent Comments

  • vxp on Getting a DietPi image running on Hyper-V
  • Rob Nuckolls on Automating OneNote with AutoHotKey to be a Journal
  • Shrabean on Automating OneNote with AutoHotKey to be a Journal V1.1
  • danbutter on Integrating ISY into OpenHAB
  • Sytone on Integrating ISY into OpenHAB

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
Proudly powered by WordPress
Theme: Flint by Star Verte LLC
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.