public void SetUp() { _data = null; _t = new Netomity.Interfaces.Basic.Fakes.StubBasicInterface() { SendString = (data) => { _data = data; }, }; _i = new Insteon(iface: _t); }
public void CommandOnFunctionalTests1() { var t = new TCPClient(address: "192.168.12.161", port: 3333); var i = new Insteon(iface: t); //t.Open(); Thread.Sleep(2000); //var sentData = "026219057B0F11FF"; // 0262382E3F0F113F //var aSentData = Conversions.HexToAscii(sentData); i.Command(new Command() { Primary = CommandType.Off, Destination = "38.2E.A2" }); // var aData = Conversions.AsciiToHex(_data); //Assert.AreEqual(sentData, aData); Thread.Sleep(10000); }
static void Main(string[] args) { //const string BASE_ADDR = "http://*****:*****@"C:\projects\Netomity\Netomity\Web\Content\"; var logger = new Logger(@"C:\temp\netomity-log.txt"); var ns = NetomitySystem.Factory(); var tp = new TCPClient(address: "192.168.12.161", port: 3333); var plm = new Insteon(iface: tp); var test_lamp = new StateDevice(address: "00.5B.5d", iface: plm) { Name = "TestLamp1" }; var master_fan = new StateDevice(address: "1f.ad.76", iface: plm) { Name = "Master Fan" }; var master_light = new StateDevice(address: "38.2e.a2", iface: plm) { Name = "Master Light" }; var Bedtime = new Scene(devices: new List <StateDevice>() { test_lamp }) { Name = "Bedtime" }; //var rh = new RestHost(address: BASE_ADDR); var wh = new WebHost(address: BASE_ADDR, filePath: BASE_FOLDER); ns.Run(); }