Control Tasmota devices via their web api
Project description
Tasmota Device Controller
This packag provides wrappers for Tasmota's web request API.
Only very few requests are implemented so far! If you need other requests, you can implement these commands and create a merge request on GitHub, or create an issue.
Example usage:
from tasmotadevicecontroller import TasmotaDevice
from tasmotadevicecontroller import tasmota_commands as cmd
from tasmotadevicecontroller import tasmota_types as t
device = TasmotaDevice('192.168.10.21')
# Set power of first output to on
setResult = device.sendRequest(
cmd.Power(t.PowerType.ON, t.PowerOutputType.OUTPUT_1))
print(setResult) # Returns {'POWER': 'ON'}
# Get current power state of second output
getResult = device.sendRequest(
cmd.Power(powerOutput=t.PowerOutputType.OUTPUT_2))
print(getResult) # Returns {'POWER': 'OFF'}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tasmotadevicecontroller-0.0.2.tar.gz
.
File metadata
- Download URL: tasmotadevicecontroller-0.0.2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8016773c6fc3e1bed802ee146333f03d879beb02aeb6e158c44501c65e2d8ee8 |
|
MD5 | cb4af58aadb5206ab9531633d2399dd7 |
|
BLAKE2b-256 | 176c299bd9f5316d228bc3e3cae91ab1e62a98e0d204125737554486c2ae5537 |
File details
Details for the file tasmotadevicecontroller-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: tasmotadevicecontroller-0.0.2-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 717c8451d4feda0f1d8ec10fd8ac9703ed7083bb9dabef9753a02bf58ecee8f6 |
|
MD5 | 86cf22514379acaba6a4c34944525d99 |
|
BLAKE2b-256 | a27720bd7a4b27adc0aefb69783f272b522d5b14d413f0298f70f3493c1198a6 |