Coder Social home page Coder Social logo

eidetic-av / bixplugins Goto Github PK

View Code? Open in Web Editor NEW

This project forked from davidfbakker/bixplugins

1.0 2.0 0.0 71.51 MB

Some random plugins for home automation

License: MIT License

C# 90.02% Batchfile 0.08% ASP 7.10% JavaScript 0.22% CSS 2.59%

bixplugins's Introduction

BIXPlugins

Some random plugins for home automation. I mainly am working on BixLIFXConsole

BixLIFXConsole

this console app simply controls your LIFX bulbs. It listens on a http port to control the lights. It listens on all IP address on port 9105 The commands it supports are

  • ListLights=1 - List all the discovered LIFX bulbs
  • ListColors=1 - List all the supported colors.
  • Power=On/Off/Toggle - As it says
  • Dim=20 - 1-100 to dim a light
  • Color= - Sets a color ,This can be kelvin (2500-9000), HTML hex (#RRGGBB) or a name Red/LawnGreen
  • Light= - The LIFX light name. this can also be ALL or if you dont use a full name it will match (StartOf) any bulb label to that value. So "Office Light" will work on a bulb called "Office Light" or all bulbs starting with "Office Light" in their label
  • UpdateState=1 - Force a state update (useful if the bulbs were modified outside of this program)
  • Log=1 - Show the last 100 log entries
  • Status=1 - Show the status of all the bulbs
  • UpdateState=1 - Update the state of all the bulbs

Examples:

http://localhost:9105/?Light=Office Light 1&Power=On&Dim=80&Color=Pink - Turn on "Office Light 1", set the DIM to 80% and make the color pink**

http://localhost:9105/?Light=Office Light&Power=Toggle - Toggle the light state for all lights starting with "Office Light"**

http://localhost:9105/?Light=Office Light&Power=On&Dim=80&Color=2700 - Turn on all "Office Light"s Dim to 80% and make it a white color of kelvin 2700**

So the cool thing is you can use any home automation software to simply trigger this. I have Amazon Echo Bridge (https://github.com/armzilla/amazon-echo-ha-bridge) running with some bindings for the bulbs. This way alexa can control them. I also have homeseer using it with some virtual bulbs.

Bridge setup is simple. Make a manual entry

  • Name "Office Light 1" - bulb label
  • Device type TCP

On URL http://192.168.1.19:9105/?Light=Office%20Light%201&Power=On

Off URL http://192.168.1.19:9105/?Light=Office%20Light%201&Power=Off

Dim URL http://192.168.1.19:9105/?Light=Office%20Light%201&Power=On&Dim=${intensity.percent}

Then i can have alexa power or dim the bulb

Homeseer: create a dimable virtual device and create an event to pass the state change to a homeseer script. The event executes the script on a value changed with:

  • Sub: LightParseCommand
  • Parameters: Office Light 1

Here is the script: The script (C#):

using System.Net;
using HomeSeerAPI;
using Scheduler;
using Scheduler.Classes;

private const string BaseUrl = @"http://192.168.1.19:9105/?";

public object LightCommand(string command)
{
    var page = BaseUrl + command;
    hs.WriteLog("Info", "Sending " + page);

    System.Net.WebClient webClient = new System.Net.WebClient();
    string response = webClient.DownloadString(page);
    webClient.Dispose();


    return 0;
}

TPLinkConsole

Contorl your TP wall plugs and light switches

Example

TPLinkConsole.exe ON

bixplugins's People

Contributors

davidfbakker avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.