Gigaset Elements Cli - domoticz support
Moderator: leecollings
-
- Posts: 86
- Joined: Sunday 01 May 2016 0:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: NL
- Contact:
Re: Gigaset Elements Cli - domoticz support
I got everything up and working. I see my Base (red, because I need to set one of my sensors back up) and motion in the log from the motion detector. The motion switch doesn't change color on motion, right? Im planning to let the switch change to 'away' when the last person leaves the house (using the BT Beacon from this topic (index.php?mark_notification=29483&hash=6a92d7e0) and send me a Telegram message when a alert is triggered.
Any advice on how to get the 'mode' switch in there?
Again, thanks a lot. Really appreciate all the help and I learned a lot from all the steps you guided me through.
Any advice on how to get the 'mode' switch in there?
Again, thanks a lot. Really appreciate all the help and I learned a lot from all the steps you guided me through.
-
- Posts: 115
- Joined: Monday 12 October 2015 15:26
- Target OS: Linux
- Domoticz version: 2.3295
- Location: NL
- Contact:
Re: Gigaset Elements Cli - domoticz support
Create a new selector switch:

Set it up like this:

The actions are:
script:///usr/local/bin/gigasetelements-cli -m home
script:///usr/local/bin/gigasetelements-cli -m custom
script:///usr/local/bin/gigasetelements-cli -m away
also in your /etc/gigasetelements-cli.conf change:
modus: home
into
modus:
Otherwise every time you run the cli it will change the modus into home

Set it up like this:

The actions are:
script:///usr/local/bin/gigasetelements-cli -m home
script:///usr/local/bin/gigasetelements-cli -m custom
script:///usr/local/bin/gigasetelements-cli -m away
also in your /etc/gigasetelements-cli.conf change:
modus: home
into
modus:
Otherwise every time you run the cli it will change the modus into home
micbou wrote:I got everything up and working. I see my Base (red, because I need to set one of my sensors back up) and motion in the log from the motion detector. The motion switch doesn't change color on motion, right? Im planning to let the switch change to 'away' when the last person leaves the house (using the BT Beacon from this topic (index.php?mark_notification=29483&hash=6a92d7e0) and send me a Telegram message when a alert is triggered.
Any advice on how to get the 'mode' switch in there?
Again, thanks a lot. Really appreciate all the help and I learned a lot from all the steps you guided me through.
-
- Posts: 115
- Joined: Monday 12 October 2015 15:26
- Target OS: Linux
- Domoticz version: 2.3295
- Location: NL
- Contact:
Re: Gigaset Elements Cli - domoticz support
I actually already have added telegram support in the cli itself but need to refine this a bit more before I push it to github.micbou wrote:I got everything up and working. I see my Base (red, because I need to set one of my sensors back up) and motion in the log from the motion detector. The motion switch doesn't change color on motion, right? Im planning to let the switch change to 'away' when the last person leaves the house (using the BT Beacon from this topic (index.php?mark_notification=29483&hash=6a92d7e0) and send me a Telegram message when a alert is triggered.
Any advice on how to get the 'mode' switch in there?
Again, thanks a lot. Really appreciate all the help and I learned a lot from all the steps you guided me through.
-
- Posts: 86
- Joined: Sunday 01 May 2016 0:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: NL
- Contact:
Re: Gigaset Elements Cli - domoticz support
Great!
How do I set an action w/ Blocky? I want to play a voice command and send a message via telegram.
How do I set an action w/ Blocky? I want to play a voice command and send a message via telegram.
-
- Posts: 115
- Joined: Monday 12 October 2015 15:26
- Target OS: Linux
- Domoticz version: 2.3295
- Location: NL
- Contact:
Re: Gigaset Elements Cli - domoticz support
Still need to work a bit more on the native Telegram support in my cli but Domoticz can also do this for you by calling a simple bash script in the on/off action field of a device:micbou wrote:Great!
How do I set an action w/ Blocky? I want to play a voice command and send a message via telegram.
Follow step 1, 2, 3, and 5 of below instructable to get an authorization token and chat ID. (step 4 not needed)
http://www.instructables.com/id/Telegra ... /?ALLSTEPS
Create telegram-cli.sh with below code and replace TOKEN / CHATID with those you got from doing above steps.
Code: Select all
#!/bin/sh -e
# Telegram token
TOKEN=bot*************************************************
# Telegram chat ID
CHATID=12345678
curl -o /dev/null -s -X POST "https://api.telegram.org/$TOKEN/sendMessage" -F chat_id=$CHATID -F text="$1 $2 $3 $4 $5 $6 $7 $8 $9 $10"
script:///home/user/script/telegram-cli.sh Hoi, dit is een TEST!
-
- Posts: 86
- Joined: Sunday 01 May 2016 0:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: NL
- Contact:
Re: Gigaset Elements Cli - domoticz support
I got the Telegram service up, but I want to trigger it when the alarm goes of or even when motion is detected..
-
- Posts: 86
- Joined: Sunday 01 May 2016 0:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: NL
- Contact:
Re: Gigaset Elements Cli - domoticz support
hi, I was forced to clean install my Domoticz/RPi3 today. I tried working through the installation again and it seemed to work, but I ran into this error running gigasetelements-cli -tt
when I switch mode in the selector the log shows:
Any idea?
Code: Select all
root@raspberrypi:/etc# gigasetelements-cli -tt
Gigaset Elements - Command-line Interface v1.5.0b1
[-] Configuration | LOADED | /etc/gigasetelements-cli.conf
[-] Identity | VERIFIED | User logged in successfully.
[-] Authentication | SUCCESS |
[-] Basestation | ONLINE | E52C011F30C1BE84C86895D96C76D693
[-] Status | GREEN | Modus HOME
[-] ERROR | UNKNOWN | HTTPConnectionPool(host='192.68.1.112', port=8080): Max retries exceeded with url: /json.htm?type=command¶m=addlogmessage&message=Gigaset%20Elements%20-%20Command-line%20Interface:%20Domoticz%20mode%20started (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x763cd290>: Failed to establish a new connection: [Errno 101] Network is unreachable',))
Code: Select all
2016-05-29 22:46:53.652 (Gigaset Elements Modus) Light/Switch (Gigaset Elements Modus)
2016-05-29 22:46:54.445 Executing script: /usr/local/bin/gigasetelements-cli
2016-05-29 22:46:55.025 Error: Error executing script command (/usr/local/bin/gigasetelements-cli). returned: 512
Any idea?
-
- Posts: 115
- Joined: Monday 12 October 2015 15:26
- Target OS: Linux
- Domoticz version: 2.3295
- Location: NL
- Contact:
Re: Gigaset Elements Cli - domoticz support
Best guess would be an authorization issue. In domoticz settings check the option Local Networks (no username/password) and addmicbou wrote:hi, I was forced to clean install my Domoticz/RPi3 today. I tried working through the installation again and it seemed to work, but I ran into this error running gigasetelements-cli -tt
when I switch mode in the selector the log shows:Code: Select all
root@raspberrypi:/etc# gigasetelements-cli -tt Gigaset Elements - Command-line Interface v1.5.0b1 [-] Configuration | LOADED | /etc/gigasetelements-cli.conf [-] Identity | VERIFIED | User logged in successfully. [-] Authentication | SUCCESS | [-] Basestation | ONLINE | E52C011F30C1BE84C86895D96C76D693 [-] Status | GREEN | Modus HOME [-] ERROR | UNKNOWN | HTTPConnectionPool(host='192.68.1.112', port=8080): Max retries exceeded with url: /json.htm?type=command¶m=addlogmessage&message=Gigaset%20Elements%20-%20Command-line%20Interface:%20Domoticz%20mode%20started (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x763cd290>: Failed to establish a new connection: [Errno 101] Network is unreachable',))
Code: Select all
2016-05-29 22:46:53.652 (Gigaset Elements Modus) Light/Switch (Gigaset Elements Modus) 2016-05-29 22:46:54.445 Executing script: /usr/local/bin/gigasetelements-cli 2016-05-29 22:46:55.025 Error: Error executing script command (/usr/local/bin/gigasetelements-cli). returned: 512
Any idea?
Code: Select all
127.0.0.*;192.68.1.*
-
- Posts: 6
- Joined: Monday 30 May 2016 17:16
- Target OS: -
- Domoticz version:
- Contact:
Re: Gigaset Elements Cli - domoticz support
Hi all,
I have some problems with the gigasetelements-cli.
I have created 3 .sh scripts that refer to the 5 actions from the Gigaset Elements System :
but impossible to have the Domoticz working. No errors, but no actions.
For example, the away.sh script contain :
#!/bin/bash
/etc/gigasetelements-cli/gigasetelements-cli.py -m away -q > /dev/null
However, my scripts runs well in putty, changing the mode of the Gigaset Elements System.
Can you help me please ?
For information, I run Domoticz and gigasetelements-cli on my Synology NAS.
Thanks
I have some problems with the gigasetelements-cli.
I have created 3 .sh scripts that refer to the 5 actions from the Gigaset Elements System :
but impossible to have the Domoticz working. No errors, but no actions.
For example, the away.sh script contain :
#!/bin/bash
/etc/gigasetelements-cli/gigasetelements-cli.py -m away -q > /dev/null
However, my scripts runs well in putty, changing the mode of the Gigaset Elements System.
Can you help me please ?

For information, I run Domoticz and gigasetelements-cli on my Synology NAS.
Thanks
-
- Posts: 86
- Joined: Sunday 01 May 2016 0:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: NL
- Contact:
Re: Gigaset Elements Cli - domoticz support
dynasticorpheus wrote:
btw are you sure your ip is 192.68.1.112 and not 192.168.1.112 ???

-
- Posts: 86
- Joined: Sunday 01 May 2016 0:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: NL
- Contact:
Re: Gigaset Elements Cli - domoticz support
@francocouly, does below work?
-
- Posts: 6
- Joined: Monday 30 May 2016 17:16
- Target OS: -
- Domoticz version:
- Contact:
Re: Gigaset Elements Cli - domoticz support
No, it doesn't work, like the previous settings :
and nothing in the logs :
It's very weird, I don't understand :/
and nothing in the logs :
It's very weird, I don't understand :/
-
- Posts: 115
- Joined: Monday 12 October 2015 15:26
- Target OS: Linux
- Domoticz version: 2.3295
- Location: NL
- Contact:
Re: Gigaset Elements Cli - domoticz support
There is really no need to create separate scripts if you do a regular install. Please run below code:francocouly wrote:No, it doesn't work, like the previous settings :
2016-05-30 17_47_17-Domoticz.png
and nothing in the logs :
2016-05-30 17_45_30-TripAdvisor.png
It's very weird, I don't understand :/
Code: Select all
pip install --upgrade https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
viewtopic.php?f=38&t=8404&start=40#p85496
EDIT:
Don't know if you can do a regular install on a NAS but if not than I would suggest you put "python" in front of your command:
Code: Select all
#!/bin/bash
python /etc/gigasetelements-cli/gigasetelements-cli.py -m away -q > /dev/null
-
- Posts: 6
- Joined: Monday 30 May 2016 17:16
- Target OS: -
- Domoticz version:
- Contact:
Re: Gigaset Elements Cli - domoticz support
Hi,
Here is my configuration :
And my switch :
The sensors are OK, but still not able to set the modus with the script. It's running well in cmd line :
Thank you for your help
Here is my configuration :
And my switch :
The sensors are OK, but still not able to set the modus with the script. It's running well in cmd line :
Thank you for your help
-
- Posts: 115
- Joined: Monday 12 October 2015 15:26
- Target OS: Linux
- Domoticz version: 2.3295
- Location: NL
- Contact:
Re: Gigaset Elements Cli - domoticz support
I replicated your setup and it was working so we need to have a closer look, let's first route the output to a text file. Please share the output.francocouly wrote:Hi,
Here is my configuration :
Screen Shot 2016-05-30 at 23.02.28.png
And my switch :
Screen Shot 2016-05-30 at 23.02.44.png
The sensors are OK, but still not able to set the modus with the script. It's running well in cmd line :
Screen Shot 2016-05-30 at 23.06.17.png
Thank you for your help
Code: Select all
script:///etc/gigasetelements-cli/gigasetelements-cli.py -m home >> /tmp/gigasetelements-cli.log
-
- Posts: 6
- Joined: Monday 30 May 2016 17:16
- Target OS: -
- Domoticz version:
- Contact:
Re: Gigaset Elements Cli - domoticz support
Hi,
thanks for your return !
when I add script:///etc/gigasetelements-cli/gigasetelements-cli.py -m home >> /tmp/gigasetelements-cli.log, no .log file can be found in my /tmp folder. Perhaps a problem of rights ?
thanks for your return !
when I add script:///etc/gigasetelements-cli/gigasetelements-cli.py -m home >> /tmp/gigasetelements-cli.log, no .log file can be found in my /tmp folder. Perhaps a problem of rights ?
-
- Posts: 115
- Joined: Monday 12 October 2015 15:26
- Target OS: Linux
- Domoticz version: 2.3295
- Location: NL
- Contact:
Re: Gigaset Elements Cli - domoticz support
Can you try again using below .sh script? Perhaps you first need to "cd" into the correct directory due to environment constraints?francocouly wrote:Hi,
thanks for your return !
when I add script:///etc/gigasetelements-cli/gigasetelements-cli.py -m home >> /tmp/gigasetelements-cli.log, no .log file can be found in my /tmp folder. Perhaps a problem of rights ?
Code: Select all
#!/bin/bash
cd /etc/gigasetelements-cli
python gigasetelements-cli.py -m away
-
- Posts: 6
- Joined: Monday 30 May 2016 17:16
- Target OS: -
- Domoticz version:
- Contact:
Re: Gigaset Elements Cli - domoticz support
Still not working.
the log file is created but empty, even if I add a "sudo -u admin" before the python command in the .sh script, add all the rights to this file, and the same for the log file
the log file is created but empty, even if I add a "sudo -u admin" before the python command in the .sh script, add all the rights to this file, and the same for the log file
-
- Posts: 115
- Joined: Monday 12 October 2015 15:26
- Target OS: Linux
- Domoticz version: 2.3295
- Location: NL
- Contact:
Re: Gigaset Elements Cli - domoticz support
I needed to specify the full path to python to get it working. Can you try as well. First check if it is also /usr/bin/python for you.francocouly wrote:Still not working.
the log file is created but empty, even if I add a "sudo -u admin" before the python command in the .sh script, add all the rights to this file, and the same for the log file
Code: Select all
#!/bin/bash
cd /etc/gigasetelements-cli
/usr/bin/python gigasetelements-cli.py -m away
-
- Posts: 6
- Joined: Monday 30 May 2016 17:16
- Target OS: -
- Domoticz version:
- Contact:
Re: Gigaset Elements Cli - domoticz support
Yessss ! It works perfectly 
Thank you very much for your support !

Thank you very much for your support !
Who is online
Users browsing this forum: No registered users and 1 guest