Skip to content

icovada/pytcs-tecnoalarm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python library to interface with myTecnoalarm TCS app cloud services

This repo provides code to interface with the cloud services of the "my Tecnoalarm TCS" app. Funcionality has been reverse-engineered and may not be complete.

How to install it

pip install pytcs-tecnoalarm

How to use it

To use this library you need to authenticate to the cloud service.

First login

Open an interactive prompt and run:

from pytcs_tecnoalarm import TCSSession
s = TCSSession()
s.login(email, password)

If your account does not have 2 factor authenticator, you will be logged in. Otherwise, this will throw an OTPException

Get the code from your email and run

s.login(email, password, pin)

If everything goes right, you will have an authenticated token and app-id to re-use in the future (does not seem to expire)

extract then with

s.token
s.appid

Future logins

Simply pass your token and appid when instantiating the session

from pytcs_tecnoalarm import TCSSession
s = TCSSession(token, appid)

This will run the .re_auth() function that should re-enable the token for immediate use.

The token never changes.