https://github.com/dynasticorpheus/gigasetelements-cli

[FUNCTIONALITY]
Code: Select all
Gigaset Elements - Command-line Interface by [email protected]
optional arguments:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
fully qualified name of configuration-file
-u USERNAME, --username USERNAME
username (email) in use with my.gigaset-elements.com
-p PASSWORD, --password PASSWORD
password in use with my.gigaset-elements.com
-n TOKEN, --notify TOKEN
pushbullet token
-e EVENTS, --events EVENTS
show last <number> of events
-d DD/MM/YYYY DD/MM/YYYY, --date DD/MM/YYYY DD/MM/YYYY
filter events on begin date - end date
-o HH:MM, --cronjob HH:MM
schedule cron job at HH:MM (requires -m option)
-x, --remove remove all cron jobs linked to this program
-f {door,window,motion,siren,plug,button,homecoming,intrusion,systemhealth,camera,phone,smoke}, --filter {door,window,motion,siren,plug,button,homecoming,intrusion,systemhealth,camera,phone,smoke}
filter events on type
-m {home,away,custom}, --modus {home,away,custom}
set modus
-k DELAY, --delay DELAY
set alarm timer delay in seconds (use 0 to disable)
-D, --daemon daemonize during monitor/domoticz mode
-z, --notifications show notification status
-l LOG, --log LOG fully qualified name of log file
-R, --rules show custom rules
-P PID, --pid PID fully qualified name of pid file
-s, --sensor show sensor status (use -ss to include sensor id's)
-b {arm,disarm}, --siren {arm,disarm}
arm/disarm siren
-g {on,off}, --plug {on,off}
switch plug on/off
-a, --camera show camera status
-r, --record switch camera recording on/off
-A, --snapshot download camera snapshot
-t, --monitor show events using monitor mode (use -tt to activate
domoticz mode)
-i, --ignore ignore configuration-file at predefined locations
-N, --noupdate do not periodically check for updates
-j, --restart automatically restart program in case of a connection
error
-q, --quiet do not send pushbullet message
-I, --insecure disable SSL/TLS certificate verification
-S, --silent suppress urllib3 warnings
-v, --version show version
[TO-DO]
* Set system and sensor status at initial startup
* More sanity checks
* Tell me ...
[INSTALLATION]
In case you want to test please follow below steps:
1. Go to Setup / Hardware in Domoticz GUI
2. Add hardware - dummy
3. Create a virtual sensor - type Alert for basestation (remember the idx number)
4. Create a virtual sensor - type Manual Light/Switch for each motion/door/window/siren/plug/button/camera (remember their idx numbers)
5. Set Off Delay to 2 seconds for virtual sensors linked to motion, button or camera
6. Install gigasetelements-cli using PyPI or GitHub
PyPI
Code: Select all
pip install gigasetelements-cli
Code: Select all
git clone git://github.com/dynasticorpheus/gigasetelements-cli.git
cd gigasetelements-cli
python setup.py install --force
Code: Select all
curl -o ~/.gigasetelements-cli/gigasetelements-cli.conf https://raw.githubusercontent.com/dynasticorpheus/gigasetelements-cli/master/gigasetelements-cli.conf.template
Code: Select all
/opt/etc/gigasetelements-cli.conf
/usr/local/etc/gigasetelements-cli.conf
/usr/etc/gigasetelements-cli.conf
/etc/gigasetelements-cli.conf
~/.gigasetelements-cli/gigasetelements-cli.conf
~/Library/Application Support/gigasetelements-cli/gigasetelements-cli.conf
Code: Select all
gigasetelements-cli -ss
the camera.
Code: Select all
gigasetelements-cli -a
11. Do a test run of the of the program to see if everything is working as expected.
Code: Select all
gigasetelements-cli -tt

12. Once working start with additional arguments so it runs as daemon, automatically restarts in case of errors and creates a log file.
Code: Select all
gigasetelements-cli -tt --restart --daemon --log /tmp/gigasetelements-cli.log
[CUSTOM ICONS]
I extracted the icons used in the adroid app and created a custom set for domoticz. [BUGS]
https://github.com/dynasticorpheus/giga ... cli/issues
[SUGGESTIONS]
Idea's & suggestions are more than welcome so please let me know. If you like it please star this project on github:
https://github.com/dynasticorpheus/gigasetelements-cli
[UPDATE]
Added base to custom icon set and update domoticz screenshot - 12/02/16
Updated install instruction - 08/05/16
Updated custom icon set to avoid conflicting names - 23/05/16
Update url's - 31/05/16
Added smoke to custom icon set - 01/06/16
Cheers
Dynasticorpheus