Skip to content

Instantly share code, notes, and snippets.

View rscott78's full-sized avatar

Ryan Scott rscott78

View GitHub Profile
@rscott78
rscott78 / PAS-ActivationCode-Registration-Link
Created May 31, 2018 22:16
This will update the the registration and link it to an activation code.
@rscott78
rscott78 / sample-react-model.js
Created December 5, 2017 16:39
This shows the use of a simple model in a react form. Input and state changes are handled by a single method.
import React from 'react';
export default class RegistrationForm extends React.Component {
constructor(props) {
super(props);
this.state = {
model: {
firstName: '',
lastName: ''
using MLS.HA.DeviceController.Common.Gui;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
<l:PluginGuiWindow x:Class="MyPlugin.PluginSetup"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
Title="MyPlugin Setup"
xmlns:l="clr-namespace:MLS.HA.DeviceController.Common.Gui;assembly=MLS.HA.DeviceController.Common"
Height="400" Width="400">
@rscott78
rscott78 / MenuItem.cs
Last active August 29, 2015 14:18
InControl Plugin Menu Item Creation
public class MenuItem : IPluginMenuItem {
public string mainMenuName() {
return "MyPlugin Plugin";
}
/// <summary>
/// Gets all sub-menu items.
/// </summary>
/// <returns></returns>
@rscott78
rscott78 / gist:db6d7151ba390f8801b3
Last active August 29, 2015 14:07
InControl HUE Controller executeSpecialCommand method
public bool executeSpecialCommand(object providerDeviceId, SpecialCommand command, object value) {
try {
if (command == SpecialCommand.SetDeviceXYColor) {
var split = value.ToString().Split('|');
Double x, y;
int brightness;
Double.TryParse(split[0], out x);
Double.TryParse(split[1], out y);
{
"__type": "Thermostat:#MLS.HA.DeviceController.Common.Device.ZWave",
"as": true,
"autoToggleOff": false,
"autoToggleSeconds": 0,
"cs": true,
"deviceId": "5a8b9ea1-23d0-4ced-9d22-d899959eccd5",
"deviceName": "G Thermostat",
"deviceType": 3,
"displayOrder": 0,