Page 2 of 8
Re: Gigaset Elements Cli - domoticz support
Posted: Saturday 07 May 2016 13:20
by micbou
Appreciate the help Dynasticorpheus!
Your solution worked. After matching the sensor IDs w/ the IDX's I ran gigasetelements-cli.py -j -tt and got this:
root@raspberrypi:/home/pi/gigaset-elements# ./gigasetelements-cli.py -j -tt
Gigaset Elements - Command-line Interface
[-] Configuration | LOADED | /etc/gigasetelements-cli.conf
Traceback (most recent call last):
File "./gigasetelements-cli.py", line 12, in <module>
main()
File "/home/pi/gigaset-elements/gigasetelements/gigasetelements.py", line 678, in main
connect()
File "/home/pi/gigaset-elements/gigasetelements/gigasetelements.py", line 295, in connect
commit_data = restpost(URL_IDENTITY, payload)
File "/home/pi/gigaset-elements/gigasetelements/gigasetelements.py", line 273, in restpost
log('ERROR'.ljust(17) + ' | ' + 'UNKNOWN'.ljust(8) + ' | ' + str(time.strftime('%m/%d/%y %H:%M:%S')) + ' ' + str(e.message), 3, 1)
TypeError: __str__ returned non-string (type Error)
I know its something small in the .conf file but not sure what.
here's the .conf file:
[accounts]
# username (email) in use with my.gigaset-elements.com
username: XXXXXXX
# password in use with my.gigaset-elements.com
password: XXXXXXX
# 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.1.112
# domoticz server port (required)
port: 8080
# domoticz user name (optional)
username: XXXXXXX
# domoticz password (optional)
password: XXXXXXXX
# 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 motion/door/window/siren/plug
# 123FC4577H: 99
# example basestation id
# F32A76C4DHJ1B743A0E0D74EFD2375D1: 98
# example camera id
# 7C2G30873SED: 97
027C06E866: 10
E52C011F30C1BE84C86895D96C76D693: 11
Re: Gigaset Elements Cli - domoticz support
Posted: Sunday 08 May 2016 8:52
by dynasticorpheus
No worries, it's cool to see people use my code
If you are indeed able to run
there is no need to run the program from source dir so let's try to run the command using the installed version
Once it's working you can run it in the background and route all info to a log file
Code: Select all
gigasetelements-cli -tt -j -l /tmp/gigasetelements-cli.log -D -ss
If it is still not working and you did not upgrade to the develop version yet please do so as it has better error handling/logging
Code: Select all
pip install --upgrade https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
micbou wrote:Appreciate the help Dynasticorpheus!
Your solution worked. After matching the sensor IDs w/ the IDX's I ran gigasetelements-cli.py -j -tt and got this:
root@raspberrypi:/home/pi/gigaset-elements# ./gigasetelements-cli.py -j -tt
Gigaset Elements - Command-line Interface
[-] Configuration | LOADED | /etc/gigasetelements-cli.conf
Traceback (most recent call last):
File "./gigasetelements-cli.py", line 12, in <module>
main()
File "/home/pi/gigaset-elements/gigasetelements/gigasetelements.py", line 678, in main
connect()
File "/home/pi/gigaset-elements/gigasetelements/gigasetelements.py", line 295, in connect
commit_data = restpost(URL_IDENTITY, payload)
File "/home/pi/gigaset-elements/gigasetelements/gigasetelements.py", line 273, in restpost
log('ERROR'.ljust(17) + ' | ' + 'UNKNOWN'.ljust(8) + ' | ' + str(time.strftime('%m/%d/%y %H:%M:%S')) + ' ' + str(e.message), 3, 1)
TypeError: __str__ returned non-string (type Error)
Re: Gigaset Elements Cli - domoticz support
Posted: Sunday 08 May 2016 11:49
by micbou
I had it error free,but the sensor didn't seem to give any signal so I decided to install the develop version.
My steps:
Code: Select all
1. pip install --upgrade https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
2. cd gigasetelements-cli
3. python setup.py install --force
4. Checked if my /etc/gigasetelements-cli.conf was still in tact (which is true)
5. gigasetelements-cli -ss
The result
Gigaset Elements - Command-line Interface
[-] Configuration | LOADED | /etc/gigasetelements-cli.conf
Traceback (most recent call last):
File "/usr/local/bin/gigasetelements-cli", line 9, in <module>
load_entry_point('gigasetelements-cli==1.4.0', 'console_scripts', 'gigasetelements-cli')()
File "build/bdist.linux-armv7l/egg/gigasetelements/gigasetelements.py", line 678, in main
File "build/bdist.linux-armv7l/egg/gigasetelements/gigasetelements.py", line 295, in connect
File "build/bdist.linux-armv7l/egg/gigasetelements/gigasetelements.py", line 273, in restpost
TypeError: __str__ returned non-string (type Error)
Ran the pip install --upgrade requests successfully, but still the same errors.
funny, because it does seem to be working (log below). The switches/utility (base station) don't seem to react
[Sun May 8 11:19:31 2016] Gigaset Elements | CLI | 1.5.0b1 | -tt -j -l /tmp/gigasetelements-cli.log -D -ss
[Sun May 8 11:19:31 2016] Run as background | DAEMON | /tmp/gigasetelements-cli.pid
[Sun May 8 11:19:31 2016] Configuration | LOADED | /etc/gigasetelements-cli.conf
[Sun May 8 11:19:34 2016] Identity | VERIFIED | User logged in successfully.
[Sun May 8 11:19:35 2016] Authentication | SUCCESS |
[Sun May 8 11:19:35 2016] Basestation | ONLINE | E52C011F30C1BE84C86895D96C76D693
[Sun May 8 11:19:35 2016] Status | RED | ENDNODE_OFFLINE | Modus set from HOME to HOME
[Sun May 8 11:19:35 2016] Michel's Thuis | ONLINE | firmware UP_TO_DATE
[Sun May 8 11:19:35 2016] Achterdeur | OFFLINE | firmware UP_TO_DATE
[Sun May 8 11:19:35 2016] woonkamer | ONLINE | firmware UP_TO_DATE
[Sun May 8 11:19:35 2016] Domoticz mode | STARTED | CTRL+C to exit
[Sun May 8 11:25:14 2016] 05/08/16 11:25:12 | ps02 | movement woonkamer
[Sun May 8 11:25:45 2016] 05/08/16 11:25:44 | ps02 | movement woonkamer
[Sun May 8 11:26:29 2016] 05/08/16 11:26:27 | ps02 | movement woonkamer
[Sun May 8 11:29:56 2016] 05/08/16 11:29:54 | ps02 | movement woonkamer
[Sun May 8 11:30:48 2016] 05/08/16 11:30:45 | ps02 | movement woonkamer
[Sun May 8 11:31:25 2016] 05/08/16 11:31:24 | ps02 | movement woonkamer
[Sun May 8 11:53:48 2016] 05/08/16 11:53:46 | ps02 | movement woonkamer
[Sun May 8 11:54:35 2016] 05/08/16 11:54:34 | ps02 | movement woonkamer
[Sun May 8 11:56:56 2016] 05/08/16 11:56:54 | ps02 | movement woonkamer
[Sun May 8 11:57:25 2016] 05/08/16 11:57:23 | ps02 | movement woonkamer
[Sun May 8 11:58:06 2016] 05/08/16 11:58:05 | ps02 | movement woonkamer
[Sun May 8 12:00:04 2016] 05/08/16 12:00:02 | ps02 | movement woonkamer
[Sun May 8 12:01:18 2016] 05/08/16 12:01:15 | ps02 | movement woonkamer
[Sun May 8 12:02:20 2016] 05/08/16 12:02:18 | ps02 | movement woonkamer
[Sun May 8 12:03:48 2016] 05/08/16 12:03:47 | ps02 | movement woonkamer
[Sun May 8 12:05:11 2016] 05/08/16 12:05:09 | ps02 | movement woonkamer
[Sun May 8 12:05:50 2016] 05/08/16 12:05:49 | ps02 | movement woonkamer
[Sun May 8 12:07:34 2016] 05/08/16 12:07:32 | ps02 | movement woonkamer
Again, I appreciate all the help.
Re: Gigaset Elements Cli - domoticz support
Posted: Sunday 08 May 2016 21:28
by dynasticorpheus
Looking at your feedback it seems you are installing the develop version (1.5) in step 1 but downgrading to version 1.4 again by doing step 2 & 3. As you can see in the error message version 1.4 is mentioned and in the log the (working!) version 1.5.
Run below command which does a (forced) upgrade to version 1.5 and you should be fine.
Code: Select all
pip install --upgrade --force-reinstall https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
You can even delete the gigasetelements-cli directory you mention in step 2&3 as you do not need it anymore as you have the program installed and accessible via the the
gigasetelements-cli command.
Once you are back on version 1.5 can you share the output of of below command so we can check your config file
micbou wrote:I had it error free,but the sensor didn't seem to give any signal so I decided to install the develop version.
My steps:
Code: Select all
1. pip install --upgrade https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
2. cd gigasetelements-cli
3. python setup.py install --force
4. Checked if my /etc/gigasetelements-cli.conf was still in tact (which is true)
5. gigasetelements-cli -ss
Again, I appreciate all the help.
Re: Gigaset Elements Cli - domoticz support
Posted: Sunday 08 May 2016 22:00
by micbou
Deleted the folder, upgrade with the code you gave me and I am now on 1.5. Gigasetelements-cli -ss gives me
Code: Select all
root@raspberrypi:/etc# gigasetelements-cli -ss
Gigaset Elements - Command-line Interface v1.5.0b1
[-] Configuration | LOADED | /etc/gigasetelements-cli.conf
Traceback (most recent call last):
File "/usr/local/bin/gigasetelements-cli", line 9, in <module>
load_entry_point('gigasetelements-cli==1.5.0b1', 'console_scripts', 'gigasetelements-cli')()
File "/usr/local/lib/python2.7/dist-packages/gigasetelements/gigasetelements.py", line 761, in main
base()
File "/usr/local/lib/python2.7/dist-packages/gigasetelements/gigasetelements.py", line 693, in base
auth_time = authenticate()
File "/usr/local/lib/python2.7/dist-packages/gigasetelements/gigasetelements.py", line 267, in authenticate
commit_data = rest(POST, URL_IDENTITY, payload)
File "/usr/local/lib/python2.7/dist-packages/gigasetelements/gigasetelements.py", line 250, in rest
log('ERROR'.ljust(17) + ' | ' + 'UNKNOWN'.ljust(8) + ' | ' + str(error.message), 3, end)
TypeError: __str__ returned non-string (type Error)
Re: Gigaset Elements Cli - domoticz support
Posted: Sunday 08 May 2016 22:26
by dynasticorpheus
Hmm weird can you share the output of
micbou wrote:Deleted the folder, upgrade with the code you gave me and I am now on 1.5. Gigasetelements-cli -ss gives me
Code: Select all
root@raspberrypi:/etc# gigasetelements-cli -ss
Gigaset Elements - Command-line Interface v1.5.0b1
[-] Configuration | LOADED | /etc/gigasetelements-cli.conf
Traceback (most recent call last):
File "/usr/local/bin/gigasetelements-cli", line 9, in <module>
load_entry_point('gigasetelements-cli==1.5.0b1', 'console_scripts', 'gigasetelements-cli')()
File "/usr/local/lib/python2.7/dist-packages/gigasetelements/gigasetelements.py", line 761, in main
base()
File "/usr/local/lib/python2.7/dist-packages/gigasetelements/gigasetelements.py", line 693, in base
auth_time = authenticate()
File "/usr/local/lib/python2.7/dist-packages/gigasetelements/gigasetelements.py", line 267, in authenticate
commit_data = rest(POST, URL_IDENTITY, payload)
File "/usr/local/lib/python2.7/dist-packages/gigasetelements/gigasetelements.py", line 250, in rest
log('ERROR'.ljust(17) + ' | ' + 'UNKNOWN'.ljust(8) + ' | ' + str(error.message), 3, end)
TypeError: __str__ returned non-string (type Error)
Re: Gigaset Elements Cli - domoticz support
Posted: Sunday 08 May 2016 23:04
by micbou
See below (what did I just do by the way?)
Code: Select all
root@raspberrypi:/tmp# pip freeze
RPi.GPIO==0.6.2
Unidecode==0.04.19
argparse==1.2.1
chardet==2.3.0
colorama==0.3.2
daemonize==2.4.6
gigasetelements-cli==1.5.0b1
html5lib==0.999
ndg-httpsclient==0.3.2
numpy==1.8.2
pushbullet.py==0.10.0
pyOpenSSL==0.13.1
pyasn1==0.1.7
pyinotify==0.9.4
python-crontab==2.0.1
python-dateutil==2.5.3
python-magic==0.4.11
requests==2.4.3
six==1.8.0
urllib3==1.9.1
websocket-client==0.37.0
wheel==0.24.0
wsgiref==0.1.2
youtube-dl==2014.08.05
Re: Gigaset Elements Cli - domoticz support
Posted: Monday 09 May 2016 8:28
by dynasticorpheus
This command shows all installed python packages including their version number. As you were getting the initial error again I was interested to see which version of requests you currently have installed. I can see you somehow still have the old version 2.4.3 installed which indeed has the bug I was referring to.
Can you please upgrade (again) by issuing below commands and share me the output?
Code: Select all
pip install --upgrade --force-reinstall requests
Don't worry we'll get there
micbou wrote:See below (what did I just do by the way?)
Code: Select all
root@raspberrypi:/tmp# pip freeze
RPi.GPIO==0.6.2
Unidecode==0.04.19
argparse==1.2.1
chardet==2.3.0
colorama==0.3.2
daemonize==2.4.6
gigasetelements-cli==1.5.0b1
html5lib==0.999
ndg-httpsclient==0.3.2
numpy==1.8.2
pushbullet.py==0.10.0
pyOpenSSL==0.13.1
pyasn1==0.1.7
pyinotify==0.9.4
python-crontab==2.0.1
python-dateutil==2.5.3
python-magic==0.4.11
requests==2.4.3
six==1.8.0
urllib3==1.9.1
websocket-client==0.37.0
wheel==0.24.0
wsgiref==0.1.2
youtube-dl==2014.08.05
Re: Gigaset Elements Cli - domoticz support
Posted: Monday 09 May 2016 17:38
by micbou
The upgrade didn't do what we expected
Code: Select all
root@raspberrypi:/home/pi# pip install --upgrade --force-reinstall requests
Downloading/unpacking requests
Downloading requests-2.10.0-py2.py3-none-any.whl (506kB): 506kB downloaded
Installing collected packages: requests
Found existing installation: requests 2.4.3
Not uninstalling requests at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed requests
Cleaning up...
Re: Gigaset Elements Cli - domoticz support
Posted: Monday 09 May 2016 17:46
by dynasticorpheus
Can you run below 3 commands? One of the first two might fail but that is ok
Code: Select all
sudo apt-get --purge remove requests
Code: Select all
pip install --upgrade --force-reinstall requests
micbou wrote:The upgrade didn't do what we expected
Code: Select all
root@raspberrypi:/home/pi# pip install --upgrade --force-reinstall requests
Downloading/unpacking requests
Downloading requests-2.10.0-py2.py3-none-any.whl (506kB): 506kB downloaded
Installing collected packages: requests
Found existing installation: requests 2.4.3
Not uninstalling requests at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed requests
Cleaning up...
Re: Gigaset Elements Cli - domoticz support
Posted: Monday 09 May 2016 17:54
by micbou
Code: Select all
root@raspberrypi:/home/pi# apt-get --purge remove requests
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package requests
Code: Select all
root@raspberrypi:/home/pi# sudo apt-get --purge remove requests
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package requests
Code: Select all
root@raspberrypi:/home/pi# pip install --upgrade --force-reinstall requests
Downloading/unpacking requests
Downloading requests-2.10.0-py2.py3-none-any.whl (506kB): 506kB downloaded
Installing collected packages: requests
Found existing installation: requests 2.4.3
Not uninstalling requests at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed requests
Cleaning up...
root@raspberrypi:/home/pi#
Re: Gigaset Elements Cli - domoticz support
Posted: Monday 09 May 2016 17:57
by dynasticorpheus
Ok I guess it's installed via pip using sudo so let's also try to upgrade using sudo:
Code: Select all
sudo pip install --upgrade --force-reinstall requests
micbou wrote:
Code: Select all
root@raspberrypi:/home/pi# apt-get --purge remove requests
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package requests
Code: Select all
root@raspberrypi:/home/pi# sudo apt-get --purge remove requests
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package requests
Code: Select all
root@raspberrypi:/home/pi# pip install --upgrade --force-reinstall requests
Downloading/unpacking requests
Downloading requests-2.10.0-py2.py3-none-any.whl (506kB): 506kB downloaded
Installing collected packages: requests
Found existing installation: requests 2.4.3
Not uninstalling requests at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed requests
Cleaning up...
root@raspberrypi:/home/pi#
Re: Gigaset Elements Cli - domoticz support
Posted: Monday 09 May 2016 18:04
by micbou
ugh
man, thanks for your patience! I owe you a virtual beer after we got this fixed
Code: Select all
root@raspberrypi:/home/pi# sudo pip install --upgrade --force-reinstall requests
Downloading/unpacking requests
Downloading requests-2.10.0-py2.py3-none-any.whl (506kB): 506kB downloaded
Installing collected packages: requests
Found existing installation: requests 2.4.3
Not uninstalling requests at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed requests
Cleaning up...
root@raspberrypi:/home/pi#
Re: Gigaset Elements Cli - domoticz support
Posted: Monday 09 May 2016 18:12
by dynasticorpheus
I think I forgot to add
pyton- in my previous suggestion so ... let's try:
Code: Select all
sudo apt-get --purge remove python-requests
Code: Select all
sudo pip install --upgrade --force-reinstall requests
micbou wrote:ugh
man, thanks for your patience! I owe you a virtual beer after we got this fixed
Code: Select all
root@raspberrypi:/home/pi# sudo pip install --upgrade --force-reinstall requests
Downloading/unpacking requests
Downloading requests-2.10.0-py2.py3-none-any.whl (506kB): 506kB downloaded
Installing collected packages: requests
Found existing installation: requests 2.4.3
Not uninstalling requests at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed requests
Cleaning up...
root@raspberrypi:/home/pi#
Re: Gigaset Elements Cli - domoticz support
Posted: Monday 09 May 2016 18:28
by micbou
I think we're close
Code: Select all
root@raspberrypi:/home/pi# sudo apt-get --purge remove python-requests
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
python-chardet python-colorama python-distlib python-html5lib
python-ndg-httpsclient python-openssl python-pyasn1 python-six
python-urllib3 python-wheel
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
python-pip* python-requests*
0 upgraded, 0 newly installed, 2 to remove and 55 not upgraded.
After this operation, 977 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 58048 files and directories currently installed.)
Removing python-pip (1.5.6-5) ...
Removing python-requests (2.4.3-6) ...
Processing triggers for man-db (2.7.0.2-5) ...
Code: Select all
root@raspberrypi:/home/pi# sudo pip install --upgrade --force-reinstall requests
sudo: pip: command not found
Re: Gigaset Elements Cli - domoticz support
Posted: Monday 09 May 2016 18:34
by dynasticorpheus
Yes almost there I think ... let's cleanup, reinstall pip and finally do a complete reinstall of gigasetelements-cli:
Code: Select all
sudo apt-get -y install python-pip
Code: Select all
sudo pip install --upgrade --force-reinstall https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
micbou wrote:I think we're close
Code: Select all
root@raspberrypi:/home/pi# sudo apt-get --purge remove python-requests
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
python-chardet python-colorama python-distlib python-html5lib
python-ndg-httpsclient python-openssl python-pyasn1 python-six
python-urllib3 python-wheel
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
python-pip* python-requests*
0 upgraded, 0 newly installed, 2 to remove and 55 not upgraded.
After this operation, 977 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 58048 files and directories currently installed.)
Removing python-pip (1.5.6-5) ...
Removing python-requests (2.4.3-6) ...
Processing triggers for man-db (2.7.0.2-5) ...
Code: Select all
root@raspberrypi:/home/pi# sudo pip install --upgrade --force-reinstall requests
sudo: pip: command not found
Re: Gigaset Elements Cli - domoticz support
Posted: Monday 09 May 2016 18:47
by micbou
Code: Select all
root@raspberrypi:/home/pi# sudo apt-get -y autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
python-chardet python-colorama python-distlib python-html5lib
python-ndg-httpsclient python-openssl python-pyasn1 python-six
python-urllib3 python-wheel
0 upgraded, 0 newly installed, 10 to remove and 55 not upgraded.
After this operation, 3,107 kB disk space will be freed.
(Reading database ... 57942 files and directories currently installed.)
Removing python-chardet (2.3.0-1) ...
Removing python-colorama (0.3.2-1) ...
Removing python-distlib (0.1.9-1) ...
Removing python-html5lib (0.999-3) ...
Removing python-ndg-httpsclient (0.3.2-1) ...
Removing python-openssl (0.13.1-2) ...
Removing python-pyasn1 (0.1.7-1) ...
Removing python-urllib3 (1.9.1-3) ...
Removing python-six (1.8.0-1) ...
Removing python-wheel (0.24.0-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for python-support (1.0.15) ...
Code: Select all
root@raspberrypi:/home/pi# sudo apt-get -y install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
python-chardet python-colorama python-distlib python-html5lib
python-ndg-httpsclient python-openssl python-pyasn1 python-requests
python-six python-urllib3 python-wheel
Suggested packages:
python-genshi python-lxml python-openssl-doc python-openssl-dbg doc-base
Recommended packages:
python-dev-all
The following NEW packages will be installed:
python-chardet python-colorama python-distlib python-html5lib
python-ndg-httpsclient python-openssl python-pip python-pyasn1
python-requests python-six python-urllib3 python-wheel
0 upgraded, 12 newly installed, 0 to remove and 55 not upgraded.
Need to get 0 B/903 kB of archives.
After this operation, 4,084 kB of additional disk space will be used.
Selecting previously unselected package python-chardet.
(Reading database ... 57513 files and directories currently installed.)
Preparing to unpack .../python-chardet_2.3.0-1_all.deb ...
Unpacking python-chardet (2.3.0-1) ...
Selecting previously unselected package python-colorama.
Preparing to unpack .../python-colorama_0.3.2-1_all.deb ...
Unpacking python-colorama (0.3.2-1) ...
Selecting previously unselected package python-distlib.
Preparing to unpack .../python-distlib_0.1.9-1_all.deb ...
Unpacking python-distlib (0.1.9-1) ...
Selecting previously unselected package python-six.
Preparing to unpack .../python-six_1.8.0-1_all.deb ...
Unpacking python-six (1.8.0-1) ...
Selecting previously unselected package python-html5lib.
Preparing to unpack .../python-html5lib_0.999-3_all.deb ...
Unpacking python-html5lib (0.999-3) ...
Selecting previously unselected package python-openssl.
Preparing to unpack .../python-openssl_0.13.1-2_armhf.deb ...
Unpacking python-openssl (0.13.1-2) ...
Selecting previously unselected package python-ndg-httpsclient.
Preparing to unpack .../python-ndg-httpsclient_0.3.2-1_all.deb ...
Unpacking python-ndg-httpsclient (0.3.2-1) ...
Selecting previously unselected package python-urllib3.
Preparing to unpack .../python-urllib3_1.9.1-3_all.deb ...
Unpacking python-urllib3 (1.9.1-3) ...
Selecting previously unselected package python-requests.
Preparing to unpack .../python-requests_2.4.3-6_all.deb ...
Unpacking python-requests (2.4.3-6) ...
Selecting previously unselected package python-pip.
Preparing to unpack .../python-pip_1.5.6-5_all.deb ...
Unpacking python-pip (1.5.6-5) ...
Selecting previously unselected package python-pyasn1.
Preparing to unpack .../python-pyasn1_0.1.7-1_all.deb ...
Unpacking python-pyasn1 (0.1.7-1) ...
Selecting previously unselected package python-wheel.
Preparing to unpack .../python-wheel_0.24.0-1_all.deb ...
Unpacking python-wheel (0.24.0-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up python-chardet (2.3.0-1) ...
Setting up python-colorama (0.3.2-1) ...
Setting up python-distlib (0.1.9-1) ...
Setting up python-six (1.8.0-1) ...
Setting up python-html5lib (0.999-3) ...
Setting up python-openssl (0.13.1-2) ...
Setting up python-ndg-httpsclient (0.3.2-1) ...
Setting up python-urllib3 (1.9.1-3) ...
Setting up python-requests (2.4.3-6) ...
Setting up python-pip (1.5.6-5) ...
Setting up python-pyasn1 (0.1.7-1) ...
Setting up python-wheel (0.24.0-1) ...
Processing triggers for python-support (1.0.15) ...
root@raspberrypi:/home/pi# sudo pip install --upgrade --force-reinstall https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
Downloading/unpacking https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
Downloading develop
Running setup.py (path:/tmp/pip-chQV0L-build/setup.py) egg_info for package from https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
Downloading/unpacking requests (from gigasetelements-cli==1.5.0b1)
Downloading requests-2.10.0-py2.py3-none-any.whl (506kB): 506kB downloaded
Downloading/unpacking pushbullet.py (from gigasetelements-cli==1.5.0b1)
Downloading pushbullet.py-0.10.0-py2.py3-none-any.whl
Downloading/unpacking unidecode (from gigasetelements-cli==1.5.0b1)
Downloading Unidecode-0.04.19.tar.gz (204kB): 204kB downloaded
Running setup.py (path:/tmp/pip-build-3y2lJ0/unidecode/setup.py) egg_info for package unidecode
Downloading/unpacking colorama (from gigasetelements-cli==1.5.0b1)
Downloading colorama-0.3.7-py2.py3-none-any.whl
Downloading/unpacking python-crontab (from gigasetelements-cli==1.5.0b1)
Downloading python-crontab-2.0.1.tar.gz
Running setup.py (path:/tmp/pip-build-3y2lJ0/python-crontab/setup.py) egg_info for package python-crontab
Downloading/unpacking daemonize (from gigasetelements-cli==1.5.0b1)
Downloading daemonize-2.4.6-py2.py3-none-any.whl
Downloading/unpacking websocket-client (from pushbullet.py->gigasetelements-cli==1.5.0b1)
Downloading websocket_client-0.37.0.tar.gz (194kB): 194kB downloaded
Running setup.py (path:/tmp/pip-build-3y2lJ0/websocket-client/setup.py) egg_info for package websocket-client
Downloading/unpacking python-magic (from pushbullet.py->gigasetelements-cli==1.5.0b1)
Downloading python-magic-0.4.11.tar.gz
Running setup.py (path:/tmp/pip-build-3y2lJ0/python-magic/setup.py) egg_info for package python-magic
Downloading/unpacking python-dateutil (from python-crontab->gigasetelements-cli==1.5.0b1)
Downloading python_dateutil-2.5.3-py2.py3-none-any.whl (201kB): 201kB downloaded
Downloading/unpacking six (from websocket-client->pushbullet.py->gigasetelements-cli==1.5.0b1)
Downloading six-1.10.0-py2.py3-none-any.whl
Installing collected packages: requests, pushbullet.py, unidecode, colorama, python-crontab, daemonize, gigasetelements-cli, websocket-client, python-magic, python-dateutil, six
Found existing installation: requests 2.4.3
Not uninstalling requests at /usr/lib/python2.7/dist-packages, owned by OS
Found existing installation: pushbullet.py 0.10.0
Uninstalling pushbullet.py:
Successfully uninstalled pushbullet.py
Found existing installation: Unidecode 0.04.19
Uninstalling Unidecode:
Successfully uninstalled Unidecode
Running setup.py install for unidecode
Installing unidecode script to /usr/local/bin
Found existing installation: colorama 0.3.2
Not uninstalling colorama at /usr/lib/python2.7/dist-packages, owned by OS
Found existing installation: python-crontab 2.0.1
Uninstalling python-crontab:
Successfully uninstalled python-crontab
Running setup.py install for python-crontab
Found existing installation: daemonize 2.4.6
Uninstalling daemonize:
Successfully uninstalled daemonize
Found existing installation: gigasetelements-cli 1.5.0b1
Uninstalling gigasetelements-cli:
Successfully uninstalled gigasetelements-cli
Running setup.py install for gigasetelements-cli
Installing gigasetelements-cli script to /usr/local/bin
Found existing installation: websocket-client 0.37.0
Uninstalling websocket-client:
Successfully uninstalled websocket-client
Running setup.py install for websocket-client
changing mode of build/scripts-2.7/wsdump.py from 644 to 755
changing mode of /usr/local/bin/wsdump.py to 755
Found existing installation: python-magic 0.4.11
Uninstalling python-magic:
Successfully uninstalled python-magic
Running setup.py install for python-magic
Found existing installation: python-dateutil 2.5.3
Uninstalling python-dateutil:
Successfully uninstalled python-dateutil
Found existing installation: six 1.8.0
Not uninstalling six at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed requests pushbullet.py unidecode colorama python-crontab daemonize gigasetelements-cli websocket-client python-magic python-dateutil six
Cleaning up...
Code: Select all
root@raspberrypi:/home/pi# gigasetelements-cli -ss
Gigaset Elements - Command-line Interface v1.5.0b1
[-] Configuration | LOADED | /etc/gigasetelements-cli.conf
Traceback (most recent call last):
File "/usr/local/bin/gigasetelements-cli", line 9, in <module>
load_entry_point('gigasetelements-cli==1.5.0b1', 'console_scripts', 'gigasetelements-cli')()
File "/usr/local/lib/python2.7/dist-packages/gigasetelements/gigasetelements.py", line 761, in main
base()
File "/usr/local/lib/python2.7/dist-packages/gigasetelements/gigasetelements.py", line 693, in base
auth_time = authenticate()
File "/usr/local/lib/python2.7/dist-packages/gigasetelements/gigasetelements.py", line 267, in authenticate
commit_data = rest(POST, URL_IDENTITY, payload)
File "/usr/local/lib/python2.7/dist-packages/gigasetelements/gigasetelements.py", line 250, in rest
log('ERROR'.ljust(17) + ' | ' + 'UNKNOWN'.ljust(8) + ' | ' + str(error.message), 3, end)
TypeError: __str__ returned non-string (type Error)
root@raspberrypi:/home/pi#
Request is also still requests==2.4.3
Re: Gigaset Elements Cli - domoticz support
Posted: Monday 09 May 2016 19:03
by dynasticorpheus
This thing is making me look stupid but never give up as they say
No idea why python-pip and python-requests are linked but let's install pip from source so we avoid the automatic re-install of the outdated requests version:
Code: Select all
sudo apt-get -y --purge remove python-pip python-requests
Code: Select all
curl -O https://bootstrap.pypa.io/get-pip.py
Code: Select all
sudo pip install --upgrade --force-reinstall https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
micbou wrote:
Code: Select all
root@raspberrypi:/home/pi# sudo apt-get -y autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
python-chardet python-colorama python-distlib python-html5lib
python-ndg-httpsclient python-openssl python-pyasn1 python-six
python-urllib3 python-wheel
0 upgraded, 0 newly installed, 10 to remove and 55 not upgraded.
After this operation, 3,107 kB disk space will be freed.
(Reading database ... 57942 files and directories currently installed.)
Removing python-chardet (2.3.0-1) ...
Removing python-colorama (0.3.2-1) ...
Removing python-distlib (0.1.9-1) ...
Removing python-html5lib (0.999-3) ...
Removing python-ndg-httpsclient (0.3.2-1) ...
Removing python-openssl (0.13.1-2) ...
Removing python-pyasn1 (0.1.7-1) ...
Removing python-urllib3 (1.9.1-3) ...
Removing python-six (1.8.0-1) ...
Removing python-wheel (0.24.0-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for python-support (1.0.15) ...
Code: Select all
root@raspberrypi:/home/pi# sudo apt-get -y install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
python-chardet python-colorama python-distlib python-html5lib
python-ndg-httpsclient python-openssl python-pyasn1 python-requests
python-six python-urllib3 python-wheel
Suggested packages:
python-genshi python-lxml python-openssl-doc python-openssl-dbg doc-base
Recommended packages:
python-dev-all
The following NEW packages will be installed:
python-chardet python-colorama python-distlib python-html5lib
python-ndg-httpsclient python-openssl python-pip python-pyasn1
python-requests python-six python-urllib3 python-wheel
0 upgraded, 12 newly installed, 0 to remove and 55 not upgraded.
Need to get 0 B/903 kB of archives.
After this operation, 4,084 kB of additional disk space will be used.
Selecting previously unselected package python-chardet.
(Reading database ... 57513 files and directories currently installed.)
Preparing to unpack .../python-chardet_2.3.0-1_all.deb ...
Unpacking python-chardet (2.3.0-1) ...
Selecting previously unselected package python-colorama.
Preparing to unpack .../python-colorama_0.3.2-1_all.deb ...
Unpacking python-colorama (0.3.2-1) ...
Selecting previously unselected package python-distlib.
Preparing to unpack .../python-distlib_0.1.9-1_all.deb ...
Unpacking python-distlib (0.1.9-1) ...
Selecting previously unselected package python-six.
Preparing to unpack .../python-six_1.8.0-1_all.deb ...
Unpacking python-six (1.8.0-1) ...
Selecting previously unselected package python-html5lib.
Preparing to unpack .../python-html5lib_0.999-3_all.deb ...
Unpacking python-html5lib (0.999-3) ...
Selecting previously unselected package python-openssl.
Preparing to unpack .../python-openssl_0.13.1-2_armhf.deb ...
Unpacking python-openssl (0.13.1-2) ...
Selecting previously unselected package python-ndg-httpsclient.
Preparing to unpack .../python-ndg-httpsclient_0.3.2-1_all.deb ...
Unpacking python-ndg-httpsclient (0.3.2-1) ...
Selecting previously unselected package python-urllib3.
Preparing to unpack .../python-urllib3_1.9.1-3_all.deb ...
Unpacking python-urllib3 (1.9.1-3) ...
Selecting previously unselected package python-requests.
Preparing to unpack .../python-requests_2.4.3-6_all.deb ...
Unpacking python-requests (2.4.3-6) ...
Selecting previously unselected package python-pip.
Preparing to unpack .../python-pip_1.5.6-5_all.deb ...
Unpacking python-pip (1.5.6-5) ...
Selecting previously unselected package python-pyasn1.
Preparing to unpack .../python-pyasn1_0.1.7-1_all.deb ...
Unpacking python-pyasn1 (0.1.7-1) ...
Selecting previously unselected package python-wheel.
Preparing to unpack .../python-wheel_0.24.0-1_all.deb ...
Unpacking python-wheel (0.24.0-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up python-chardet (2.3.0-1) ...
Setting up python-colorama (0.3.2-1) ...
Setting up python-distlib (0.1.9-1) ...
Setting up python-six (1.8.0-1) ...
Setting up python-html5lib (0.999-3) ...
Setting up python-openssl (0.13.1-2) ...
Setting up python-ndg-httpsclient (0.3.2-1) ...
Setting up python-urllib3 (1.9.1-3) ...
Setting up python-requests (2.4.3-6) ...
Setting up python-pip (1.5.6-5) ...
Setting up python-pyasn1 (0.1.7-1) ...
Setting up python-wheel (0.24.0-1) ...
Processing triggers for python-support (1.0.15) ...
root@raspberrypi:/home/pi# sudo pip install --upgrade --force-reinstall https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
Downloading/unpacking https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
Downloading develop
Running setup.py (path:/tmp/pip-chQV0L-build/setup.py) egg_info for package from https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
Downloading/unpacking requests (from gigasetelements-cli==1.5.0b1)
Downloading requests-2.10.0-py2.py3-none-any.whl (506kB): 506kB downloaded
Downloading/unpacking pushbullet.py (from gigasetelements-cli==1.5.0b1)
Downloading pushbullet.py-0.10.0-py2.py3-none-any.whl
Downloading/unpacking unidecode (from gigasetelements-cli==1.5.0b1)
Downloading Unidecode-0.04.19.tar.gz (204kB): 204kB downloaded
Running setup.py (path:/tmp/pip-build-3y2lJ0/unidecode/setup.py) egg_info for package unidecode
Downloading/unpacking colorama (from gigasetelements-cli==1.5.0b1)
Downloading colorama-0.3.7-py2.py3-none-any.whl
Downloading/unpacking python-crontab (from gigasetelements-cli==1.5.0b1)
Downloading python-crontab-2.0.1.tar.gz
Running setup.py (path:/tmp/pip-build-3y2lJ0/python-crontab/setup.py) egg_info for package python-crontab
Downloading/unpacking daemonize (from gigasetelements-cli==1.5.0b1)
Downloading daemonize-2.4.6-py2.py3-none-any.whl
Downloading/unpacking websocket-client (from pushbullet.py->gigasetelements-cli==1.5.0b1)
Downloading websocket_client-0.37.0.tar.gz (194kB): 194kB downloaded
Running setup.py (path:/tmp/pip-build-3y2lJ0/websocket-client/setup.py) egg_info for package websocket-client
Downloading/unpacking python-magic (from pushbullet.py->gigasetelements-cli==1.5.0b1)
Downloading python-magic-0.4.11.tar.gz
Running setup.py (path:/tmp/pip-build-3y2lJ0/python-magic/setup.py) egg_info for package python-magic
Downloading/unpacking python-dateutil (from python-crontab->gigasetelements-cli==1.5.0b1)
Downloading python_dateutil-2.5.3-py2.py3-none-any.whl (201kB): 201kB downloaded
Downloading/unpacking six (from websocket-client->pushbullet.py->gigasetelements-cli==1.5.0b1)
Downloading six-1.10.0-py2.py3-none-any.whl
Installing collected packages: requests, pushbullet.py, unidecode, colorama, python-crontab, daemonize, gigasetelements-cli, websocket-client, python-magic, python-dateutil, six
Found existing installation: requests 2.4.3
Not uninstalling requests at /usr/lib/python2.7/dist-packages, owned by OS
Found existing installation: pushbullet.py 0.10.0
Uninstalling pushbullet.py:
Successfully uninstalled pushbullet.py
Found existing installation: Unidecode 0.04.19
Uninstalling Unidecode:
Successfully uninstalled Unidecode
Running setup.py install for unidecode
Installing unidecode script to /usr/local/bin
Found existing installation: colorama 0.3.2
Not uninstalling colorama at /usr/lib/python2.7/dist-packages, owned by OS
Found existing installation: python-crontab 2.0.1
Uninstalling python-crontab:
Successfully uninstalled python-crontab
Running setup.py install for python-crontab
Found existing installation: daemonize 2.4.6
Uninstalling daemonize:
Successfully uninstalled daemonize
Found existing installation: gigasetelements-cli 1.5.0b1
Uninstalling gigasetelements-cli:
Successfully uninstalled gigasetelements-cli
Running setup.py install for gigasetelements-cli
Installing gigasetelements-cli script to /usr/local/bin
Found existing installation: websocket-client 0.37.0
Uninstalling websocket-client:
Successfully uninstalled websocket-client
Running setup.py install for websocket-client
changing mode of build/scripts-2.7/wsdump.py from 644 to 755
changing mode of /usr/local/bin/wsdump.py to 755
Found existing installation: python-magic 0.4.11
Uninstalling python-magic:
Successfully uninstalled python-magic
Running setup.py install for python-magic
Found existing installation: python-dateutil 2.5.3
Uninstalling python-dateutil:
Successfully uninstalled python-dateutil
Found existing installation: six 1.8.0
Not uninstalling six at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed requests pushbullet.py unidecode colorama python-crontab daemonize gigasetelements-cli websocket-client python-magic python-dateutil six
Cleaning up...
Code: Select all
root@raspberrypi:/home/pi# gigasetelements-cli -ss
Gigaset Elements - Command-line Interface v1.5.0b1
[-] Configuration | LOADED | /etc/gigasetelements-cli.conf
Traceback (most recent call last):
File "/usr/local/bin/gigasetelements-cli", line 9, in <module>
load_entry_point('gigasetelements-cli==1.5.0b1', 'console_scripts', 'gigasetelements-cli')()
File "/usr/local/lib/python2.7/dist-packages/gigasetelements/gigasetelements.py", line 761, in main
base()
File "/usr/local/lib/python2.7/dist-packages/gigasetelements/gigasetelements.py", line 693, in base
auth_time = authenticate()
File "/usr/local/lib/python2.7/dist-packages/gigasetelements/gigasetelements.py", line 267, in authenticate
commit_data = rest(POST, URL_IDENTITY, payload)
File "/usr/local/lib/python2.7/dist-packages/gigasetelements/gigasetelements.py", line 250, in rest
log('ERROR'.ljust(17) + ' | ' + 'UNKNOWN'.ljust(8) + ' | ' + str(error.message), 3, end)
TypeError: __str__ returned non-string (type Error)
root@raspberrypi:/home/pi#
Request is also still requests==2.4.3
Re: Gigaset Elements Cli - domoticz support
Posted: Monday 09 May 2016 19:14
by micbou
BEER! (right?)
would you mind explaning what we did here? (and why pip freeze doesnt work anymore now)
(and trust me, I look way more stupid

)
Now lets see if I can get the utility and switches working
Code: Select all
root@raspberrypi:/home/pi# sudo apt-get -y --purge remove python-pip python-requests
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
python-chardet python-colorama python-distlib python-html5lib
python-ndg-httpsclient python-openssl python-pyasn1 python-six
python-urllib3 python-wheel
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
python-pip* python-requests*
0 upgraded, 0 newly installed, 2 to remove and 55 not upgraded.
After this operation, 977 kB disk space will be freed.
(Reading database ... 58048 files and directories currently installed.)
Removing python-pip (1.5.6-5) ...
Removing python-requests (2.4.3-6) ...
Processing triggers for man-db (2.7.0.2-5) ...
Code: Select all
root@raspberrypi:/home/pi# sudo apt-get -y autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
python-chardet python-colorama python-distlib python-html5lib
python-ndg-httpsclient python-openssl python-pyasn1 python-six
python-urllib3 python-wheel
0 upgraded, 0 newly installed, 10 to remove and 55 not upgraded.
After this operation, 3,107 kB disk space will be freed.
(Reading database ... 57942 files and directories currently installed.)
Removing python-chardet (2.3.0-1) ...
Removing python-colorama (0.3.2-1) ...
Removing python-distlib (0.1.9-1) ...
Removing python-html5lib (0.999-3) ...
Removing python-ndg-httpsclient (0.3.2-1) ...
Removing python-openssl (0.13.1-2) ...
Removing python-pyasn1 (0.1.7-1) ...
Removing python-urllib3 (1.9.1-3) ...
Removing python-six (1.8.0-1) ...
Removing python-wheel (0.24.0-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for python-support (1.0.15) ...
root@raspberrypi:/home/pi# curl -O https://bootstrap.pypa.io/get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1487k 100 1487k 0 0 4442k 0 --:--:-- --:--:-- --:--:-- 4452k
root@raspberrypi:/home/pi# sudo python get-pip.py
Collecting pip
Downloading pip-8.1.1-py2.py3-none-any.whl (1.2MB)
100% |████████████████████████████████| 1.2MB 203kB/s
Collecting wheel
Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
100% |████████████████████████████████| 71kB 1.2MB/s
Installing collected packages: pip, wheel
Successfully installed pip-8.1.1 wheel-0.29.0
Code: Select all
root@raspberrypi:/home/pi# sudo pip install --upgrade --force-reinstall https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
Collecting https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
Downloading https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
| 30kB 214kB/s
Collecting requests (from gigasetelements-cli==1.5.0b1)
Downloading requests-2.10.0-py2.py3-none-any.whl (506kB)
100% |████████████████████████████████| 512kB 454kB/s
Collecting pushbullet.py (from gigasetelements-cli==1.5.0b1)
Downloading pushbullet.py-0.10.0-py2.py3-none-any.whl
Collecting unidecode (from gigasetelements-cli==1.5.0b1)
Downloading Unidecode-0.04.19.tar.gz (204kB)
100% |████████████████████████████████| 204kB 304kB/s
Collecting colorama (from gigasetelements-cli==1.5.0b1)
Downloading colorama-0.3.7-py2.py3-none-any.whl
Collecting python-crontab (from gigasetelements-cli==1.5.0b1)
Downloading python-crontab-2.0.1.tar.gz
Collecting daemonize (from gigasetelements-cli==1.5.0b1)
Downloading daemonize-2.4.6-py2.py3-none-any.whl
Collecting python-magic (from pushbullet.py->gigasetelements-cli==1.5.0b1)
Downloading python-magic-0.4.11.tar.gz
Collecting websocket-client (from pushbullet.py->gigasetelements-cli==1.5.0b1)
Downloading websocket_client-0.37.0.tar.gz (194kB)
100% |████████████████████████████████| 194kB 631kB/s
Collecting python-dateutil (from python-crontab->gigasetelements-cli==1.5.0b1)
Downloading python_dateutil-2.5.3-py2.py3-none-any.whl (201kB)
100% |████████████████████████████████| 204kB 737kB/s
Collecting six (from websocket-client->pushbullet.py->gigasetelements-cli==1.5.0b1)
Downloading six-1.10.0-py2.py3-none-any.whl
Building wheels for collected packages: unidecode, python-crontab, python-magic, websocket-client
Running setup.py bdist_wheel for unidecode ... done
Stored in directory: /root/.cache/pip/wheels/72/da/8f/64e7de75111e143339d331011b56b3a8186e2eb07b0b5e383b
Running setup.py bdist_wheel for python-crontab ... done
Stored in directory: /root/.cache/pip/wheels/64/8d/fb/bb281503710d9de2d193a378c7e9b5d0cdb8367aec3587f1ed
Running setup.py bdist_wheel for python-magic ... done
Stored in directory: /root/.cache/pip/wheels/65/ab/71/40c6c38a050ce64fcbda7e3e8ee3096d5a6302ad4dab28ba8c
Running setup.py bdist_wheel for websocket-client ... done
Stored in directory: /root/.cache/pip/wheels/e4/20/12/48d6732b88733a0a8f98ee1a5b2f59b64b27011d5c34c4f98c
Successfully built unidecode python-crontab python-magic websocket-client
Installing collected packages: requests, python-magic, six, websocket-client, pushbullet.py, unidecode, colorama, python-dateutil, python-crontab, daemonize, gigasetelements-cli
Found existing installation: requests 2.10.0
Uninstalling requests-2.10.0:
Successfully uninstalled requests-2.10.0
Found existing installation: python-magic 0.4.11
Uninstalling python-magic-0.4.11:
Successfully uninstalled python-magic-0.4.11
Found existing installation: six 1.10.0
Uninstalling six-1.10.0:
Successfully uninstalled six-1.10.0
Found existing installation: websocket-client 0.37.0
Uninstalling websocket-client-0.37.0:
Successfully uninstalled websocket-client-0.37.0
Found existing installation: pushbullet.py 0.10.0
Uninstalling pushbullet.py-0.10.0:
Successfully uninstalled pushbullet.py-0.10.0
Found existing installation: Unidecode 0.4.19
Uninstalling Unidecode-0.4.19:
Successfully uninstalled Unidecode-0.4.19
Found existing installation: colorama 0.3.7
Uninstalling colorama-0.3.7:
Successfully uninstalled colorama-0.3.7
Found existing installation: python-dateutil 2.5.3
Uninstalling python-dateutil-2.5.3:
Successfully uninstalled python-dateutil-2.5.3
Found existing installation: python-crontab 2.0.1
Uninstalling python-crontab-2.0.1:
Successfully uninstalled python-crontab-2.0.1
Found existing installation: daemonize 2.4.6
Uninstalling daemonize-2.4.6:
Successfully uninstalled daemonize-2.4.6
Found existing installation: gigasetelements-cli 1.5.0b1
Uninstalling gigasetelements-cli-1.5.0b1:
Successfully uninstalled gigasetelements-cli-1.5.0b1
Running setup.py install for gigasetelements-cli ... done
Successfully installed colorama-0.3.7 daemonize-2.4.6 gigasetelements-cli-1.5.0b1 pushbullet.py-0.10.0 python-crontab-2.0.1 python-dateutil-2.5.3 python-magic-0.4.11 requests-2.10.0 six-1.10.0 unidecode-0.4.19 websocket-client-0.37.0
Code: Select all
root@raspberrypi:/home/pi# pip freeze
bash: /usr/bin/pip: No such file or directory
Code: Select all
root@raspberrypi:/home/pi# 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 | RED | ENDNODE_OFFLINE | Modus set from HOME to HOME
[-] Michel's Thuis | ONLINE | firmware UP_TO_DATE
[-] Achterdeur | OFFLINE | firmware UP_TO_DATE | battery OK | position UNKNOWN | 027C06E864
[-] woonkamer | ONLINE | firmware UP_TO_DATE | battery OK | 027C06E866
root@raspberrypi:/home/pi#
Re: Gigaset Elements Cli - domoticz support
Posted: Monday 09 May 2016 19:44
by dynasticorpheus
Going forward just put
sudo in front of your pip commands:
apt-get and pip are similar tools however pip is limited to installing
python packages only but has the advantage it will always install the latest version of a certain module. If you use apt-get you will get the version that is shipped with your current OS release. As you can see that almost always means you get an outdated version.
What we did was:
remove pip and requests installed via apt-get
Code: Select all
sudo apt-get -y --purge remove python-pip python-requests
cleanup by uninstalling other modules which were installed to make the above two work (but are now no longer needed)
Install pip from source so we avoid the auto install of python-requests 2.4.3 when installing python-pip
Code: Select all
curl -O https://bootstrap.pypa.io/get-pip.py
Do a complete reinstall of gigasetelements-cli so we are 100% sure all dependencies are installed.
Code: Select all
sudo pip install --upgrade --force-reinstall https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
Please read the my opening post of this thread as I have updated my instruction and made hopefully more clear, needless to say you can skip step 6 which shows how to install the gigasetelements-cli
Don't forget step 5 !!!
micbou wrote:BEER! (right?)
would you mind explaning what we did here? (and why pip freeze doesnt work anymore now)
(and trust me, I look way more stupid

)
Now lets see if I can get the utility and switches working
Code: Select all
root@raspberrypi:/home/pi# sudo apt-get -y --purge remove python-pip python-requests
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
python-chardet python-colorama python-distlib python-html5lib
python-ndg-httpsclient python-openssl python-pyasn1 python-six
python-urllib3 python-wheel
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
python-pip* python-requests*
0 upgraded, 0 newly installed, 2 to remove and 55 not upgraded.
After this operation, 977 kB disk space will be freed.
(Reading database ... 58048 files and directories currently installed.)
Removing python-pip (1.5.6-5) ...
Removing python-requests (2.4.3-6) ...
Processing triggers for man-db (2.7.0.2-5) ...
Code: Select all
root@raspberrypi:/home/pi# sudo apt-get -y autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
python-chardet python-colorama python-distlib python-html5lib
python-ndg-httpsclient python-openssl python-pyasn1 python-six
python-urllib3 python-wheel
0 upgraded, 0 newly installed, 10 to remove and 55 not upgraded.
After this operation, 3,107 kB disk space will be freed.
(Reading database ... 57942 files and directories currently installed.)
Removing python-chardet (2.3.0-1) ...
Removing python-colorama (0.3.2-1) ...
Removing python-distlib (0.1.9-1) ...
Removing python-html5lib (0.999-3) ...
Removing python-ndg-httpsclient (0.3.2-1) ...
Removing python-openssl (0.13.1-2) ...
Removing python-pyasn1 (0.1.7-1) ...
Removing python-urllib3 (1.9.1-3) ...
Removing python-six (1.8.0-1) ...
Removing python-wheel (0.24.0-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for python-support (1.0.15) ...
root@raspberrypi:/home/pi# curl -O https://bootstrap.pypa.io/get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1487k 100 1487k 0 0 4442k 0 --:--:-- --:--:-- --:--:-- 4452k
root@raspberrypi:/home/pi# sudo python get-pip.py
Collecting pip
Downloading pip-8.1.1-py2.py3-none-any.whl (1.2MB)
100% |████████████████████████████████| 1.2MB 203kB/s
Collecting wheel
Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
100% |████████████████████████████████| 71kB 1.2MB/s
Installing collected packages: pip, wheel
Successfully installed pip-8.1.1 wheel-0.29.0
Code: Select all
root@raspberrypi:/home/pi# sudo pip install --upgrade --force-reinstall https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
Collecting https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
Downloading https://github.com/dynasticorpheus/gigasetelements-cli/zipball/develop
| 30kB 214kB/s
Collecting requests (from gigasetelements-cli==1.5.0b1)
Downloading requests-2.10.0-py2.py3-none-any.whl (506kB)
100% |████████████████████████████████| 512kB 454kB/s
Collecting pushbullet.py (from gigasetelements-cli==1.5.0b1)
Downloading pushbullet.py-0.10.0-py2.py3-none-any.whl
Collecting unidecode (from gigasetelements-cli==1.5.0b1)
Downloading Unidecode-0.04.19.tar.gz (204kB)
100% |████████████████████████████████| 204kB 304kB/s
Collecting colorama (from gigasetelements-cli==1.5.0b1)
Downloading colorama-0.3.7-py2.py3-none-any.whl
Collecting python-crontab (from gigasetelements-cli==1.5.0b1)
Downloading python-crontab-2.0.1.tar.gz
Collecting daemonize (from gigasetelements-cli==1.5.0b1)
Downloading daemonize-2.4.6-py2.py3-none-any.whl
Collecting python-magic (from pushbullet.py->gigasetelements-cli==1.5.0b1)
Downloading python-magic-0.4.11.tar.gz
Collecting websocket-client (from pushbullet.py->gigasetelements-cli==1.5.0b1)
Downloading websocket_client-0.37.0.tar.gz (194kB)
100% |████████████████████████████████| 194kB 631kB/s
Collecting python-dateutil (from python-crontab->gigasetelements-cli==1.5.0b1)
Downloading python_dateutil-2.5.3-py2.py3-none-any.whl (201kB)
100% |████████████████████████████████| 204kB 737kB/s
Collecting six (from websocket-client->pushbullet.py->gigasetelements-cli==1.5.0b1)
Downloading six-1.10.0-py2.py3-none-any.whl
Building wheels for collected packages: unidecode, python-crontab, python-magic, websocket-client
Running setup.py bdist_wheel for unidecode ... done
Stored in directory: /root/.cache/pip/wheels/72/da/8f/64e7de75111e143339d331011b56b3a8186e2eb07b0b5e383b
Running setup.py bdist_wheel for python-crontab ... done
Stored in directory: /root/.cache/pip/wheels/64/8d/fb/bb281503710d9de2d193a378c7e9b5d0cdb8367aec3587f1ed
Running setup.py bdist_wheel for python-magic ... done
Stored in directory: /root/.cache/pip/wheels/65/ab/71/40c6c38a050ce64fcbda7e3e8ee3096d5a6302ad4dab28ba8c
Running setup.py bdist_wheel for websocket-client ... done
Stored in directory: /root/.cache/pip/wheels/e4/20/12/48d6732b88733a0a8f98ee1a5b2f59b64b27011d5c34c4f98c
Successfully built unidecode python-crontab python-magic websocket-client
Installing collected packages: requests, python-magic, six, websocket-client, pushbullet.py, unidecode, colorama, python-dateutil, python-crontab, daemonize, gigasetelements-cli
Found existing installation: requests 2.10.0
Uninstalling requests-2.10.0:
Successfully uninstalled requests-2.10.0
Found existing installation: python-magic 0.4.11
Uninstalling python-magic-0.4.11:
Successfully uninstalled python-magic-0.4.11
Found existing installation: six 1.10.0
Uninstalling six-1.10.0:
Successfully uninstalled six-1.10.0
Found existing installation: websocket-client 0.37.0
Uninstalling websocket-client-0.37.0:
Successfully uninstalled websocket-client-0.37.0
Found existing installation: pushbullet.py 0.10.0
Uninstalling pushbullet.py-0.10.0:
Successfully uninstalled pushbullet.py-0.10.0
Found existing installation: Unidecode 0.4.19
Uninstalling Unidecode-0.4.19:
Successfully uninstalled Unidecode-0.4.19
Found existing installation: colorama 0.3.7
Uninstalling colorama-0.3.7:
Successfully uninstalled colorama-0.3.7
Found existing installation: python-dateutil 2.5.3
Uninstalling python-dateutil-2.5.3:
Successfully uninstalled python-dateutil-2.5.3
Found existing installation: python-crontab 2.0.1
Uninstalling python-crontab-2.0.1:
Successfully uninstalled python-crontab-2.0.1
Found existing installation: daemonize 2.4.6
Uninstalling daemonize-2.4.6:
Successfully uninstalled daemonize-2.4.6
Found existing installation: gigasetelements-cli 1.5.0b1
Uninstalling gigasetelements-cli-1.5.0b1:
Successfully uninstalled gigasetelements-cli-1.5.0b1
Running setup.py install for gigasetelements-cli ... done
Successfully installed colorama-0.3.7 daemonize-2.4.6 gigasetelements-cli-1.5.0b1 pushbullet.py-0.10.0 python-crontab-2.0.1 python-dateutil-2.5.3 python-magic-0.4.11 requests-2.10.0 six-1.10.0 unidecode-0.4.19 websocket-client-0.37.0
Code: Select all
root@raspberrypi:/home/pi# pip freeze
bash: /usr/bin/pip: No such file or directory
Code: Select all
root@raspberrypi:/home/pi# 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 | RED | ENDNODE_OFFLINE | Modus set from HOME to HOME
[-] Michel's Thuis | ONLINE | firmware UP_TO_DATE
[-] Achterdeur | OFFLINE | firmware UP_TO_DATE | battery OK | position UNKNOWN | 027C06E864
[-] woonkamer | ONLINE | firmware UP_TO_DATE | battery OK | 027C06E866
root@raspberrypi:/home/pi#