Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coko7/mataho
Command line interface to interact with a local Tahoma box
https://github.com/coko7/mataho
clap-rs cli command-line-tool fuzzy-matcher rust tahoma tahoma-api tahoma-box
Last synced: 4 days ago
JSON representation
Command line interface to interact with a local Tahoma box
- Host: GitHub
- URL: https://github.com/coko7/mataho
- Owner: Coko7
- License: gpl-3.0
- Created: 2024-08-07T16:00:31.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-15T14:13:30.000Z (3 months ago)
- Last Synced: 2024-08-16T15:31:26.740Z (3 months ago)
- Topics: clap-rs, cli, command-line-tool, fuzzy-matcher, rust, tahoma, tahoma-api, tahoma-box
- Language: Rust
- Homepage:
- Size: 146 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mataho
A rust command line tool that allows you to interact with your local Tahoma box.
This is a port of the cli from my [somfy-home-controller](https://github.com/coko7/somfy-home-controller) project.New features have been added:
- Fuzzy matching for device labels
- Group management
- Executing an action on a group of devices## 🛠️ Setup
Create a config file at `$HOME/.config/mataho/config.json`:
```json
{
"hostname": "https://gateway-XXXX-XXXX-XXXX"
"port": 8443,
"api_token": "PUT_YOUR_SUPER_SECRET_TOKEN_HERE",
}
```*NOTE: If you want to use a different path for the configuration direction, you can do so by setting the `$MATAHO_CONFIG` env variable.*
*You must keep the filename as `config.json` though.*
## 🐚 Usage
Typing `mataho help` will print the documentation:
```
$ mataho helpInteract with your Tahoma box in the terminal
Usage: mataho [OPTIONS]
Commands:
list Print the list of known local devices [aliases: ls]
info Get information about a particular device (id, label, supported actions, etc.)
exec Execute a Tahoma action on a single device [aliases: ex]
group Create and manage groups of devices [aliases: grp]
help Print this message or the help of the given subcommand(s)Options:
-v, --verbose... Increase logging verbosity
-q, --quiet... Decrease logging verbosity
-h, --help Print help
```Display local devices:
```
$ mataho ls+----------+-----------------+----------------+
| ID | Label | Type |
+----------+-----------------+----------------+
| 00000001 | Front gate | sliding gate |
+----------+-----------------+----------------+
| 00000002 | Garage | garage opener |
+----------+-----------------+----------------+
| 00000003 | Coko's room | roller shutter |
+----------+-----------------+----------------+
```Execute a command/action on a particular device (fuzzy matching is used to find the device):
```
$ mataho ex coko openExecuting `open` on `Coko's room`...
```Action arguments are supported as well:
```
$ mataho exec coco setClosureAndLinearSpeed 20 lowspeedExecuting `setClosureAndLinearSpeed` on `Coko's room`...
```Manage groups:
```
$ mataho grp -hCreate and manage groups of devices
Usage: mataho group [OPTIONS]
Commands:
list List all groups [aliases: ls]
create Create a new group
delete Delete a group
join Add a device to an existing group
leave Remove a device from an exiting group
exec Execute a Tahoma action on a group of devices [aliases: ex]
help Print this message or the help of the given subcommand(s)Options:
-v, --verbose... Increase logging verbosity
-q, --quiet... Decrease logging verbosity
-h, --help Print help
```## 📚 Resources
- GitHub repo of [Somfy-TaHoma-Developer-Mode](https://github.com/Somfy-Developer/Somfy-TaHoma-Developer-Mode)
- Swagger UI for [local gateway API](https://somfy-developer.github.io/Somfy-TaHoma-Developer-Mode/)