Metadata-Version: 2.1
Name: tahoma
Version: 2.2.7
Summary: This is a very easy API for controlling Somfy Tahoma's devices written in Python3, thanks to the pyoverkiz API. You just need a three-word input to control a device
Author-email: Pzim-devdata <contact@pzim.fr>
Project-URL: Homepage, https://github.com/pzim-devdata/tahoma
Project-URL: Bug Tracker, https://github.com/pzim-devdata/tahoma/issues
Keywords: tahoma,somfy,api
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

# tahoma
[UP TO DATE] This is a very easy API for controlling Somfy Tahoma's devices written in Python3, thanks to the pyoverkiz API.
You just need a three-word input to control a device.
It was created with Tahoma but can also works with Somfy Connectivity Kit, Connexoon, Cozytouch


![Somfy](https://www.voletsdusud.com/wp-content/uploads/2018/04/logo-tahoma.jpg)





# Install the main package :


Install tahoma :

#########################################

On the next version of Python and Linux you will need to install in this way (using virtual env) :

```
sudo apt install pipx
pipx install tahoma
```
To update tahoma to the latest version :
`pipx upgrade tahoma`

If tahoma has been installed in ~/.local/bin you will need to add this file to the PATH : ~/.local/bin (if it's not already done) :

`sudo echo 'export PATH=$PATH:~/.local/bin' >> ~/.bashrc`

[How to create a PATH on Linux ?](https://linuxize.com/post/how-to-add-directory-to-path-in-linux/)

#########################################

Normal way to install on Linux :

```
sudo python3 -m pip install -U tahoma
```

!!! It's very important to use the `sudo` command because in this way tahoma can store your logins in a safe place

#########################################

For Windows users :

Open a terminal (Powershell) as administrator (Win+X and A) and type this command :

```
python3 -m pip install -U tahoma
```
Then search tahoma.exe and add the folder named 'scripts' (which contain tahoma.exe)  to the PATH of Windows or simply copy tahoma.exe wherever you want and add the destination folder to the PATH of Windows.
[How to create a PATH on Windows ?](https://www.computerhope.com/issues/ch000549.htm)



# Configure :



It's very easy to configure, there are just two commands to execute once for all the first time :

All is explained in tahoma --help and tahoma --info


1. Specify your Somfy-connect login's info and choose the Somfy server (`sudo` command is only required for Linux users) :

Open a terminal and type :
- `sudo tahoma --config` or `sudo tahoma -c`

For Windows users : (Go to the folder of tahoma.exe and open a terminal if tahoma.exe is not in the PATH of Windows) :
- `.\tahoma -c`
or
- C:\foler\of\tahoma\tahoma.exe -c


2. Configure the API and get the list of your personal Somfy's devices (`sudo` command is also required) :

Open a terminal and type :
- `sudo tahoma --getlist` or `sudo tahoma -g`

For Windows users : Go to the folder of tahoma.exe and open a terminal if tahoma.exe is not in the PATH of Windows) :
- `.\tahoma -g`
or
- C:\foler\of\tahoma\tahoma.exe -g

3. And now, you are ready to use tahoma :


# Usage : 

`tahoma [ACTION] [CATEGORY] [NAME]`


For instance : `tahoma open shutter kitchen` or `tahoma ouvrir volet cuisine`

You can also close a shutter or a sunscreen to a specific level. For example, to close to 25%, you can use the commands : `tahoma 25 shutter kitchen` or `tahoma 25 sunscreen kitchen`. Please note that this feature only works with IO protocols and not with RTS.

You can also run many commands during the same process without restarting tahoma ;

For instance : `tahoma arm alarm garden close shutter room6 confort heater dining off plug office 25 sunscreen kitchen launch scene morning`

Exemples :

- tahoma open shutter kitchen
- tahoma 25 sunscreen Velux3 (You can close a shutter or a sunscreen to a specifique level. Here it will close to 25% )
- tahoma get sensor ['Luminace sensor garden'] (Just for sensors : you can use the full name of the device with [''] )
- tahoma on plug office
- tahoma get sensor door
- tahoma arm alarm garden
- confort heater dining
- tahoma get sensor ['heater dining room']
- tahoma launch scene morning
- tahoma arm alarm garden open shutter room6 confort heater dining off plug office 25 sunscreen kitchen launch scene morning get sensor ['heater dining room']


# But first you need to retrieve your PERSONALS commands :


## Get a list of all possibles [ACTIONS] for each [CATEGORIES] : 

Open a terminal and type :
- `tahoma --list-actions` or `tahoma -la`

or

- `tahoma --list-actions-french` or `tahoma -laf`
 
 
 
## Get a list of availables [CATEGORIES] :

Open a terminal and type :
- `tahoma --list-categories` or `tahoma -lc`

or 

- `tahoma --list-categories-french` or `tahoma -lcf`



## Get the [NAMES] you have given to your personal devices in the Somfy's App :

Open a terminal and type :
- `tahoma --list-names` or `tahoma -ln`

or

- `tahoma --list-names-french` or `tahoma -lnf`



Enjoy !  For more info `tahoma -h` or `tahoma -i` 




# Create a PATH to tahoma :


If you have installed tahoma without the `sudo` command on Linux you will need to create a PATH for starting tahoma with the `tahoma` command.

Indead, to be able to run tahoma directly in the terminal, without going to the source package, you should add the tahoma's folder to the PATH :

On Linux, it can be permanently done by executing : `sudo gedit ~/.bashrc` and adding, at the end of the document, this line :

`export PATH=$PATH:/place/of/the/folder/tahoma`



If you want to temporarily test it before, you can just execute this command in the terminal : 

`export PATH=$PATH:/place/of/the/folder/tahoma` 

It will be restored on the next reboot.



By doing this, instead of taping `python3 '/place/of/the/folder/tahoma/tahoma.py open shutter kitchen'`,

 you will be able to directly tape in the terminal : `tahoma open shutter kitchen`.


Then execute tahoma just like this : `tahoma arm alarm garden close shutter room6 confort heater dining off plug office 25 sunscreen kitchen launch scene morning` and that's all !






For :


Somfy Connectivity Kit
Somfy Connexoon IO
Somfy Connexoon RTS
Somfy TaHoma
Somfy TaHoma Beecon
Somfy TaHoma Switch
Thermor Cozytouch
And more...

Supported devices :
Alarm
Shutter
Plug
Heater
and more if you ask me on github : 

[@pzim-devdata GitHub Pages](https://github.com/pzim-devdata/tahoma/issues)












<p align="center" width="100%">
    <img width="33%" src="https://avatars.githubusercontent.com/u/52496172?v=4"> 
</p>

------------------------------------------------------------------

- [Licence](https://github.com/pzim-devdata/DATA-developer/raw/master/LICENSE)
MIT License Copyright (c) 2023 pzim-devdata

------------------------------------------------------------------

Created by @pzim-devdata - feel free to contact me!
