pzim-devdata / tahoma

[UP TO DATE] Command Line Interface to Control ALL Somfy's Devices. 100% functional with ChatGPT
MIT License
5 stars 2 forks source link
api automation chatgpt cli command-line connexoon home io openai overkiz rts somfy somfy-api somfy-motorized-shades tahoma tahoma-box tahoma-chatgpt tahoma-gpt tahoma-python tahomi-api

tahoma

[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.

Somfy

GitHub license GitHub issues GitHub repo size Visits Badge GitHub release (latest by date) GitHub commits GitHub All Releases

Downloads

British flag Drapeau français

Features

GifTahoma.gif

If you want to Test and Install tahoma with tahoma-gpt in a virtual environnement go there

Picture tahoma-gpt

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

Install tahoma from this Git

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. :star:

There is a ChatGPT functionality. See this documentation

Quick Start

1. Download

Download the zip file and extract it to a choosen folder:

Download :inbox_tray:

2. Install dependencies

Run the following commands in your imported folder:

3. Configure

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.

  1. Specify your Somfy-connect login information and choose the Somfy server: :
  1. Retrieve the list of your personal Somfy devices: :

4. Retrieve your PERSONAL commands

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:

  1. List all possible [ACTIONS] for each [CATEGORIES]:
  1. List available [CATEGORIES]:
  1. Retrieve the [NAMES] you have assigned to your personal devices in the Somfy's App:

Now you are ready to use tahoma

For more info refer to python3 tahoma.py -h or python3 tahoma.py -i

Use Cases:

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.

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

For example : tahoma open shutter kitchen wait for 20 close shutter kitchen

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

Examples :

Here are some example commands :

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.

Create a PATH to tahoma :

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 :

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 !

On Windows :

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 !

Add ChatGPT functionalities :

  1. install tahoma by following the instructions provided in the first steps

  2. Downbload tahoma-gpt.py and requirements_tahoma-gpt.txt:

  3. Install requirements:

python3 -m pip install -r requirements_tahoma-gpt.txt in order to install dependencies

  1. Open tahoma-gpt.py with a text editor and add your ChatGPT API key and the model you want to use inside the document

  2. 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 the main package :

PyPi Project Website

Install tahoma :

python3 -m pip install -U tahoma

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 required) :
  1. Configure the API and get the list of your personal Somfy's devices (sudo command is also required) :
  1. 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 open shutter kitchen close shutter room6 confort heater dining off plug office 25 sunscreen kitchen

But first you need to retrieve your PERSONALS commands :

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

or

Get a list of availables [CATEGORIES] :

or

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

or

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

Create a PATH to tahoma :

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 :

@pzim-devdata GitHub Pages



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