Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Python API to utilise the Somfy Synergy JsonRPC API

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for somfy-mylink-synergy, version 1.0.6
Filename, size File type Python version Upload date Hashes
Filename, size somfy_mylink_synergy-1.0.6-py3-none-any.whl (4.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size somfy_mylink_synergy-1.0.6.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page