Skip to main content

Shelly Easy Smart Home Automation

SHELLY: The go-to access control for smart homes.

This Python library provides convenient access to the Shelly cloud API, allowing you to manage your relays, rollers and lights.

Shelly Shop
Request Feature/Suggestion: https://forms.gle/efGD5DuTpWsX96GG7

Download stats

Downloads

Installation

pip install shelly_control

Shelly supports Python 3+.

Usage

Default

import shelly_control

Authentication

Before making requests, you need to authenticate using your Shelly API key. Initialize the Connect class with your API key:

from shelly_control import Connect

base_url = "Your Cloud Server Address"
api_key = "Your Authorization cloud key"
sh = Connect(base_url,api_key)

OR

import shelly_control 

base_url = "Your Cloud Server Address"
api_key = "Your Authorization cloud key"
sh = shelly_control.Connect(base_url,api_key)

Get Key & Server address from here Shelly Control Cloud Dashboard

Relay

Fetch Devices

# Fetch device status
sh.get_device('device_id')

Control Devices

# Control device
sh.control_device(channel , 'on'/'off' , device_id)

Bulk Control Devices

# Bulk Control device
sh.bulk_control_relays('devices')

# Parameters:
#        - devices (list of dict): List of devices to control, each device should be a dictionary with keys:
#            - "id" (int): ID of the device.
#            - "channel" (int): Index of the relay or switch component.

Rollers

Control Roller Direction

# Control Roller
sh.control_roller_direction(direction , device_id)

Control Roller Position

# Control Roller
sh.control_roller_position(position , device_id)

Bulk Control Roller

# Bulk Control Roller
sh.bulk_control_rollers(device_id)

Lights

Control Lights

# Bulk Control Roller
sh.control_light(turn=None , white=None , red=None , green=None , blue=None , gain=None , device_id=None)

Release files for shelly-control 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shelly-control 0.3
File Size Uploaded
shelly_control-0.3.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shelly-control 0.3
File Interpreter ABI Platform
shelly_control-0.3-py3-none-any.whl Python 3 none any Details

Total release size: 11.9 kB

Release files / shelly_control-0.3.tar.gz

Download URL shelly_control-0.3.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1baf1193c9dea00233745f8fd0dc354db5289a18f9c0504440dbbec762332d5e
BLAKE2b-256 checksum
How to use checksums
cae7b14d6ecf11d0ee1aa019506fa106eae171e71cbe904d5dc6f0a02ade1653
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.8

Release files / shelly_control-0.3-py3-none-any.whl

Download URL shelly_control-0.3-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b767cabf3d79351808512858493a3a77df892c81a759c6a240fda8979d86f3a3
BLAKE2b-256 checksum
How to use checksums
e6948569c0d90bca2d49b40c6f466fe86bfb3405ae8b05cb7d765031126f60a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page