GithubHelp home page GithubHelp logo

presslab-us / somfy-mylink-synergy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bendews/somfy-mylink-synergy

0.0 1.0 0.0 9 KB

Python API to simplify interactions with a Somfy MyLink device

License: MIT License

Python 100.00%

somfy-mylink-synergy's Introduction

Build Status

Somfy MyLink Synergy API

Python API to utilise the Somfy Synergy API utilising JsonRPC.

Requirements

  • Python >= 3.5.2

Usage

import asyncio
from somfy_mylink_synergy import SomfyMyLinkSynergy

loop = asyncio.get_event_loop()
mylink = SomfyMyLinkSynergy('YourSystemID', '10.1.1.50')


mylink_covers = loop.run_until_complete(mylink.status_info())
for device in mylink_covers['result']:
    print(device['targetID'], device['name'])

# ('CC0000A.1', 'Bedroom Cover')
# ('CC0000A.2', 'Kitchen Cover')

mylink_scenes = loop.run_until_complete(mylink.scene_list())
for scene in mylink_scenes['result']:
    print(scene['sceneID'], scene['name'])

# ('123456789', 'Morning')
# ('987654321', 'Evening')

mylink_ping = loop.run_until_complete(mylink.status_ping())
for device in mylink_ping['result']:
    print(device)

# ('CC0000A.1')
# ('CC0000A.2')

open_cover = loop.run_until_complete(mylink.move_up('CC0000A.1'))
close_cover = loop.run_until_complete(mylink.move_down('CC0000A.1'))
stop_cover = loop.run_until_complete(mylink.move_stop('CC0000A.1'))
activate_scene = loop.run_until_complete(mylink.scene_run('123456789'))

TODO:

  • None

License

MIT

Author Information

Created in 2018 by Ben Dews

somfy-mylink-synergy's People

Contributors

bendews avatar

Watchers

 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.