Code Monkey home page Code Monkey logo

sinricpropyoo's Introduction

Alexa reactive interface Python3-OO (w/ SinricPro)

A virtual device library integrable with Alexa for Python coding.

Dependences:

sinric-pro python-sdk: pip install sinricpro --user

Code implements

Imports

from classes.clientwrapper import ClientWrapper
from classes.things import Switch # All used classes

In practice

def plug1_powerState(arg):
    print("powerPlug1 powerState=",arg)
    return True,arg[0]
    
powerPlug1 = Switch(thing_1)
powerPlug1.powerState(plug1_powerState)
    
devices = [powerPlug1] # your device objects
wrap = ClientWrapper(devices, appKey, secretKey)
wrap.start()

Implemented classes:

Switch

Function Attributes
powerState str arg[0]: 'On' or 'Off'

DimmerSwitch

Function Attributes
powerState str arg[0]: 'On' or 'Off'
powerLevel int arg[0]: 1..100

Light

Function Attributes
setPowerState str arg[0]: 'On' or 'Off'
setOnSetBrightness int arg[0]: 1..100
setOnSetColor int arg[0]: 0-255
int arg[1]: 0-255
int arg[2]: 0-255
setOnSetColorTemperature int arg[0]: temperature in K

TV

Function Attributes
setPowerState str arg[0]: 'On' or 'Off'
setVolume int arg[0]: 0..100
adjustVolume int arg[0]: -100..100
setMute bool arg[0]: True/False
mediaControl str arg[0]: 'Play','Pause','FastForward','Rewind','Next','Previous'
selectInput str arg[0]: 'HDMI', ...
changeChannel str arg[0]: channelName
skipChannels int arg[0]: N

sinricpropyoo's People

Contributors

jeimison3 avatar

Stargazers

 avatar  avatar  avatar  avatar  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.