Commit Graph

35 Commits

Author SHA1 Message Date
Gilles MOREL b3b4e41051
Action sur les prises connectées 2020-10-21 09:20:17 +02:00
Gilles MOREL 983e4adee6
Mise en cache des données des capteurs
J'ai ajouté une classe qui permet de stocker et restituer le contenu des données des capteurs pour une minute. Cette classe met automatiquement à jour à la prochaine requête sur les données à l'expiration de la durée de vie du cache.
2020-10-20 17:02:34 +02:00
Gilles MOREL 5cc3b483ed
Récupération de l'état et la puissance des prises 2020-10-20 10:28:22 +02:00
Gilles MOREL b4540504f8
Récupération de la température et l'humidité 2020-09-27 17:41:15 +02:00
Gilles MOREL b62c6c36ea
Réorganisation du code
Beaucoup de code inutile et mal organisé enlevé et réadapté.
J'ai aussi changé la façon de lire les états des accessoires en prévision de nouveau accessoires que je me suis procuré.

En marge, j'ai également traduit les commentaires en français.
2020-09-27 16:56:06 +02:00
Gilles MOREL 72e1c94a80 Traduction du README en français
Cette bibliothèque ne sert que pour un service français fourni en France.
2020-09-27 15:22:55 +02:00
Gilles MOREL 8fb1eac749 Correction du style 2020-09-26 07:55:57 +02:00
Gilles MOREL b338230b37 Récupération des paramètres de la caméra
J'ai aussi enlevé la classe Camera pour intégrer les méthodes dans la classe Sensor.
2020-09-26 07:51:52 +02:00
Gilles MOREL f5e8e4bdf0
Mise à jour de l'authentification 2020-09-20 12:00:45 +02:00
Gilles MOREL 952cf74b8e Passage à la version 1.1 2019-11-23 21:41:27 +01:00
Gilles MOREL aff562b61b Mise à jour du point d'entrée d'authentification 2019-11-23 21:38:36 +01:00
Gilles MOREL 3f4b3cd1aa Correction du style
Oublis de la validation précédente
2019-01-15 23:02:35 +01:00
Gilles MOREL 92d0f18f3a Correction du style
Le style a été un peu corrigé à l'aide de pycodestyle
2018-02-22 21:29:53 +01:00
Gilles MOREL efd3144d9f Passage à la licence AGPL-3.0 2018-02-21 09:57:13 +01:00
Gilles MOREL 3df38d59bb Changing to WTFPL 2018-02-21 09:45:22 +01:00
Gilles MOREL b969b8fb81 Passage en version 1.0 2018-01-27 16:39:36 +01:00
Gilles MOREL fd58a374cd Deleted python2 support
I don't want to support Python2 anymore.
Sorry for Python2 users…
2018-01-27 16:22:13 +01:00
Gilles MOREL ee892b9d2c Check the cookies type
Python2:
- Added type check for cookies param in HomeSFR class

Python3:
- Added type check for cookies param in HomeSFR class
2016-12-01 11:27:01 +01:00
Gilles MOREL 46933a8156 Updated TODOS
Python2:
- Updated TODO
- Updated version

Python3:
- Updated TODO
2016-05-26 17:00:33 +02:00
Gilles MOREL 9f2f4a06d1 Added log retrievment
Python2:
- Added the Common.get_xml_elements () for multiple usage of this routine
- Added HomeSFR.do_autologin () to trigger the autologin
- Removed autologin code in methods which have it
- Added HomeSFR.get_logs () method

Python3:
- Added the Common.get_xml_elements () for multiple usage of this routine
- Added HomeSFR.do_autologin () to trigger the autologin
- Removed autologin code in methods which have it
- Added HomeSFR.get_logs () method
2016-05-26 16:57:48 +02:00
Gilles MOREL 6facbe84f8 Solved encoding error in Python2 library
Python2:
-Solved encoding error, there were not actually, that were the terminal which caused strange encodings
2016-05-25 17:43:00 +02:00
Gilles MOREL d68e3ceb3c Updated version numbers 2016-05-25 17:22:44 +02:00
Gilles MOREL f60d528ed0 Updated TODOS 2016-05-25 17:22:03 +02:00
Gilles MOREL 9dd904b4ea Addind Common class for common ressources
Python2:
- Adding Common class for common ressources
- Inheritance from Common to HomeSFR and Sensors (and it's inherited class Camera)
- Adding the Sensors.get_mac () method
- Adding the Camera.get_snapshot () method
- Addind str2bytes () function for Python3 code compatibility (this library and the Python3 ones are quite identical)

Python3:
- Adding Common class for common ressources
- Inheritance from Common to HomeSFR and Sensors (and it's inherited class Camera)
- Adding the Sensors.get_mac () method
- Adding the Camera.get_snapshot () method
- Addind str2bytes () function for Python2 code compatibility (this library and the Python2 ones are quite identical)
- Changing all "readall" to "read", the method "readall" does not seem to exist in Python2, from what I tested, there's no problem with it
2016-05-25 17:19:16 +02:00
Gilles MOREL beae1f2b97 Logout method
Python2:
- Added HomeSFR.logout () method to logout from service
- moved HomeSFR.get_cookies () method in the HomeSFR class

Python3:
- Added HomeSFR.logout () method to logout from service
- moved HomeSFR.get_cookies () method in the HomeSFR class
2016-05-23 15:11:43 +02:00
Gilles MOREL 15bc8e86bd Copy Python3 code to Python2 lib
Python2:
- Added author
- Added Sensor class
- Added HomeSFR class
- Corrected date error for cameras (datetime.datetime.strptime does not understand '0000-00-00 00:00:00')
- Added encoding error TODO

Python3:
- Changed __name__
- Remove import of datetime.timezone
- Corrected date error for cameras (datetime.datetime.strptime does not understand '0000-00-00 00:00:00')
2016-05-23 12:03:27 +02:00
Gilles MOREL 9af3dc69ab Cookies Import and Export
Python3:
- Added cookies import and export
- Changed HomeSFR.login () behavior if there's no username and password
- Changed HomeSFR.__str__ () if there's no username
- Added HomeSFR.get_cookies ()
- Set autologin always to False is there no credential to use
2016-05-23 09:23:26 +02:00
Gilles MOREL 60974181fa Documentation changes
Python3:
- Changed description of HomeSFR.get_sensors ()
- Changed description of HomeSFR.get_all_sensors ()
- Changed type of return of HomeSFR.get_all_sensors (), it was a list and the doc said it was a tuple
2016-05-23 08:41:07 +02:00
Gilles MOREL 11050152c3 Gerenal:
- Changed structure to allow other languages
- Added Python2's file to ignore in .gitignore
- Changed README with a language-free text

Python2:
- Added initial file with top

Python3:
- Added Sensor class for better reading of values
- Changed return of HomeSFR.get_sensor () method
2016-05-22 22:57:39 +02:00
Gilles MOREL fe41141672 Adding TODOS 2016-05-21 16:59:51 +02:00
Gilles MOREL 651fa470f7 No need of so much complicated gitignore file, for the moment. 2016-05-19 15:43:38 +02:00
Gilles MOREL a2afd83117 More details… 2016-05-19 15:35:32 +02:00
Gilles MOREL 61ce155e2b Adding the current version of the library 2016-05-19 15:15:55 +02:00
Gilles Émilien MOREL 516734b611 Update README.md
More informations…
2016-05-19 15:08:01 +02:00
Gilles Émilien MOREL 8224cd1594 Initial commit 2016-05-19 14:54:56 +02:00