-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install Help #22
Comments
@RobertusIT, I created a new issue to help you though this. first, you'll need to download SmartHQ (https://play.google.com/store/apps/details?id=com.ge.kitchen&hl=it&gl=US) and sign-in using your account. It'll ask you to authorize, then you should see your appliances in this application (hopefully). secrets.py should be in the examples directory, which is also the location of the websocket_example.py. If you've installed using pip, these files would be in the site-packages directory, I think once you find the install directory, navigate to the examples directory, then create the secrets.py, then run the output that the example produces should be logged to a file (or copy/pasted), and then you can post that to this issue. hope this helps. |
Thanks a lot for these more details. Here there are my track:
That contain these files:
And inside clients folder, there is websocket_example.py, so i guess that is the examples folder that you mean, but name is clients and not examples. Need to create a folder with examples or is ok don't touch the clients name ? Inside the clients folder we can see these files with secrets created by me with nano secrets.py that contain:
Now i tried to launch but i have an error:
Same story with python 3.9, In HA seems that are already installed 2 python version by default, infact if I try to write python, i can see two version:
|
My apologies, I thought I packaged the examples as well with the install, I guess not. For now, the easiest way then is to clone the repo to a local folder, there will be an examples folder (you can see it here: https://github.com/simbaja/gehome/tree/master/examples) that you can then add the secrets file and run the example. In HA, you don't need to use this repository, you can just go to https://github.com/simbaja/ha_components, and place the "ge_home" folder into your custom integrations (or use HACS). The HA component doesn't yet support AC though, so it might not be relevant for you. |
Hi, no luck for now. Here, I'm doing what do you suggest, so i download the project in zip, unzip in config HA folder, then in examples folder, i create secrets.py with mail and passwd about ge appliances app, and when i tried to launch websocket_example.py with python, no luck, some errors
If i launch with ./websocket_example.py I can see this:
|
Although it won't cause an issue, you should probably not put the sdk files in HA's config directory. This is just a low level library that is used by the HA component to provide the HA support. I'd put it somewhere else (perhaps in your home directory or something). Python is really sensitive about the working directory when looking for imports try from gehome-master and |
Moved gehome-master ( the project ) from config HA folder, to home, like you suggested.
Now tried to launch, without success
Tried also with python3.9
Tried with ./websocket_example.py or xmpp_example.py but same story
Now i have tried like you suggest at the end like execute command, but doesn't exist this command for HA ( seems )
|
Whoops, put the code in the wrong place: from |
|
I'm guessing there's some sort of pathing issue here, so, let's just force it. Add these lines of code to the websocket_example.py right after the comment (before
This should add the right path to the python path search list so that it can find things. You should then be able to follow the in comment above #22 (comment) |
The new part in websocket_example.py Then i have tried to launch:
|
|
Gave me a lot of error
And now i tried to launch
|
Please see here then, you probably have some extra steps to install due to
missing dependencies: https://lxml.de/installation.html
Also, you should install wheel `pip install wheel` it might help as well.
…On Sat, Jul 31, 2021, 4:10 AM RobertusIT ***@***.***> wrote:
pip install lxml should resolve that one.
Gave me a lot of error
➜ ~ pip install lxml
Collecting lxml
Downloading lxml-4.6.3.tar.gz (3.2 MB)
|████████████████████████████████| 3.2 MB 1.5 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9_4s9wwy/lxml_704e82104ed84057a326e99035d629dd/setup.py '"'"'; __file__='"'"'/tmp/pip-install-9_4s9wwy/lxml_704e82104ed84057a326e99035d6 29dd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.re ad().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__ , '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-i0elnirm
cwd: /tmp/pip-install-9_4s9wwy/lxml_704e82104ed84057a326e99035d629dd/
Complete output (3 lines):
Building lxml version 4.6.3.
Building without Cython.
Error: Please make sure the libxml2 and libxslt development packages are ins talled.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/e5/21/a2e4517e3d216f 0051687eea3d3317557bde68736f038a3b105ac3809247/lxml-4.6.3.tar.gz#sha256=39b78571 b3b30645ac77b95f7c69d1bffc4cf8c3b157c435a34da72e78c82468 (from https://pypi.org/ simple/lxml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4 .*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading lxml-4.6.2.tar.gz (3.2 MB)
|████████████████████████████████| 3.2 MB 21.2 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9_4s9wwy/lxml_b0672826071f41eb9a68b418b9a86289/setup.py '"'"'; __file__='"'"'/tmp/pip-install-9_4s9wwy/lxml_b0672826071f41eb9a68b418b9a8 6289/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.re ad().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__ , '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-o2jl7o8z
cwd: /tmp/pip-install-9_4s9wwy/lxml_b0672826071f41eb9a68b418b9a86289/
Complete output (3 lines):
Building lxml version 4.6.2.
Building without Cython.
Error: Please make sure the libxml2 and libxslt development packages are ins talled.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/db/f7/43fecb94d66959 c1e23aa53d6161231dca0e93ec500224cf31b3c4073e37/lxml-4.6.2.tar.gz#sha256=cd11c7e8 d21af997ee8079037fff88f16fda188a9776eb4b81c7e4c9c0a7d7fc (from https://pypi.org/ simple/lxml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4 .*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading lxml-4.6.1.tar.gz (3.2 MB)
|████████████████████████████████| 3.2 MB 14.9 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9_4s9wwy/lxml_650f91b691cb485e868820a91cc9247c/setup.py '"'"'; __file__='"'"'/tmp/pip-install-9_4s9wwy/lxml_650f91b691cb485e868820a91cc9 247c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.re ad().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__ , '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-vnqwuctk
cwd: /tmp/pip-install-9_4s9wwy/lxml_650f91b691cb485e868820a91cc9247c/
Complete output (3 lines):
Building lxml version 4.6.1.
Building without Cython.
Error: Please make sure the libxml2 and libxslt development packages are ins talled.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/c5/2f/a0d8aa3eee6d53 d5723d89e1fc32eee11e76801b424e30b55c7aa6302b01/lxml-4.6.1.tar.gz#sha256=c152b2e9 3b639d1f36ec5a8ca24cde4a8eefb2b6b83668fcd8e83a67badcb367 (from https://pypi.org/ simple/lxml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4 .*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading lxml-4.6.0.tar.gz (3.2 MB)
|████████████████████████████████| 3.2 MB 12.2 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9_4s9wwy/lxml_c2222dd279f74011a96d68319334adde/setup.py '"'"'; __file__='"'"'/tmp/pip-install-9_4s9wwy/lxml_c2222dd279f74011a96d68319334 adde/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.re ad().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__ , '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ry8nmtsr
cwd: /tmp/pip-install-9_4s9wwy/lxml_c2222dd279f74011a96d68319334adde/
Complete output (3 lines):
Building lxml version 4.6.0.
Building without Cython.
Error: Please make sure the libxml2 and libxslt development packages are ins talled.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/3c/5a/81446fb5a4706b b07a98427634ab93219dc7fa393841d81f5da5c7e151b7/lxml-4.6.0.tar.gz#sha256=8319abac bbe9fd9791c2e3c23deb9b6a16abc0fcbdfcc26722035e865b3d207f (from https://pypi.org/ simple/lxml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4 .*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading lxml-4.5.2.tar.gz (4.5 MB)
|████████████████████████████████| 4.5 MB 32.6 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9_4s9wwy/lxml_b8247d53e37c4d8ba0b29449201f793b/setup.py '"'"'; __file__='"'"'/tmp/pip-install-9_4s9wwy/lxml_b8247d53e37c4d8ba0b29449201f 793b/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.re ad().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__ , '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-8k5oeq54
cwd: /tmp/pip-install-9_4s9wwy/lxml_b8247d53e37c4d8ba0b29449201f793b/
Complete output (3 lines):
Building lxml version 4.5.2.
Building without Cython.
Error: Please make sure the libxml2 and libxslt development packages are ins talled.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/2c/4d/3ec1ea8512a7fb f57f02dee3035e2cce2d63d0e9c0ab8e4e376e01452597/lxml-4.5.2.tar.gz#sha256=cdc13a16 82b2a6241080745b1953719e7fe0850b40a5c71ca574f090a1391df6 (from https://pypi.org/ simple/lxml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4 .*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading lxml-4.5.1.tar.gz (4.5 MB)
|████████████████████████████████| 4.5 MB 16.3 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9_4s9wwy/lxml_ffb29ccc4fb64f2184899dedd8dcf3eb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9_4s9wwy/lxml_ffb29ccc4fb64f2184899dedd8dcf3eb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ml_bk7qp
cwd: /tmp/pip-install-9_4s9wwy/lxml_ffb29ccc4fb64f2184899dedd8dcf3eb/
Complete output (3 lines):
Building lxml version 4.5.1.
Building without Cython.
Error: Please make sure the libxml2 and libxslt development packages are installed.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/03/a8/73d795778143be51d8b86750b371b3efcd7139987f71618ad9f4b8b65543/lxml-4.5.1.tar.gz#sha256=27ee0faf8077c7c1a589573b1450743011117f1aa1a91d5ae776bbc5ca6070f2 (from https://pypi.org/simple/lxml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading lxml-4.5.0.tar.gz (4.5 MB)
|████████████████████████████████| 4.5 MB 10.2 MB/s
Using legacy 'setup.py install' for lxml, since package 'wheel' is not installed.
Installing collected packages: lxml
Running setup.py install for lxml ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9_4s9wwy/lxml_74334279092f421cafc757be488c38ba/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9_4s9wwy/lxml_74334279092f421cafc757be488c38ba/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-445wsyzw/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.9/lxml
cwd: /tmp/pip-install-9_4s9wwy/lxml_74334279092f421cafc757be488c38ba/
Complete output (87 lines):
Building lxml version 4.5.0.
Building without Cython.
ERROR: b'/bin/sh: xslt-config: not found\n'
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/lxml
copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-3.9/lxml
copying src/lxml/sax.py -> build/lib.linux-x86_64-3.9/lxml
copying src/lxml/__init__.py -> build/lib.linux-x86_64-3.9/lxml
copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-3.9/lxml
copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-3.9/lxml
copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-3.9/lxml
copying src/lxml/builder.py -> build/lib.linux-x86_64-3.9/lxml
copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-3.9/lxml
copying src/lxml/cssselect.py -> build/lib.linux-x86_64-3.9/lxml
creating build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-3.9/lxml/includes
creating build/lib.linux-x86_64-3.9/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-3.9/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-3.9/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-3.9/lxml/html
copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-3.9/lxml/html
copying src/lxml/html/clean.py -> build/lib.linux-x86_64-3.9/lxml/html
copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-3.9/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-3.9/lxml/html
copying src/lxml/html/defs.py -> build/lib.linux-x86_64-3.9/lxml/html
copying src/lxml/html/builder.py -> build/lib.linux-x86_64-3.9/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-3.9/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-3.9/lxml/html
copying src/lxml/html/diff.py -> build/lib.linux-x86_64-3.9/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-3.9/lxml/html
creating build/lib.linux-x86_64-3.9/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-3.9/lxml/isoschematron
copying src/lxml/etree.h -> build/lib.linux-x86_64-3.9/lxml
copying src/lxml/etree_api.h -> build/lib.linux-x86_64-3.9/lxml
copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-3.9/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-3.9/lxml
copying src/lxml/includes/__init__.pxd -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-3.9/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-3.9/lxml/includes
creating build/lib.linux-x86_64-3.9/lxml/isoschematron/resources
creating build/lib.linux-x86_64-3.9/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-3.9/lxml/isoschematron/resources/rng
creating build/lib.linux-x86_64-3.9/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-3.9/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-3.9/lxml/isoschematron/resources/xsl
creating build/lib.linux-x86_64-3.9/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-x86_64-3.9/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-x86_64-3.9/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-x86_64-3.9/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-x86_64-3.9/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-x86_64-3.9/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-3.9/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/src
creating build/temp.linux-x86_64-3.9/src/lxml
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -DTHREAD_STACK_SIZE=0x100000 -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/usr/include/python3.9 -c src/lxml/etree.c -o build/temp.linux-x86_64-3.9/src/lxml/etree.o -w
Compile failed: command 'gcc' failed: No such file or directory
creating tmp
cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitbjb3i8mu.c -o tmp/xmlXPathInitbjb3i8mu.o
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
error: command 'gcc' failed: No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9_4s9wwy/lxml_74334279092f421cafc757be488c38ba/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9_4s9wwy/lxml_74334279092f421cafc757be488c38ba/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-445wsyzw/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.9/lxml Check the logs for full command output.
And now i tried to launch
➜ ~
➜ ~ cd /home/gehome-master/examples
➜ examples python3 websocket_example.py
Traceback (most recent call last):
File "/home/gehome-master/examples/websocket_example.py", line 24, in <module>
from gehomesdk import (
File "/home/gehome-master/gehomesdk/__init__.py", line 6, in <module>
from .clients import *
File "/home/gehome-master/gehomesdk/clients/__init__.py", line 17, in <module>
from .base_client import GeBaseClient
File "/home/gehome-master/gehomesdk/clients/base_client.py", line 4, in <module>
from gehomesdk.clients.async_login_flows import async_get_oauth2_token, async_refresh_oauth2_token
File "/home/gehome-master/gehomesdk/clients/async_login_flows.py", line 2, in <module>
from lxml import etree
ModuleNotFoundError: No module named 'lxml'
➜ examples ./websocket_example.py
./websocket_example.py: line 6:
Websocket client example
We're going to run the client in a pre-existing event loop. We're also going to register some event callbacks
to update appliances every five minutes and to turn on our oven the first time we see it. Because that is safe!
: not found
./websocket_example.py: line 9: import: not found
./websocket_example.py: line 12: syntax error: unexpected "("
➜ examples
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#22 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOEHFXGPA3WT6E63337YDPTT2OVYVANCNFSM5BGS4YJA>
.
|
wheel installed
I lost installed log, anyway seems installed
About lxml seems there isn't any dep to install, because with pip should install all, or not? I didn't see any command , except pip install lxml but this command get errors. need to install HA in another machine? like raspberry ? i guess change nothing, but you have the knowedge to understand if maybe can help. |
I take my RPI3 with another version of HA, old, and i did again: 1 . Install your sdk, but i remember that is useless, need to get the project. Anyway i did it.
Now I get gehome-master and put it in home/pi folder.
Unzip it
Set up all permission to avoid any trouble
Then sudo nano secrets.py into examples folder and insert mail and pass about ge appliances app Now tried to launch:
No luck, so i have tried to install all dep from https://lxml.de/installation.html, like you suggested
Try again also with other python version
secrets is inside
Tried other way, no luck
Tried also to add this code in websocket_example.py
No luck
Anyway this time, lxml doesn't have any error in istallation process, so is installed. wheel is already installed
What miss? |
The next one that you're missing appears to be aiohttp. You'll need to do |
|
I'm really not sure what you're missing at this point. Looking through the logs, it looks like you have aiohttp, but then when try to run using python, it says you don't. I'm guessing you have multiple versions of Python out there and it's causing problems. It also may be a pathing issue (your PYTHONPATH environment variable may not include the place where these modules are installed). Try this command and see if you get a different error when running the example afterwards:
|
|
I think it is some sort of pathing/versioning issue: lxml is installed here: /usr/lib/python3/dist-packages lxml may not be able to find aiohttp. I'd try the following:
Maybe that'll get them to play nicely together? |
|
You have to install aiohttp using sudo so it can go into the right packages directory, doing it without sudo won't work, unfortunately. If pip isn't installed, try pip3. If that's not installed, you'll need to install pip while under sudo. |
unistall aiohttp in pi user
Now on root user, pip isn't recognize
Need to install pip on root in first
Now try to unistall aiohttp but is useless at the moment, anyway i have tried
Now install on root aiohttp and error because need a version of python
Install python 3.4
Time to launch
|
You'll need at least python 3.8 instead of python 3.4, older versions don't support the newer functionality. |
delete python 3.4
Then install 3.8 but is already installed
Try again
Here we can see that aiohttp require python more than 3.4.2, but i have tried with 3.8 and doesn't works, like you see
|
it appears that root is using a different version of python, so when you call
Then see what the python alternatives are: If you don't see the 3.8 version listed, you can then install it: |
You might also be able to do |
In first i want to say thanks for the patience.
Tried to install python 3 in root
Now i tried to install with your 2nd command, about python3
No alternative for python
Now install aiohttp
|
In the install log for python, it looks like it's using python 3.7.3-1, but you have python 3.8 as well, so still looks like a versioning thing potentially. It's clearly installed in some spot. Can you do the following:
|
|
Can you attach the logs that you got when you ran the example? |
Yes i edited the previous message |
https://accounts.brillion.geappliances.com/consumer/active/applications It say: My application: SmartHQ - that i didn't install because i can use only comfort - ge appliances |
Ok, you can kill the example, that's all that I'll need to start getting this into the sdk. I do see an issue in that the model/serial is not present on your device. I'm not sure why that would be, I will look into the what I can use as a substitute since the serial is what we use in HA for a unique identifier. |
my model is https://community.home-assistant.io/t/support-for-ge-appliances-smarthq/283815/14?u=robertusit but i guess that can't help you I can try something to change something in playstore and use smarthq ? |
Well, I guess that confirms some new logic I added to help another user worked... the code auto-authorized SmartHQ on your behalf. Let's see what we can do to make this work without you going into SmartHQ. If we need to, we can always try sideloading the app from another source if it's not appearing on Google Play. |
Can you post a text file, the copy/pasted version has some odd line breaks that make it a little hard to read. If not, that's fine, I can work with what you posted. |
You see a log a little malformed, because i used putty in a window that i expansed, so you can see some spaces between rows. If needed i can re-launch command and put putty full size |
I'll work with what you provided... let me look into things and figure it out. |
Can you pull down the latest version and then re-run the example? I want to confirm I got all the values identified and it's decoding it correctly. Thanks for your help! |
I didn't see upgrade in this way, but maybe i misunderstood |
Can you pull down via git or via the zip file method you used (i.e. directly from github)? I haven't packaged it yet, wanted to make sure it all worked first. |
I had previous zip version, so delete it
Rename the old folder Get from github the new zip
Unzip it
Now i copy secret.py from old folder to new folder Tried to launch
So edited with nano No luck So i did it:
But
|
Did you recopy your |
copy |
just noticed you did |
Done !
|
Looks like I had a couple issues, can you pull down one more time and post the output? |
Done. I needed to edit websocket_example.py and add this, before comment:
And in the websocket_example.py file, I changed the line to examples.secret import USERNAME, PASSWORD And I used secret.py into examples folder. I wrote it, if maybe you wish to make this changed, inside the project.
|
Log looks good. A couple questions/comments though:
|
Yeah, I noticed that the app displayed in metric from your screenshots earlier - it's just a bit odd that internally it's using imperial units for everything. When I programmed ovens for example, if the appliance was set to metric, all the values it would report would also be in metric. Looking at the new log, I think we're good on the power setting. Just wanted to confirm that I didn't mess it up somewhere. In regards to the swing functionality. Can you run the example and then change the swing values while it's running from the remote? If there's something changing, it should show up in the logs. If nothing shows up, it may not be possible to control via this mechanism. |
This log if with: Cool - 26°C Temperature And i change to: Horizontal Vertical and Horizontal I played with these and seems from log, that recognize them!
|
Yes, i see that now. In log you can see the same value about this ? Because in the previous log, i change a lot of air flow status, right, left, up down etc, but if you see only a value, on off in log, better than nothing. |
Yeah, it always seems to have a value of either On (01) or Off (00). What does the little (i) description show when you click on it in the app? |
OK, I think we can probably switch discussion over to the simbaja\ha_gehome repository since I think we're as good as we're going to get with the low-level functionality. I'll start a new issue log over there where we can work through HA issues. See simbaja/ha_gehome#31 |
Thanks to reply.
I make pip install gehomesdk and install sdk
Then nano secrets.py and I use my credentials in SmartHQ app, that in europe is Ge Appliances
And now? How can i launch websocket_example.py where is ?
I can't install locate in home assistant, so i don't know where is this file.
Also, after launch websocket_example.py, I need more something or only my AC on ? So get automatically debug log?
If yes, where can i get it, to open an issue here on github?
Thanks for the support
Originally posted by @RobertusIT in #15 (comment)
The text was updated successfully, but these errors were encountered: