[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.
- Control Somfy Tahoma devices with a simple API written in Python 3
- Create scripts or shortcuts to controle your house from a domestic server or your computer
- With this API, you can integrate Somfy's products with other Matter-compatible devices
- Works with Somfy Connectivity Kit, Connexoon, Cozytouch, and more
- Support various Somfy's devices: alarm, shutter, plug, heater, sensors, scenes, and more
- Compatible with Windows and Linux operating systems
- 100% functional with ChatGPT
If you want to Test and Install tahoma with tahoma-gpt in a virtual environnement go there
##############################################################################
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 dependencies andpython3 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
.
- Specify your Somfy-connect login information and choose the Somfy server: :
python3 tahoma.py --configure
orpython3 tahoma.py -c
- Retrieve the list of your personal Somfy devices: :
python3 tahoma.py --getlist
orpython3 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:
- List all possible [ACTIONS] for each [CATEGORIES]:
python3 tahoma.py --list-actions
ortahoma -la
orpython3 tahoma.py --list-actions-french
ortahoma -laf
- List available [CATEGORIES]:
python3 tahoma.py --list-categories
ortahoma -lc
orpython3 tahoma.py --list-categories-french
ortahoma -lcf
- Retrieve the [NAMES] you have assigned to your personal devices in the Somfy's App:
python3 tahoma.py --list-names
ortahoma -ln
orpython3 tahoma.py --list-names-french
ortahoma -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
- You can specify the closing level for shutters or sunscreens with a numeric value as ACTION.
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.
- You can use either a unique word :
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"]
- Multiple commands can be executed in the same process without restarting Tahoma.
For example :
tahoma arm alarm garden open shutter ["room 6"] confort heater dining off plug office 25 sunscreen kitchen launch scene morning
- There is also a wait functionality with
wait for <SECOND(S)>
orsleep for <SECOND(S)>
orattendre pendant <SECOND(S)>
:
For example : tahoma open shutter kitchen wait for 20 close shutter kitchen
- You can also wait for a specific time with
wait for <HOUR:MINUTE>
(24-hour format)
For example : tahoma wait for 13:32 open shutten kitchen
- Since it is impossible to stop an RTS device, there is the possibility to cancel the immediate preceding command (without affecting a 'wait for ' command). To do this you can use the command 'cancel last action' or 'annuler precedente commande' just after a command that opens or closes an RTS device.
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 :
- tahoma open shutter kitchen
- tahoma 25 shutter Velux3 (Closes the shutter to 25%)
- tahoma get sensor ["Luminance sensor garden"] (You can use the full name of the device with
["<NAME>"]
) - tahoma get sensor door (Provides information about all sensors named "door" in the house)
- tahoma get sensor ["Front door"]
- tahoma on plug office
- tahoma open shutter ["room 6"]
- tahoma toggle plug kitchen (For IO devices only)
- tahoma arm alarm garden
- tahoma on light ["kitchen light"]
- tahoma off spotalarm spot
- tahoma comfort heater dining
- tahoma get sensor ['heater dining room']
- tahoma launch scene morning
- tahoma wait for 13:32 open shutten kitchen
- tahoma arm alarm garden wait for 10 open shutter room6 sleep for 7 comfort heater dining off plug office 25 sunscreen kitchen launch scene morning get sensor ['heater dining room']
- tahoma comfort heater dining wait for 3 get sensor ["Heater dining room"]
- tahoma open shutter kitchen open shutter room6 wait for 2 cancel last action` (It will stop the room6 shutter after 2 seconds)
- tahoma open shutter kitchen --local (It will override the default API set in
tahoma -c
with the--local
argument for using the local API (For Tahoma hubs only)) - tahoma open shutter kitchen --username mail@address.com --password password --remote (You can provide the username and password with arguments to override the logins stored. This is useful if you have more than one Tahoma box)
- tahoma my shutter kitchen --token 2343d8c7f23dd5f328de --pin 1234-1234-1234 --local (It will use the local API (for Tahoma hubs only) with the pin and token arguments. This is useful if you have more than one Tahoma box)
- tahoma manual heater kitchen wait for 2 19 heater kitchen --server atlantic_cozytouch --username cozytouch_username --password cozytouch_password --remote (For some atlantic_cozytouch heaters, it is possible to use other ACTIONS than comfort, eco, off...with auto, manual, standby, prog, NUMBER. As a Cozytouch hub is not compatible with the local API, you can add the
--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
andrequirements_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
- Specify your Somfy-connect login's info and choose the Somfy server (
sudo
command is required) :
tahoma --configure
ortahoma -c
- Configure the API and get the list of your personal Somfy's devices (
sudo
command is also required) :
tahoma --getlist
ortahoma -g
- And now, you are ready to use tahoma :
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
ortahoma -la
or
tahoma --list-actions-french
ortahoma -laf
tahoma --list-categories
ortahoma -lc
or
tahoma --list-categories-french
ortahoma -lcf
tahoma --list-names
ortahoma -ln
or
tahoma --list-names-french
ortahoma -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 :
- Licence MIT License Copyright (c) 2023 pzim-devdata
Created by @pzim-devdata - feel free to contact me!