# Switcher Python Integration</br>[![pypi-version]][11] [![pypi-downloads]][11] [![license-badge]][4]
[![gh-build-status]][7] [![gh-pages-status]][8] [![codecov]][3]
PyPi module integrating with various [Switcher][12] devices.</br>
Check out the [wiki pages][0] for a list of supported devices.
```shell
pip install aioswitcher
```
<table>
<td><a href="https://aioswitcher.tomfi.info/">Documentation</a></td>
<td><a href="https://github.com/TomerFi/aioswitcher/wiki">Wiki</a></td>
<td><a href="https://github.com/TomerFi/aioswitcher/blob/dev/CONTRIBUTING.md">Contributing</a></td>
</table>
## Example Usage
<details>
<summary>State Bridge</summary>
```python
async def print_devices(delay):
def on_device_found_callback(device):
# a switcher device will broadcast a state message approximately every 4 seconds
print(asdict(device))
async with SwitcherBridge(on_device_found_callback):
await asyncio.sleep(delay)
# run the bridge for 60 seconds
asyncio.run(print_devices(60))
```
</details>
<details>
<summary>Power Plug API</summary>
```python
async def control_power_plug(device_type, device_ip, device_id, device_key) :
# for connecting to a device we need its type, id, login key and ip address
async with SwitcherApi(device_type, device_ip, device_id, device_key) as api:
# get the device current state
await api.get_state()
# turn the device on
await api.control_device(Command.ON)
# turn the device off
await api.control_device(Command.OFF)
# set the device name to 'my new name'
await api.set_device_name("my new name")
asyncio.run(control_power_plug(DeviceType.POWER_PLUG, "111.222.11.22", "ab1c2d", "00"))
```
</details>
<details>
<summary>Water Heater API</summary>
```python
async def control_water_heater(device_type, device_ip, device_id, device_key) :
# for connecting to a device we need its type, id, login key and ip address
async with SwitcherApi(device_type, device_ip, device_id, device_key) as api:
# get the device current state
await api.get_state()
# turn the device on for 15 minutes
await api.control_device(Command.ON, 15)
# turn the device off
await api.control_device(Command.OFF)
# set the device name to 'my new name'
await api.set_device_name("my new name")
# configure the device for 02:30 auto shutdown
await api.set_auto_shutdown(timedelta(hours=2, minutes=30))
# get the schedules from the device
await api.get_schedules()
# delete and existing schedule with id 1
await api.delete_schedule("1")
# create a new recurring schedule for 13:00-14:30
# executing on sunday and friday
await api.create_schedule("13:00", "14:30", {Days.SUNDAY, Days.FRIDAY})
asyncio.run(control_water_heater(DeviceType.MINI, "111.222.11.22", "ab1c2d" , "00"))
asyncio.run(control_water_heater(DeviceType.TOUCH, "111.222.11.22", "ab1c2d" , "00"))
asyncio.run(control_water_heater(DeviceType.V2_ESP, "111.222.11.22", "ab1c2d" , "00"))
asyncio.run(control_water_heater(DeviceType.V2_QCA, "111.222.11.22", "ab1c2d" , "00"))
asyncio.run(control_water_heater(DeviceType.V4, "111.222.11.22", "ab1c2d" , "00"))
```
</details>
<details>
<summary>Runner API</summary>
```python
async def control_runner(device_type, device_ip, device_id, device_key, token) :
# for connecting to a device we need its type, id, login key and ip address
async with SwitcherApi(device_type, device_ip, device_id, device_key, token) as api:
# get the shutter current state, circuit number is 0
await api.get_shutter_state(0)
# open the shutter to 30%, circuit number is 0
await api.set_position(30, 0)
# stop the shutter if currently rolling, circuit number is 0
await api.stop_shutter(0)
# turn on the light, circuit number is 0 (Only for Runner S11 and Runner S12)
await api.set_light(DeviceState.ON, 0)
# turn off the light, circuit number is 0 (Only for Runner S11 and Runner S12)
await api.set_light(DeviceState.OFF, 0)
asyncio.run(control_runner(DeviceType.RUNNER, "111.222.11.22", "ab1c2d", "00"))
asyncio.run(control_runner(DeviceType.RUNNER_MINI, "111.222.11.22", "ab1c2d", "00"))
asyncio.run(control_runner(DeviceType.RUNNER_S11, "111.222.11.22", "ab1c2d", "00", "zvVvd7JxtN7CgvkD1Psujw=="))
asyncio.run(control_runner(DeviceType.RUNNER_S12, "111.222.11.22", "ab1c2d", "00", "zvVvd7JxtN7CgvkD1Psujw=="))
```
</details>
<details>
<summary>Breeze API</summary>
```python
async def control_breeze(device_type, device_ip, device_id, device_key, remote_manager, remote_id) :
# for connecting to a device we need its type, id, login key and ip address
async with SwitcherApi(device_type, device_ip, device_id, device_key) as api:
# get the device current state
await api.get_breeze_state()
# initialize the Breeze RemoteManager and get the remote
remote = remote_manager.get_remote(remote_id)
# prepare a control command that turns on the Breeze
# set to 24 degree (Celsius) cooling with vertical swing
# send command to the device
await api.control_breeze_device(
remote,
DeviceState.ON,
ThermostatMode.COOL,
24,
ThermostatFanLevel.MEDIUM,
ThermostatSwing.ON,
)
# create the remote manager outside the context for re-using
remote_manager = SwitcherBreezeRemoteManager()
asyncio.run(control_breeze(DeviceType.BREEZE, "111.222.11.22", "ab1c2d", "00", remote_manager, "DLK65863"))
```
</details>
<details>
<summary>Light API</summary>
```python
async def control_light(device_type, device_ip, device_id, device_key, token) :
# for connecting to a device we need its type, id, login key and ip address
async with SwitcherApi(device_type, device_ip, device_id, device_key, token) as api:
# get the light current state, circuit number is 0
await api.get_light_state(0)
# turn on the light, circuit number is 0 (Only for Runner S11, Runner S12 and Lights)
await api.set_light(DeviceState.ON, 0)
# turn off the light, circuit number is 0 (Only for Runner S11, Runner S12 and Lights)
await api.set_light(DeviceState.OFF, 0)
asyncio.run(control_light(DeviceType.LIGHT_SL01, "111.222.11.22", "ab1c2d", "00", "zvVvd7JxtN7CgvkD1Psujw=="))
asyncio.run(control_light(DeviceType.LIGHT_SL01_MINI, "111.222.11.22", "ab1c2d", "00", "zvVvd7JxtN7CgvkD1Psujw=="))
asyncio.run(control_light(DeviceType.LIGHT_SL02, "111.222.11.22", "ab1c2d", "00", "zvVvd7JxtN7CgvkD1Psujw=="))
asyncio.run(control_light(DeviceType.LIGHT_SL02_MINI, "111.222.11.22", "ab1c2d", "00", "zvVvd7JxtN7CgvkD1Psujw=="))
asyncio.run(control_light(DeviceType.LIGHT_SL03, "111.222.11.22", "ab1c2d", "00", "zvVvd7JxtN7CgvkD1Psujw=="))
```
</details>
## Command Line Helper Scripts
- [discover_devices.py](https://github.com/TomerFi/aioswitcher/blob/dev/scripts/discover_devices.py) can discover devices and their states (can be run by `poetry run discover_devices`).
- [control_device.py](https://github.com/TomerFi/aioswitcher/blob/dev/scripts/control_device.py) can control a device (can be run by `poetry run control_device`).
- [get_device_login_key.py](https://github.com/TomerFi/aioswitcher/blob/dev/scripts/get_device_login_key) can get a device login key (can be run by `poetry run get_device_login_key`).
- [validate_token.py](https://github.com/TomerFi/aioswitcher/blob/dev/scripts/validate_token.py) can validate a device token which is a must for newer devices, used for communicating with devices (can be run by `poetry run validate_token`).
## Disclaimer
This is **NOT** an official module and it is **NOT** officially supported by the vendor.</br>
That said, thanks are in order to all the people at [Switcher][12] for their cooperation and general support.
## Contributors [![all-contributors]][2]
Thanks goes to these wonderful people ([emoji key][1]):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/aviadgolan"><img src="https://avatars.githubusercontent.com/u/17742111?v=4?s=100" width="100px;" alt="Aviad Golan"/><br /><sub><b>Aviad Golan</b></sub></a><br /><a href="#data-AviadGolan" title="Data">🔣</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dolby360"><img src="https://avatars.githubusercontent.com/u/22151399?v=4?s=100" width="100px;" alt="Dolev Ben Aharon"/><br /><sub><b>Dolev Ben Aharon</b></sub></a><br /><a href="https://github.com/TomerFi/aioswitcher/commits?author=dolby360" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://fabian-affolter.ch/blog/"><img src="https://avatars.githubusercontent.com/u/116184?v=4?s=100" width="100px;" alt="Fabian Affolter"/><br /><sub><b>Fabian Affolter</b></sub></a><br /><a href="https://github.com/TomerFi/aioswitcher/commits?author=fabaff" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/oranja"><img src="https://avatars.githubusercontent.com/u/679184?v=4?s=100" width="100px;" alt="Itzik Ephraim"/><br /><sub><b>Itzik Ephraim</b></sub></a><br /><a href="https://github.com/TomerFi/aioswitcher/commits?author=oranja" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Kesav890"><img src="https://avatars.githubusercontent.com/u/82559951?v=4?s=100" width="100px;" alt="Kesav890"/><br /><sub><b>Kesav890</b></sub></a><br /><a href="https://github.com/TomerFi/aioswitcher/commits?author=Kesav890" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://liad.avrah.am"><img src="https://avatars.githubusercontent.com/u/7263223?v=4?s=100" width="100px;" alt="Liad Avraham"/><br /><sub><b>Liad Avraham</b></sub></a><br /><a href="https://github.com/TomerFi/aioswitcher/commits?author=liadav" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/cdce8p"><img src="https://avatars.githubusercontent.com/u/30130371?v=4?s=100" width="100px;" alt="Marc Mueller"/><br /><sub><b>Marc Mueller</b></sub></a><br /><a href="https://github.com/TomerFi/aioswitcher/commits?author=cdce8p" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/OrBin"><img src="https://avatars.githubusercontent.com/u/6897234?v=4?s=100" width="100px;" alt="Or Bin"/><br /><sub><b>Or Bin</b></sub></a><br /><a href="https://github.com/TomerFi/aioswitcher/commits?author=OrBin" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/5c077m4n"><img src="https://avatars.githubusercontent.com/u/35409124?v=4?s=100" width="100px;" alt="Roeeeee"/><br /><sub><b>Roeeeee</b></sub></a><br /><a href="https://github.com/TomerFi/aioswitcher/commits?author=5c077m4n" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://exploit.co.il"><img src="https://avatars.githubusercontent.com/u/1768915?v=4?s=100" width="100px;" alt="Shai rod"/><br /><sub><b>Shai rod</b></sub></a><br /><a href="#data-nightrang3r" title="Data">🔣</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/thecode"><img src="https://avatars.githubusercontent.com/u/1858925?v=4?s=100" width="100px;" alt="Shay Levy"/><br /><sub><b>Shay Levy</b></sub></a><br /><a href="https://github.com/TomerFi/aioswitcher/commits?author=thecode" title="Code">💻</a> <a href="#ideas-thecode" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-thecode" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/YogevBokobza"><img src="https://avatars.githubusercontent.com/u/22839127?v=4?s=100" width="100px;" alt="YogevBokobza"/><br /><sub><b>YogevBokobza</b></sub></a><br /><a href="https://github.com/TomerFi/aioswitcher/commits?author=YogevBokobza" title="Code">💻</a> <a href="https://github.com/TomerFi/aioswitcher/commits?author=YogevBokobza" title="Tests">⚠️</a> <a href="#maintenance-YogevBokobza" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gmyuval"><img src="https://avatars.githubusercontent.com/u/28506179?v=4?s=100" width="100px;" alt="Yuval Moran"/><br /><sub><b>Yuval Moran</b></sub></a><br /><a href="https://github.com/TomerFi/aioswitcher/commits?author=gmyuval" title="Code">💻</a> <a href="https://github.com/TomerFi/aioswitcher/commits?author=gmyuval" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ayal"><img src="https://avatars.githubusercontent.com/u/121446?v=4?s=100" width="100px;" alt="ayal"/><br /><sub><b>ayal</b></sub></a><br /><a href="https://github.com/TomerFi/aioswitcher/issues?q=author%3Aayal" title="Bug reports">🐛</a> <a href="https://github.com/TomerFi/aioswitcher/commits?author=ayal" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dmatik"><img src="https://avatars.githubusercontent.com/u/5577386?v=4?s=100" width="100px;" alt="dmatik"/><br /><sub><b>dmatik</b></sub></a><br /><a href="#blog-dmatik" title="Blogposts">📝</a> <a href="#ideas-dmatik" title="Ideas, Planning, & Feedback">🤔</a> <a href="#userTesting-dmatik" title="User Testing">📓</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/epenet"><img src="https://avatars.githubusercontent.com/u/6771947?v=4?s=100" width="100px;" alt="epenet"/><br /><sub><b>epenet</b></sub></a><br /><a href="https://github.com/TomerFi/aioswitcher/issues?q=author%3Aepenet" title="Bug reports">🐛</a> <a href="https://github.com/TomerFi/aioswitcher/commits?author=epenet" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jafar-atili"><img src="https://avatars.githubusercontent.com/u/19508787?v=4?s=100" width="100px;" alt="jafar-atili"/><br /><sub><b>jafar-atili</b></sub></a><br /><a href="https://github.com/TomerFi/aioswitcher/commits?author=jafar-atili" title="Code">💻</a> <a href="https://github.com/TomerFi/aioswitcher/commits?author=jafar-atili" title="Documentation">📖</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
<!-- Real Links -->
[0]: https://github.com/TomerFi/aioswitcher/wiki
[1]: https://allcontributors.org/docs/en/emoji-key
[2]: https://allcontributors.org
[3]: https://codecov.io/gh/TomerFi/aioswitcher
[4]: https://github.com/TomerFi/aioswitcher
[7]: https://github.com/TomerFi/aioswitcher/actions/workflows/stage.yml
[8]: https://aioswitcher.tomfi.info/
[11]: https://pypi.org/project/aioswitcher
[12]: https://www.switcher.co.il/
<!-- Badges Links -->
[all-contributors]: https://img.shields.io/github/all-contributors/tomerfi/aioswitcher?color=ee8449&style=flat-square
[codecov]: https://codecov.io/gh/TomerFi/aioswitcher/graph/badge.svg
[gh-build-status]: https://github.com/TomerFi/aioswitcher/actions/workflows/stage.yml/badge.svg
[gh-pages-status]: https://github.com/TomerFi/aioswitcher/actions/workflows/pages.yml/badge.svg
[license-badge]: https://img.shields.io/github/license/tomerfi/aioswitcher
[pypi-downloads]: https://img.shields.io/pypi/dm/aioswitcher.svg?logo=pypi&color=1082C2
[pypi-version]: https://img.shields.io/pypi/v/aioswitcher?logo=pypi
Raw data
{
"_id": null,
"home_page": "https://pypi.org/project/aioswitcher/",
"name": "aioswitcher",
"maintainer": "Shay Levy",
"docs_url": null,
"requires_python": "<4.0.0,>=3.9.0",
"maintainer_email": null,
"keywords": "home, automation, switcher, smart",
"author": "Tomer Figenblat",
"author_email": "tomer@tomfi.info",
"download_url": "https://files.pythonhosted.org/packages/a3/57/ad422fe4d97f098a596acced826046ae76cb7428ab53edf6f74dea7a1fa0/aioswitcher-5.1.1.tar.gz",
"platform": null,
"description": "# Switcher Python Integration</br>[![pypi-version]][11] [![pypi-downloads]][11] [![license-badge]][4]\n\n[![gh-build-status]][7] [![gh-pages-status]][8] [![codecov]][3]\n\nPyPi module integrating with various [Switcher][12] devices.</br>\nCheck out the [wiki pages][0] for a list of supported devices.\n\n```shell\npip install aioswitcher\n```\n\n<table>\n <td><a href=\"https://aioswitcher.tomfi.info/\">Documentation</a></td>\n <td><a href=\"https://github.com/TomerFi/aioswitcher/wiki\">Wiki</a></td>\n <td><a href=\"https://github.com/TomerFi/aioswitcher/blob/dev/CONTRIBUTING.md\">Contributing</a></td>\n</table>\n\n## Example Usage\n\n<details>\n <summary>State Bridge</summary>\n\n```python\nasync def print_devices(delay):\n def on_device_found_callback(device):\n # a switcher device will broadcast a state message approximately every 4 seconds\n print(asdict(device))\n\n async with SwitcherBridge(on_device_found_callback):\n await asyncio.sleep(delay)\n\n# run the bridge for 60 seconds\nasyncio.run(print_devices(60))\n```\n\n</details>\n\n<details>\n <summary>Power Plug API</summary>\n\n ```python\n async def control_power_plug(device_type, device_ip, device_id, device_key) :\n # for connecting to a device we need its type, id, login key and ip address\n async with SwitcherApi(device_type, device_ip, device_id, device_key) as api:\n # get the device current state\n await api.get_state()\n # turn the device on\n await api.control_device(Command.ON)\n # turn the device off\n await api.control_device(Command.OFF)\n # set the device name to 'my new name'\n await api.set_device_name(\"my new name\")\n\n asyncio.run(control_power_plug(DeviceType.POWER_PLUG, \"111.222.11.22\", \"ab1c2d\", \"00\"))\n ```\n\n</details>\n\n<details>\n <summary>Water Heater API</summary>\n\n ```python\n async def control_water_heater(device_type, device_ip, device_id, device_key) :\n # for connecting to a device we need its type, id, login key and ip address\n async with SwitcherApi(device_type, device_ip, device_id, device_key) as api:\n # get the device current state\n await api.get_state()\n # turn the device on for 15 minutes\n await api.control_device(Command.ON, 15)\n # turn the device off\n await api.control_device(Command.OFF)\n # set the device name to 'my new name'\n await api.set_device_name(\"my new name\")\n # configure the device for 02:30 auto shutdown\n await api.set_auto_shutdown(timedelta(hours=2, minutes=30))\n # get the schedules from the device\n await api.get_schedules()\n # delete and existing schedule with id 1\n await api.delete_schedule(\"1\")\n # create a new recurring schedule for 13:00-14:30\n # executing on sunday and friday\n await api.create_schedule(\"13:00\", \"14:30\", {Days.SUNDAY, Days.FRIDAY})\n\n asyncio.run(control_water_heater(DeviceType.MINI, \"111.222.11.22\", \"ab1c2d\" , \"00\"))\n asyncio.run(control_water_heater(DeviceType.TOUCH, \"111.222.11.22\", \"ab1c2d\" , \"00\"))\n asyncio.run(control_water_heater(DeviceType.V2_ESP, \"111.222.11.22\", \"ab1c2d\" , \"00\"))\n asyncio.run(control_water_heater(DeviceType.V2_QCA, \"111.222.11.22\", \"ab1c2d\" , \"00\"))\n asyncio.run(control_water_heater(DeviceType.V4, \"111.222.11.22\", \"ab1c2d\" , \"00\"))\n ```\n\n</details>\n\n<details>\n <summary>Runner API</summary>\n\n ```python\n async def control_runner(device_type, device_ip, device_id, device_key, token) :\n # for connecting to a device we need its type, id, login key and ip address\n async with SwitcherApi(device_type, device_ip, device_id, device_key, token) as api:\n # get the shutter current state, circuit number is 0\n await api.get_shutter_state(0)\n # open the shutter to 30%, circuit number is 0\n await api.set_position(30, 0)\n # stop the shutter if currently rolling, circuit number is 0\n await api.stop_shutter(0)\n # turn on the light, circuit number is 0 (Only for Runner S11 and Runner S12)\n await api.set_light(DeviceState.ON, 0)\n # turn off the light, circuit number is 0 (Only for Runner S11 and Runner S12)\n await api.set_light(DeviceState.OFF, 0)\n\n asyncio.run(control_runner(DeviceType.RUNNER, \"111.222.11.22\", \"ab1c2d\", \"00\"))\n asyncio.run(control_runner(DeviceType.RUNNER_MINI, \"111.222.11.22\", \"ab1c2d\", \"00\"))\n asyncio.run(control_runner(DeviceType.RUNNER_S11, \"111.222.11.22\", \"ab1c2d\", \"00\", \"zvVvd7JxtN7CgvkD1Psujw==\"))\n asyncio.run(control_runner(DeviceType.RUNNER_S12, \"111.222.11.22\", \"ab1c2d\", \"00\", \"zvVvd7JxtN7CgvkD1Psujw==\"))\n ```\n\n</details>\n\n<details>\n <summary>Breeze API</summary>\n\n ```python\n async def control_breeze(device_type, device_ip, device_id, device_key, remote_manager, remote_id) :\n # for connecting to a device we need its type, id, login key and ip address\n async with SwitcherApi(device_type, device_ip, device_id, device_key) as api:\n # get the device current state\n await api.get_breeze_state()\n # initialize the Breeze RemoteManager and get the remote\n remote = remote_manager.get_remote(remote_id)\n # prepare a control command that turns on the Breeze\n # set to 24 degree (Celsius) cooling with vertical swing\n # send command to the device\n await api.control_breeze_device(\n remote,\n DeviceState.ON,\n ThermostatMode.COOL,\n 24,\n ThermostatFanLevel.MEDIUM,\n ThermostatSwing.ON,\n )\n\n # create the remote manager outside the context for re-using\n remote_manager = SwitcherBreezeRemoteManager()\n asyncio.run(control_breeze(DeviceType.BREEZE, \"111.222.11.22\", \"ab1c2d\", \"00\", remote_manager, \"DLK65863\"))\n ```\n\n</details>\n\n<details>\n <summary>Light API</summary>\n\n ```python\n async def control_light(device_type, device_ip, device_id, device_key, token) :\n # for connecting to a device we need its type, id, login key and ip address\n async with SwitcherApi(device_type, device_ip, device_id, device_key, token) as api:\n # get the light current state, circuit number is 0\n await api.get_light_state(0)\n # turn on the light, circuit number is 0 (Only for Runner S11, Runner S12 and Lights)\n await api.set_light(DeviceState.ON, 0)\n # turn off the light, circuit number is 0 (Only for Runner S11, Runner S12 and Lights)\n await api.set_light(DeviceState.OFF, 0)\n\n asyncio.run(control_light(DeviceType.LIGHT_SL01, \"111.222.11.22\", \"ab1c2d\", \"00\", \"zvVvd7JxtN7CgvkD1Psujw==\"))\n asyncio.run(control_light(DeviceType.LIGHT_SL01_MINI, \"111.222.11.22\", \"ab1c2d\", \"00\", \"zvVvd7JxtN7CgvkD1Psujw==\"))\n asyncio.run(control_light(DeviceType.LIGHT_SL02, \"111.222.11.22\", \"ab1c2d\", \"00\", \"zvVvd7JxtN7CgvkD1Psujw==\"))\n asyncio.run(control_light(DeviceType.LIGHT_SL02_MINI, \"111.222.11.22\", \"ab1c2d\", \"00\", \"zvVvd7JxtN7CgvkD1Psujw==\"))\n asyncio.run(control_light(DeviceType.LIGHT_SL03, \"111.222.11.22\", \"ab1c2d\", \"00\", \"zvVvd7JxtN7CgvkD1Psujw==\"))\n ```\n\n</details>\n\n## Command Line Helper Scripts\n\n- [discover_devices.py](https://github.com/TomerFi/aioswitcher/blob/dev/scripts/discover_devices.py) can discover devices and their states (can be run by `poetry run discover_devices`).\n- [control_device.py](https://github.com/TomerFi/aioswitcher/blob/dev/scripts/control_device.py) can control a device (can be run by `poetry run control_device`).\n- [get_device_login_key.py](https://github.com/TomerFi/aioswitcher/blob/dev/scripts/get_device_login_key) can get a device login key (can be run by `poetry run get_device_login_key`).\n- [validate_token.py](https://github.com/TomerFi/aioswitcher/blob/dev/scripts/validate_token.py) can validate a device token which is a must for newer devices, used for communicating with devices (can be run by `poetry run validate_token`).\n\n## Disclaimer\n\nThis is **NOT** an official module and it is **NOT** officially supported by the vendor.</br>\nThat said, thanks are in order to all the people at [Switcher][12] for their cooperation and general support.\n\n## Contributors [![all-contributors]][2]\n\nThanks goes to these wonderful people ([emoji key][1]):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n <tbody>\n <tr>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/aviadgolan\"><img src=\"https://avatars.githubusercontent.com/u/17742111?v=4?s=100\" width=\"100px;\" alt=\"Aviad Golan\"/><br /><sub><b>Aviad Golan</b></sub></a><br /><a href=\"#data-AviadGolan\" title=\"Data\">\ud83d\udd23</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/dolby360\"><img src=\"https://avatars.githubusercontent.com/u/22151399?v=4?s=100\" width=\"100px;\" alt=\"Dolev Ben Aharon\"/><br /><sub><b>Dolev Ben Aharon</b></sub></a><br /><a href=\"https://github.com/TomerFi/aioswitcher/commits?author=dolby360\" title=\"Documentation\">\ud83d\udcd6</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://fabian-affolter.ch/blog/\"><img src=\"https://avatars.githubusercontent.com/u/116184?v=4?s=100\" width=\"100px;\" alt=\"Fabian Affolter\"/><br /><sub><b>Fabian Affolter</b></sub></a><br /><a href=\"https://github.com/TomerFi/aioswitcher/commits?author=fabaff\" title=\"Code\">\ud83d\udcbb</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/oranja\"><img src=\"https://avatars.githubusercontent.com/u/679184?v=4?s=100\" width=\"100px;\" alt=\"Itzik Ephraim\"/><br /><sub><b>Itzik Ephraim</b></sub></a><br /><a href=\"https://github.com/TomerFi/aioswitcher/commits?author=oranja\" title=\"Code\">\ud83d\udcbb</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/Kesav890\"><img src=\"https://avatars.githubusercontent.com/u/82559951?v=4?s=100\" width=\"100px;\" alt=\"Kesav890\"/><br /><sub><b>Kesav890</b></sub></a><br /><a href=\"https://github.com/TomerFi/aioswitcher/commits?author=Kesav890\" title=\"Documentation\">\ud83d\udcd6</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://liad.avrah.am\"><img src=\"https://avatars.githubusercontent.com/u/7263223?v=4?s=100\" width=\"100px;\" alt=\"Liad Avraham\"/><br /><sub><b>Liad Avraham</b></sub></a><br /><a href=\"https://github.com/TomerFi/aioswitcher/commits?author=liadav\" title=\"Code\">\ud83d\udcbb</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/cdce8p\"><img src=\"https://avatars.githubusercontent.com/u/30130371?v=4?s=100\" width=\"100px;\" alt=\"Marc Mueller\"/><br /><sub><b>Marc Mueller</b></sub></a><br /><a href=\"https://github.com/TomerFi/aioswitcher/commits?author=cdce8p\" title=\"Code\">\ud83d\udcbb</a></td>\n </tr>\n <tr>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/OrBin\"><img src=\"https://avatars.githubusercontent.com/u/6897234?v=4?s=100\" width=\"100px;\" alt=\"Or Bin\"/><br /><sub><b>Or Bin</b></sub></a><br /><a href=\"https://github.com/TomerFi/aioswitcher/commits?author=OrBin\" title=\"Code\">\ud83d\udcbb</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/5c077m4n\"><img src=\"https://avatars.githubusercontent.com/u/35409124?v=4?s=100\" width=\"100px;\" alt=\"Roeeeee\"/><br /><sub><b>Roeeeee</b></sub></a><br /><a href=\"https://github.com/TomerFi/aioswitcher/commits?author=5c077m4n\" title=\"Code\">\ud83d\udcbb</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://exploit.co.il\"><img src=\"https://avatars.githubusercontent.com/u/1768915?v=4?s=100\" width=\"100px;\" alt=\"Shai rod\"/><br /><sub><b>Shai rod</b></sub></a><br /><a href=\"#data-nightrang3r\" title=\"Data\">\ud83d\udd23</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/thecode\"><img src=\"https://avatars.githubusercontent.com/u/1858925?v=4?s=100\" width=\"100px;\" alt=\"Shay Levy\"/><br /><sub><b>Shay Levy</b></sub></a><br /><a href=\"https://github.com/TomerFi/aioswitcher/commits?author=thecode\" title=\"Code\">\ud83d\udcbb</a> <a href=\"#ideas-thecode\" title=\"Ideas, Planning, & Feedback\">\ud83e\udd14</a> <a href=\"#maintenance-thecode\" title=\"Maintenance\">\ud83d\udea7</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/YogevBokobza\"><img src=\"https://avatars.githubusercontent.com/u/22839127?v=4?s=100\" width=\"100px;\" alt=\"YogevBokobza\"/><br /><sub><b>YogevBokobza</b></sub></a><br /><a href=\"https://github.com/TomerFi/aioswitcher/commits?author=YogevBokobza\" title=\"Code\">\ud83d\udcbb</a> <a href=\"https://github.com/TomerFi/aioswitcher/commits?author=YogevBokobza\" title=\"Tests\">\u26a0\ufe0f</a> <a href=\"#maintenance-YogevBokobza\" title=\"Maintenance\">\ud83d\udea7</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/gmyuval\"><img src=\"https://avatars.githubusercontent.com/u/28506179?v=4?s=100\" width=\"100px;\" alt=\"Yuval Moran\"/><br /><sub><b>Yuval Moran</b></sub></a><br /><a href=\"https://github.com/TomerFi/aioswitcher/commits?author=gmyuval\" title=\"Code\">\ud83d\udcbb</a> <a href=\"https://github.com/TomerFi/aioswitcher/commits?author=gmyuval\" title=\"Tests\">\u26a0\ufe0f</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/ayal\"><img src=\"https://avatars.githubusercontent.com/u/121446?v=4?s=100\" width=\"100px;\" alt=\"ayal\"/><br /><sub><b>ayal</b></sub></a><br /><a href=\"https://github.com/TomerFi/aioswitcher/issues?q=author%3Aayal\" title=\"Bug reports\">\ud83d\udc1b</a> <a href=\"https://github.com/TomerFi/aioswitcher/commits?author=ayal\" title=\"Code\">\ud83d\udcbb</a></td>\n </tr>\n <tr>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/dmatik\"><img src=\"https://avatars.githubusercontent.com/u/5577386?v=4?s=100\" width=\"100px;\" alt=\"dmatik\"/><br /><sub><b>dmatik</b></sub></a><br /><a href=\"#blog-dmatik\" title=\"Blogposts\">\ud83d\udcdd</a> <a href=\"#ideas-dmatik\" title=\"Ideas, Planning, & Feedback\">\ud83e\udd14</a> <a href=\"#userTesting-dmatik\" title=\"User Testing\">\ud83d\udcd3</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/epenet\"><img src=\"https://avatars.githubusercontent.com/u/6771947?v=4?s=100\" width=\"100px;\" alt=\"epenet\"/><br /><sub><b>epenet</b></sub></a><br /><a href=\"https://github.com/TomerFi/aioswitcher/issues?q=author%3Aepenet\" title=\"Bug reports\">\ud83d\udc1b</a> <a href=\"https://github.com/TomerFi/aioswitcher/commits?author=epenet\" title=\"Code\">\ud83d\udcbb</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/jafar-atili\"><img src=\"https://avatars.githubusercontent.com/u/19508787?v=4?s=100\" width=\"100px;\" alt=\"jafar-atili\"/><br /><sub><b>jafar-atili</b></sub></a><br /><a href=\"https://github.com/TomerFi/aioswitcher/commits?author=jafar-atili\" title=\"Code\">\ud83d\udcbb</a> <a href=\"https://github.com/TomerFi/aioswitcher/commits?author=jafar-atili\" title=\"Documentation\">\ud83d\udcd6</a></td>\n </tr>\n </tbody>\n</table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\n<!-- Real Links -->\n[0]: https://github.com/TomerFi/aioswitcher/wiki\n[1]: https://allcontributors.org/docs/en/emoji-key\n[2]: https://allcontributors.org\n[3]: https://codecov.io/gh/TomerFi/aioswitcher\n[4]: https://github.com/TomerFi/aioswitcher\n[7]: https://github.com/TomerFi/aioswitcher/actions/workflows/stage.yml\n[8]: https://aioswitcher.tomfi.info/\n[11]: https://pypi.org/project/aioswitcher\n[12]: https://www.switcher.co.il/\n<!-- Badges Links -->\n[all-contributors]: https://img.shields.io/github/all-contributors/tomerfi/aioswitcher?color=ee8449&style=flat-square\n[codecov]: https://codecov.io/gh/TomerFi/aioswitcher/graph/badge.svg\n[gh-build-status]: https://github.com/TomerFi/aioswitcher/actions/workflows/stage.yml/badge.svg\n[gh-pages-status]: https://github.com/TomerFi/aioswitcher/actions/workflows/pages.yml/badge.svg\n[license-badge]: https://img.shields.io/github/license/tomerfi/aioswitcher\n[pypi-downloads]: https://img.shields.io/pypi/dm/aioswitcher.svg?logo=pypi&color=1082C2\n[pypi-version]: https://img.shields.io/pypi/v/aioswitcher?logo=pypi\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Switcher Python Integration.",
"version": "5.1.1",
"project_urls": {
"Documentation": "https://aioswitcher.tomfi.info",
"Homepage": "https://pypi.org/project/aioswitcher/",
"Repository": "https://github.com/tomerfi/aioswitcher"
},
"split_keywords": [
"home",
" automation",
" switcher",
" smart"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "29794d3189b7c2bc8320b136fea95b720eaf28cbb8424c3ce8deddbff45deda5",
"md5": "7229fe86dd4d37cda3958a4b258aab08",
"sha256": "35e7187b74ed360bea7aab4919deee7b42fab72ab11b6f41f1aaf1c5e1517f3f"
},
"downloads": -1,
"filename": "aioswitcher-5.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7229fe86dd4d37cda3958a4b258aab08",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.9.0",
"size": 559860,
"upload_time": "2024-12-17T18:10:16",
"upload_time_iso_8601": "2024-12-17T18:10:16.005106Z",
"url": "https://files.pythonhosted.org/packages/29/79/4d3189b7c2bc8320b136fea95b720eaf28cbb8424c3ce8deddbff45deda5/aioswitcher-5.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a357ad422fe4d97f098a596acced826046ae76cb7428ab53edf6f74dea7a1fa0",
"md5": "c825fb47ab42f68e67009e58ab1e05ef",
"sha256": "9c680a8a7678b7b16f2806dff8eecd9c36895faac060370855ca6f92fc0a32f1"
},
"downloads": -1,
"filename": "aioswitcher-5.1.1.tar.gz",
"has_sig": false,
"md5_digest": "c825fb47ab42f68e67009e58ab1e05ef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.9.0",
"size": 523975,
"upload_time": "2024-12-17T18:10:17",
"upload_time_iso_8601": "2024-12-17T18:10:17.449600Z",
"url": "https://files.pythonhosted.org/packages/a3/57/ad422fe4d97f098a596acced826046ae76cb7428ab53edf6f74dea7a1fa0/aioswitcher-5.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-17 18:10:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tomerfi",
"github_project": "aioswitcher",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "poetry",
"specs": [
[
"==",
"1.5.1"
]
]
}
],
"lcname": "aioswitcher"
}