Transfer HTTP requests from myStrom devices to MQTT
Project description
myStrom buttons allows to send HTTP requests. If a press pattern is applied then a request is send to a devices.
This module is not official, developed, supported or endorsed by myStrom AG.
For questions and other inquiries, use the issue tracker in this repository please.
myStrom AG has provided and is still providing hardware for testing and development.
Supported home automation platforms
Add the moment the following platforms are supported:
Requirements
You need to have Python installed.
myStrom button (button or button+, could work with the Motion sensor too)
A MQTT broker
Network connection
Devices connected to your network
Installation
The package is available in the Python Package Index .
$ pip3 install mystrom2mqtt
Usage
Set the target of the button. The port which is used by mystrom2mqtt is 8321.
curl --location --request POST 'http://[IP of the button]/api/v1/action/generic' \
--data-raw 'post://[mystrom2mqtt host]:8321'
A configuration file is needed. The format is TOML and the default name config.toml.
[mystrom2mqtt]
broker = "192.168.0.20"
port = 1883
username = "mqtt"
password = "mqtt"
To start `mystrom2mqtt specify the path with -c, --config to the configuration file:
mystrom2mqtt -c path/to/config.toml
To autostart mystrom2mqtt create a systemd unit file named /etc/systemd/system/mystrom2mqtt.service with the parameters you
[Unit]
Description=myStrom2MQTT
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/mystrom2mqtt -c "/path/to/config.toml"
[Install]
WantedBy=multi-user.target
License
mystrom2mqtt is licensed under ASL 2.0, for more details check LICENSE.
Project details
Release history Release notifications | RSS feed
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 mystrom2mqtt-0.1.0.tar.gz
.
File metadata
- Download URL: mystrom2mqtt-0.1.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.2 pkginfo/1.4.2 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6b0f18cb76b11e2f038a196d283517b0095b545d6a0c85fcbab47a5f1f86b20 |
|
MD5 | 983790de468cdb4bccaae6b652608059 |
|
BLAKE2b-256 | b9dee236f23087ba5849d03ed917a5aff78712b4496c9f8b98d6bfe7e132a172 |
File details
Details for the file mystrom2mqtt-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: mystrom2mqtt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.2 pkginfo/1.4.2 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9dab139946947dd17b4fdef885badac7d675ae36c28bd0746ec0228b2afa49e |
|
MD5 | 38150799111bef5360f6ebf439f9c7b0 |
|
BLAKE2b-256 | 544e4edc1ec88306028012751a45056182ece0620ba666d69f94befa316cdb01 |