[UP TO DATE] Command Line Interface to Control ALL Somfy's Devices. 100% functional with ChatGPT
MIT License
[UP TO DATE] Tahoma is a simple API for controlling Somfy Tahoma devices using Python 3, thanks to the pyoverkiz API. With just a three-word input, you can control your devices. It was initially created for Tahoma but also works with Somfy Connectivity Kit, Connexoon, and Cozytouch. You can also use ChatGPT to control it and for help.
##############################################################################
Note: This is a portable version for direct downloading. It's not an installed package. To run the app, simply execute python3 tahoma.py
in your imported folder. If you want to install the package using PyPI (pip version), go to : How to install tahoma with pip ? or directly visit the PyPI Project Website for an easier installation process.
If you like this program, please star it on GitHub to improve Tahoma's visibility so that others can also benefit from it. ⭐
There is a ChatGPT functionality. See this documentation
Download the zip file and extract it to a choosen folder:
Run the following commands in your imported folder:
python3 -m pip install -r requirements.txt
in order to install dependenciespython3 tahoma.py
to ensure that Tahoma starts.There are just two commands to execute once to configure Tahoma:
All the details are explained in python3 tahoma.py --help
and python3 tahoma.py --info
.
python3 tahoma.py --configure
or python3 tahoma.py -c
python3 tahoma.py --getlist
or python3 tahoma.py -g
USAGE: python3 tahoma.py [ACTION] [CATEGORY] [NAME]
For example : tahoma open shutter kitchen
or tahoma ouvrir volet cuisine
To retrieve your personal commands, you can use the following options:
python3 tahoma.py --list-actions
or tahoma -la
python3 tahoma.py --list-actions-french
or tahoma -laf
python3 tahoma.py --list-categories
or tahoma -lc
python3 tahoma.py --list-categories-french
or tahoma -lcf
python3 tahoma.py --list-names
or tahoma -ln
python3 tahoma.py --list-names-french
or tahoma -lnf
Now you are ready to use tahoma
For more info refer to python3 tahoma.py -h
or python3 tahoma.py -i
Usage: python3 tahoma.py [ACTION] [CATEGORY] [NAME]
For example : tahoma open shutter kitchen
or tahoma ouvrir volet cuisine
For instance, to close a shutter or a sunsceen to 25% :
tahoma 25 shutter kitchen
tahoma 25 sunscreen kitchen
.
Please note that this feature only works with IO protocols and not with RTS.
bath
or the full name of a device in square brackets [""]
: ["bath 1st floor"]
) as the NAME parameter.For example :
tahoma open shutter garden
tahoma arm alarm ["garden door"]
For example :
tahoma arm alarm garden open shutter ["room 6"] confort heater dining off plug office 25 sunscreen kitchen launch scene morning
wait for <SECOND(S)>
or sleep for <SECOND(S)>
or attendre pendant <SECOND(S)>
:For example : tahoma open shutter kitchen wait for 20 close shutter kitchen
wait for <HOUR:MINUTE>
(24-hour format)For example : tahoma wait for 13:32 open shutten kitchen
For example :
tahoma open shutter kitchen wait for 2 cancel last action
: It will stop the kitchen shutter after 2 seconds
tahoma open shutter kitchen open shutter room6 cancel last action
: It will only stop the room6 shutter
Here are some example commands :
["<NAME>"]
)tahoma -c
with the --local
argument for using the local API (For Tahoma hubs only))--remote
argument. In this example tahoma will change the heater's mode to manual and will give the ability to modify the temperature to 19°C using the cloud API)Special note:
If you want to use the local API for Tahoma hubs only, you will need to activate developer mode (www.somfy.com > My Account > Activate developer mode).
The local API allows controlling some devices without a cloud connection for Tahoma hubs only.
local API is only compatible with some devices (shutters, sunscreens, heaters).
You can configure the local API with the tahoma -c
command or override the default API set in tahoma -c
with the --local
or --remote
argument.
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 :
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 open shutter kitchen close shutter room6 confort heater dining off plug office 25 shutter kitchen
and that's all !
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.
You should also need to rename tahoma.py
to tahoma
Then execute tahoma just like this : tahoma arm alarm garden open shutter kitchen close shutter room6 confort heater dining off plug office 25 shutter kitchen
and that's all !
How to create a PATH on Windows
Thanks to the tahoma.exe
program, you will be able to execute tahoma just by entering this command : tahoma
instead of python3 tahoma.py
on Windows
Then execute tahoma just like this : tahoma arm alarm garden open shutter kitchen close shutter room6 confort heater dining off plug office 25 shutter kitchen
and that's all !
The best way to install tahoma-gpt with tahoma is to use Pypi
If you want to use tahoma-gpt in a virtual environement follow this link or use pipx
If you want to use tahoma with chatGPT from this repo, follow this steps :
install tahoma by following the instructions provided in the first steps
Downbload tahoma-gpt.py
and requirements_tahoma-gpt.txt
:
Install requirements:
python3 -m pip install -r requirements_tahoma-gpt.txt
in order to install dependencies
Open tahoma-gpt.py
with a text editor and add your ChatGPT API key and the model you want to use inside the document
Run the program in a terminal or command prompt by executing the following command: :
python3 tahoma-gpt.py
Make sure to carefully follow these steps to successfully integrate tahoma with ChatGPT.
IF YOU WANT TO INSTALL THE PACKAGE USE PyPi (pip version) :
Install tahoma :
python3 -m pip install -U tahoma
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
sudo
command is required) :tahoma --configure
or tahoma -c
sudo
command is also required) :tahoma --getlist
or tahoma -g
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 open shutter kitchen close shutter room6 confort heater dining off plug office 25 sunscreen kitchen
tahoma --list-actions
or tahoma -la
or
tahoma --list-actions-french
or tahoma -laf
tahoma --list-categories
or tahoma -lc
or
tahoma --list-categories-french
or tahoma -lcf
tahoma --list-names
or tahoma -ln
or
tahoma --list-names-french
or tahoma -lnf
Enjoy ! For more info tahoma -h
or tahoma -i
On Linux, if you have installed tahoma without the sudo
command 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 :
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 open shutter kitchen close shutter room6 confort heater dining off plug office
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 Sensors Scenes and more if you ask me on github :
Created by @pzim-devdata - feel free to contact me!