Code: Select all
2016-05-31 22:02:14.358 Error: Error executing script command (/usr/local/bin/gigasetelements-cli). returned: 512
Moderator: leecollings
Code: Select all
2016-05-31 22:02:14.358 Error: Error executing script command (/usr/local/bin/gigasetelements-cli). returned: 512
Only when changing into Away, Off and Custom are ok?micbou wrote:Changing the status to Away still gives me
any suggestions?Code: Select all
2016-05-31 22:02:14.358 Error: Error executing script command (/usr/local/bin/gigasetelements-cli). returned: 512
Did you set the 2 second off delay at your motion, button or camera sensor(s)? For simplicity reasons the CLI only turns those switches on and then relies on the off delay setting to have it turned off again. It's in the instructionsmicbou wrote:Not my week, I guess.. thanks.
I must say that this fresh install has made the project worked even better. On my first try the switches didnt show an on/off status, but do now although the motion sensor seems to be always on (even when there hasnt been any movement). Is this expected behaviour?
Code: Select all
root@raspberrypi:/tmp# gigasetelements-cli -ss
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
[-] Bouman Base | ONLINE | firmware UP_TO_DATE
[-] achterdeur | ONLINE | firmware UP_TO_DATE | battery OK | position OPEN | 027C06E864
[-] woonkamer | ONLINE | firmware UP_TO_DATE | battery OK | 027C06E866
Don't think this a CLI related problem as the data comes from the cloud. Perhaps re-calibrate?micbou wrote:yeah I did. Now my door sensor stopped working. The status when running -ss seems to be stuck in 'open' status
Code: Select all
root@raspberrypi:/tmp# gigasetelements-cli -ss 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 [-] Bouman Base | ONLINE | firmware UP_TO_DATE [-] achterdeur | ONLINE | firmware UP_TO_DATE | battery OK | position OPEN | 027C06E864 [-] woonkamer | ONLINE | firmware UP_TO_DATE | battery OK | 027C06E866
You can change the selector modus by setting the level in blockly:micbou wrote:Great!
How do I set an action w/ Blocky? I want to play a voice command and send a message via telegram.
Code: Select all
[SET {Gigaset Elements Modus} = {0}]
[SET {Gigaset Elements Modus} = {10}]
[SET {Gigaset Elements Modus} = {20}]
works like a charm! Thanksdynasticorpheus wrote:You can change the selector modus by setting the level in blockly:micbou wrote:Great!
How do I set an action w/ Blocky? I want to play a voice command and send a message via telegram.
(note: PM didn't work perhaps because your inbox is full?)Code: Select all
[SET {Gigaset Elements Modus} = {0}] [SET {Gigaset Elements Modus} = {10}] [SET {Gigaset Elements Modus} = {20}]
Yes you always will need a base.Todely wrote:Hello
Does i need gigaset element base to ise element like siren or not ?
Thanks
Please provide the output ofKwintessens wrote:Hey all,
First of all thank you for the great work so far, it was one of the reasons I got myself a GIgaset Elements set. Now that I have been playing around with Domoticz for a while, added some switches (TP-link, Wemo switches) etc. It is now time to make the next step and integrate gigaset elements with it so I can automate things based on my home/away state from Gigaset Elements.
I am currently struggling in getting the sensors to work in Domoticz. My output from gigasetelements-cli -ss shows all sensors just fine. Output from gigasetelements-cli -tt shows some errors:
[-] Configuration | [92mLOADED [0m | /etc/gigasetelements-cli.conf
[-] Identity | [92mVERIFIED[0m | User logged in successfully.
[-] Authentication | [92mSUCCESS [0m |
[-] Basestation | [92mONLINE [0m | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[-] Status | [92mGREEN [0m | Modus set from [92mHOME[0m to [92mHOME[0m
Traceback (most recent call last):
File "/bin/gigasetelements-cli", line 11, in <module>
sys.exit(main())
File "/usr/lib/python2.7/site-packages/gigasetelements/gigasetelements.py", line 731, in main
monitor()
File "/usr/lib/python2.7/site-packages/gigasetelements/gigasetelements.py", line 512, in monitor
domoticz(status_data['system_health'].lower(), basestation_data[0]['id'].lower(), basestation_data[0]['friendly_name'].lower())
File "/usr/lib/python2.7/site-packages/gigasetelements/gigasetelements.py", line 561, in domoticz
LEVEL.get(status_data['system_health'], '3') + '&svalue=' + friendly + ' | ' + event)
KeyError: u'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx''
(NOTE I replaced key with xxxxxxxxxxx)
Could anyone put me on the right way? I am not that familiar with cli, so I want to integrate it more directly in Domoticz.
I own multiple window and door sensors, base station, button, IP Camera and alarm and currently running Domoticz on a Synology.
Code: Select all
gigasetelements-cli -ss
Code: Select all
Gigaset Elements - Command-line Interface
[-] Configuration | [92mLOADED [0m | /etc/gigasetelements-cli.conf
[-] Identity | [92mVERIFIED[0m | User logged in successfully.
[-] Authentication | [92mSUCCESS [0m |
[-] Basestation | [92mONLINE [0m | EE23F082D109D521A3CFB47FA669F044
[-] Status | [92mGREEN [0m | Modus set from [92mHOME[0m to [92mHOME[0m
[-] Home | [92mONLINE [0m | firmware [92mUP_TO_DATE[0m
[-] Living room | [92mONLINE [0m | firmware [92mUP_TO_DATE[0m | 026D3ED0F2
[-] motion | [92mONLINE [0m | firmware [92mUP_TO_DATE[0m | battery [92mOK[0m | 027BFECCE5
[-] Window 1 | [92mONLINE [0m | firmware [92mUP_TO_DATE[0m | battery [92mOK[0m | 027BFEE955
[-] Back door | [92mONLINE [0m | firmware [92mUP_TO_DATE[0m | battery [92mOK[0m | position [92mCLOSED[0m | 027BFECCE7
[-] Front door | [92mONLINE [0m | firmware [92mUP_TO_DATE[0m | battery [92mOK[0m | position [92mCLOSED[0m | 027C0882F3
[-] Knop | [92mONLINE [0m | firmware [92mUP_TO_DATE[0m | battery [92mOK[0m | 02D50D187F
Code: Select all
# Sample configuration file for gigasetelements-cli
#
# Note: command-line options override below values
#
# On POSIX configuration file is automatically read from below locations:
# ~/.gigasetelements-cli
# /etc/gigasetelements-cli.conf
# /usr/etc/gigasetelements-cli.conf
# /usr/local/etc/gigasetelements-cli.conf
# /opt/etc/gigasetelements-cli.conf
[accounts]
# username (email) in use with my.gigaset-elements.com
username: xxxxxxxxxxxxxxxx
# password in use with my.gigaset-elements.com
password: xxxxxxxxxxxxxxx
# add token to enable pushbullet notification (optional)
pbtoken:
[options]
# set modus {home,away,custom} (optional)
modus: home
# suppress urllib3 warnings {true,false} (optional)
nowarning: true
[domoticz]
# domoticz server ip address (required)
ip: 192.168.2.20
# domoticz server port (required)
port: 8084
# domoticz user name (optional)
username:
# domoticz password (optional)
password:
# domoticz idx sensor pairing (required)
# 1. Go to 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. Run "gigasetelements-cli -ss" to get sensor ids and match them with the their respective idx in domoticz
# 7. Run "gigasetelements-cli -a" to get camera sensor id. Use the 12 uppercase digits in stream url. This MAC address can also be found on the back of the camera.
# example button
# 02D50D187F: ?
#example alarm
# 026D3ED0F2: ?
# example window
# 027BFEE955: 6
# example back door
# 027BFECCE7: 5
# example front door
# 027C0882F3: 4
# example basestation id
# EE23F082D109D521A3CFB47FA669F044: 3
# example camera id
# 7C2F80901151: ?
#example motion sensor
# 027BFECCE5: ?
you need to uncomment (remove #) otherwise the values are not loaded. See for example how it is done for ip and port valuesKwintessens wrote:Output gigasetelements-cli -ss:Config:Code: Select all
Gigaset Elements - Command-line Interface [-] Configuration | [92mLOADED [0m | /etc/gigasetelements-cli.conf [-] Identity | [92mVERIFIED[0m | User logged in successfully. [-] Authentication | [92mSUCCESS [0m | [-] Basestation | [92mONLINE [0m | EE23F082D109D521A3CFB47FA669F044 [-] Status | [92mGREEN [0m | Modus set from [92mHOME[0m to [92mHOME[0m [-] Home | [92mONLINE [0m | firmware [92mUP_TO_DATE[0m [-] Living room | [92mONLINE [0m | firmware [92mUP_TO_DATE[0m | 026D3ED0F2 [-] motion | [92mONLINE [0m | firmware [92mUP_TO_DATE[0m | battery [92mOK[0m | 027BFECCE5 [-] Window 1 | [92mONLINE [0m | firmware [92mUP_TO_DATE[0m | battery [92mOK[0m | 027BFEE955 [-] Back door | [92mONLINE [0m | firmware [92mUP_TO_DATE[0m | battery [92mOK[0m | position [92mCLOSED[0m | 027BFECCE7 [-] Front door | [92mONLINE [0m | firmware [92mUP_TO_DATE[0m | battery [92mOK[0m | position [92mCLOSED[0m | 027C0882F3 [-] Knop | [92mONLINE [0m | firmware [92mUP_TO_DATE[0m | battery [92mOK[0m | 02D50D187F
Note that I didn't map '?' yet, because I purchased them later. Once the other sensors work I will create more sensors for them.Code: Select all
# Sample configuration file for gigasetelements-cli # # Note: command-line options override below values # # On POSIX configuration file is automatically read from below locations: # ~/.gigasetelements-cli # /etc/gigasetelements-cli.conf # /usr/etc/gigasetelements-cli.conf # /usr/local/etc/gigasetelements-cli.conf # /opt/etc/gigasetelements-cli.conf [accounts] # username (email) in use with my.gigaset-elements.com username: xxxxxxxxxxxxxxxx # password in use with my.gigaset-elements.com password: xxxxxxxxxxxxxxx # add token to enable pushbullet notification (optional) pbtoken: [options] # set modus {home,away,custom} (optional) modus: home # suppress urllib3 warnings {true,false} (optional) nowarning: true [domoticz] # domoticz server ip address (required) ip: 192.168.2.20 # domoticz server port (required) port: 8084 # domoticz user name (optional) username: # domoticz password (optional) password: # domoticz idx sensor pairing (required) # 1. Go to 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. Run "gigasetelements-cli -ss" to get sensor ids and match them with the their respective idx in domoticz # 7. Run "gigasetelements-cli -a" to get camera sensor id. Use the 12 uppercase digits in stream url. This MAC address can also be found on the back of the camera. # example button # 02D50D187F: ? #example alarm # 026D3ED0F2: ? # example window # 027BFEE955: 6 # example back door # 027BFECCE7: 5 # example front door # 027C0882F3: 4 # example basestation id # EE23F082D109D521A3CFB47FA669F044: 3 # example camera id # 7C2F80901151: ? #example motion sensor # 027BFECCE5: ?
Code: Select all
[Mon Oct 10 22:43:33 2016] Gigaset Elements - Command-line Interface
[Mon Oct 10 22:43:33 2016] Configuration | LOADED | /etc/gigasetelements-cli.conf
[Mon Oct 10 22:43:34 2016] Identity | VERIFIED | User logged in successfully.
[Mon Oct 10 22:43:35 2016] Authentication | SUCCESS |
[Mon Oct 10 22:43:36 2016] Basestation | ONLINE | EE23F082D109D521A3CFB47FA669F044
[Mon Oct 10 22:43:37 2016] Status | GREEN | Modus set from HOME to HOME
[Mon Oct 10 22:43:37 2016] Domoticz mode | STARTED | CTRL+C to exit
This is correct behavior as it is now monitoring for events using the gigasetelements API. Once everything works as expected add below options to have this run in the background and auto restart in case of an errorKwintessens wrote:That is quite stupid..I must have been playing around with it since I wasn't getting any response. Door sensors are working now
. Window sensor is not updating, but I think this is because it needs recalibrating (it hangs in the gigaset app too.
I am now only unable to get base to update. When I uncomment base my terminal hangs without response/output. Log is as follows:
Code: Select all
[Mon Oct 10 22:43:33 2016] Gigaset Elements - Command-line Interface [Mon Oct 10 22:43:33 2016] Configuration | LOADED | /etc/gigasetelements-cli.conf [Mon Oct 10 22:43:34 2016] Identity | VERIFIED | User logged in successfully. [Mon Oct 10 22:43:35 2016] Authentication | SUCCESS | [Mon Oct 10 22:43:36 2016] Basestation | ONLINE | EE23F082D109D521A3CFB47FA669F044 [Mon Oct 10 22:43:37 2016] Status | GREEN | Modus set from HOME to HOME [Mon Oct 10 22:43:37 2016] Domoticz mode | STARTED | CTRL+C to exit
Code: Select all
--daemon --restart
Code: Select all
--log /tmp/gigasetelements-cli.log
Thanks you so muchdynasticorpheus wrote:This is correct behavior as it is now monitoring for events using the gigasetelements API. Once everything works as expected add below options to have this run in the background and auto restart in case of an errorKwintessens wrote:That is quite stupid..I must have been playing around with it since I wasn't getting any response. Door sensors are working now
. Window sensor is not updating, but I think this is because it needs recalibrating (it hangs in the gigaset app too.
I am now only unable to get base to update. When I uncomment base my terminal hangs without response/output. Log is as follows:
Code: Select all
[Mon Oct 10 22:43:33 2016] Gigaset Elements - Command-line Interface [Mon Oct 10 22:43:33 2016] Configuration | LOADED | /etc/gigasetelements-cli.conf [Mon Oct 10 22:43:34 2016] Identity | VERIFIED | User logged in successfully. [Mon Oct 10 22:43:35 2016] Authentication | SUCCESS | [Mon Oct 10 22:43:36 2016] Basestation | ONLINE | EE23F082D109D521A3CFB47FA669F044 [Mon Oct 10 22:43:37 2016] Status | GREEN | Modus set from HOME to HOME [Mon Oct 10 22:43:37 2016] Domoticz mode | STARTED | CTRL+C to exit
also wise to have the cli create a log using below option (you need write access of course so feel free to change location if required)Code: Select all
--daemon --restart
Code: Select all
--log /tmp/gigasetelements-cli.log
Thanks for the feedback!Kwintessens wrote:
Thanks you so much.
Everything's running smoothly for the past couple of weeks. Now I am trying to automate a little bit more and thinking of ideas how to do so.
I want to control more scripts and lighting on the basis of my home or away state. It doesn't seem to be possible to monitor mode from an event in the CLI.
I am currently setting my away mode from gigaset button on double press, and home mode from single press. The problem with this is that double-presses are not recognized as such (logs all show single press).
I don't think I should need an additional gigaset button to set alarm in addition to my current button.. so am I missing some logic here?
Code: Select all
00 Off
10 Short -------> gigasetelements-cli --modus home
20 Long
30 Longer
40 Double -------> gigasetelements-cli --modus away
Wherever I can help let me know.dynasticorpheus wrote:Thanks for the feedback!Kwintessens wrote:
Thanks you so much.
Everything's running smoothly for the past couple of weeks. Now I am trying to automate a little bit more and thinking of ideas how to do so.
I want to control more scripts and lighting on the basis of my home or away state. It doesn't seem to be possible to monitor mode from an event in the CLI.
I am currently setting my away mode from gigaset button on double press, and home mode from single press. The problem with this is that double-presses are not recognized as such (logs all show single press).
I don't think I should need an additional gigaset button to set alarm in addition to my current button.. so am I missing some logic here?
As workaround I currently have a curl script running every minute which updates the base selector switch to the current state should however be implemented in the CLI itself of courseDon't have too much time at the moment but I will put in on my to-do list.
We should probably also use a selector switch for button so we can differentiate between the actual press. From there we can assign an action to the respective level. Again I will put it on my to-do list.
Code: Select all
00 Off 10 Short -------> gigasetelements-cli --modus home 20 Long 30 Longer 40 Double -------> gigasetelements-cli --modus away
Sorry what script do you mean? The script I have running checks every minute the state of the system (Home/Away/Custom) and puts the selector switch in the same postition. This is the one you also want?Kwintessens wrote:
Wherever I can help let me know.Care to share your script? I think firing it off from a button press instead of scheduled job would definitely work for me as a workaround.
Users browsing this forum: No registered users and 1 guest