shr00mie / gmapslocsharing Goto Github PK
View Code? Open in Web Editor NEWDefinitely not a library designed to pretend to be a browser in order to grab location sharing GPS info instead of paying for the maps api...
Definitely not a library designed to pretend to be a browser in order to grab location sharing GPS info instead of paying for the maps api...
Running HomeAssistant 0.98.1 on Ubuntu 18.04 LTS under /srv env.
Installed the deps in the /srv/homeassistant/lib/python3.6/site-packages, google_maps in the /home/homeassistant/.homeassistant/custom_components
Added the configuration part with debug true.
When I (re)start HA, I get a "ERROR (SyncWorker_8) [custom_components.google_maps.device_tracker] Google Maps - Component configuration failed: list index out of range." error and the tracker is not working.
Are there any other steps that I need to do, like log in Chrome from the same computer/user that runs HA? I have 2FA activated but I get no prompt on my phone to allow login when using the regular account password. Also tried setting a App Password in the account security and use that one but it's the same.
I'm trying to get this set up in my HA config, but am getting the below error in my HA log. I've created the script for the Ubuntu install and run it (after editing my HA install path) so I'm not sure what's going on. Probably something simple that I overlooked. Help?
2019-06-03 11:30:15 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform google_maps
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 177, in async_setup_platform
disc_info)
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/google_maps/device_tracker.py", line 54, in setup_scanner
scanner = GoogleMapsScanner(hass, config, see)
File "/home/homeassistant/.homeassistant/custom_components/google_maps/device_tracker.py", line 62, in __init__
from gmapslocsharing import GoogleMaps
ModuleNotFoundError: No module named 'gmapslocsharing'
Could you explain what this exactly means?
I've augmented my Dockerfile to include your script and running into problems with Selenium. Since the Home Assistant Dockerffile is based on the python2.7 image, do you have a recommendation for getting up to selenium 3.141.59?
Error Message from Home Assistant
Unable to install package selenium==3.141.59: Could not find a version that satisfies the requirement selenium==3.141.59 (...)
No matching distribution found for selenium==3.141.59
Selenium version
pip install selenium
Requirement already satisfied: selenium in /usr/local/lib/python3.7/site-packages (2.53.6)
Dockerfile
FROM homeassistant/home-assistant:latest
MAINTAINER Jim Shank <[email protected]>
RUN set -x && wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& printf "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
google-chrome-stable \
&& rm -rf /var/lib/apt/lists
Running Home Assistant version 0.98.1 on docker and getting this error in the Home Assistant logs: "Google Maps - Component configuration failed: 'NoneType' object has no attribute 'get'.".
I set debug to true but unfortunately there is no extra information in the debug folder.
Any idea what could be the issue? Maybe Home Assistant version 0.98.1 is not supported yet (I haven't tried this component in earlier versions of Home Assistant)?
I'm testing this in a docker container. Only difference is I installed chromium. Not getting any location data and cant see any obvious errors in the logs
2018-11-13 17:28:27 INFO (SyncWorker_4) [gmapslocsharing.cookie] Initiating Cookie Check.
2018-11-13 17:28:27 DEBUG (SyncWorker_4) [gmapslocsharing.cookie] Cookie Check - Opening login URL via requests.
2018-11-13 17:28:28 DEBUG (SyncWorker_4) [gmapslocsharing.cookie] Cookie Check - Checking if cookie already exists.
2018-11-13 17:28:28 DEBUG (SyncWorker_4) [gmapslocsharing.cookie] Cookie Check - Attempting to load cookie from file.
2018-11-13 17:28:28 DEBUG (SyncWorker_4) [gmapslocsharing.cookie] Cookie Check - Validating cookie.
2018-11-13 17:28:28 DEBUG (SyncWorker_4) [gmapslocsharing.cookie] Cookie Check - Cookie exists and is valid.
2018-11-13 17:28:28 INFO (SyncWorker_4) [gmapslocsharing.cookie] Cookie checks out.
2018-11-13 17:28:28 INFO (SyncWorker_4) [gmapslocsharing.location] Performing data query.
2018-11-13 17:28:28 DEBUG (SyncWorker_4) [gmapslocsharing.location] Query Data - Requesting location data.
2018-11-13 17:28:29 DEBUG (SyncWorker_4) [gmapslocsharing.location] Query Data - Decompressing and decoding response.
2018-11-13 17:28:29 INFO (SyncWorker_4) [gmapslocsharing.location] Performing data cleanup.
2018-11-13 17:28:29 DEBUG (SyncWorker_4) [gmapslocsharing.location] Data Cleanup - Clearing previously clean output
2018-11-13 17:28:29 DEBUG (SyncWorker_4) [gmapslocsharing.location] Data Cleanup - Moving data to local variable.
2018-11-13 17:28:29 DEBUG (SyncWorker_4) [gmapslocsharing.location] Data Cleanup - Clearing contents of self.data.
2018-11-13 17:28:29 DEBUG (SyncWorker_4) [gmapslocsharing.location] Data Cleanup - Splitting output by person per row.
2018-11-13 17:28:29 DEBUG (SyncWorker_4) [gmapslocsharing.location] Data Cleanup - Deleting useless/unknown content.
2018-11-13 17:28:29 DEBUG (SyncWorker_4) [gmapslocsharing.location] Data Cleanup - Creating dict for each person in output.
2018-11-13 17:28:29 DEBUG (SyncWorker_4) [gmapslocsharing.location] Data Cleanup - Successfully stored output for 0 people.
2018-11-13 17:28:29 INFO (SyncWorker_4) [gmapslocsharing.location] Creating people.
2018-11-13 17:28:29 DEBUG (SyncWorker_4) [gmapslocsharing.location] Create People - Clearing previously stored people
2018-11-13 17:28:29 DEBUG (SyncWorker_4) [gmapslocsharing.location] Create People - Converting location data into Person object
Hi, I'm running Home Assistant 0.103.6 on Docker and I get the following error during setup:
Error setting up platform legacy Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 77, in async_setup_legacy discovery_info, File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/google_maps/device_tracker.py", line 57, in setup_scanner scanner = GoogleMapsScanner(hass, config, see) File "/config/custom_components/google_maps/device_tracker.py", line 76, in __init__ self.debug File "/config/deps/lib/python3.7/site-packages/gmapslocsharing/__init__.py", line 20, in __init__ self.browser = Browser() File "/config/deps/lib/python3.7/site-packages/gmapslocsharing/core/browser.py", line 30, in __init__ self.cookie_check() File "/config/deps/lib/python3.7/site-packages/gmapslocsharing/core/browser.py", line 112, in cookie_check self.driver.get(self.config.cookie_check) AttributeError: 'NoneType' object has no attribute 'get'
I set the debug statement to true, but the debug folder is empty. I had to change the python map to 3.7, since apparently, I don't have 3.6 running in Docker.
Could this be caused by the change in versions somewhere? I changed the password to something without special characters, to rule that out.
It would be great if you can help me out or point me to the right direction.
Hi,
Are you still planning on making an hassio version? The cookie of the official component keep on expiring.
Thanks.
Thu Sep 12 2019 20:00:06 GMT+0200 (centraleuropeisk sommartid)
Unable to install package chromedriver-binary==76.0.3809.68: ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fgiz7f40/chromedriver-binary/setup.py'"'"'; file='"'"'/tmp/pip-install-fgiz7f40/chromedriver-binary/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-wxelewss --python-tag cp37
cwd: /tmp/pip-install-fgiz7f40/chromedriver-binary/
Complete output (35 lines):
running bdist_wheel
running build
running build_py
Downloading Chromedriver...
ERROR: Failed building wheel for chromedriver-binary
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fgiz7f40/chromedriver-binary/setup.py'"'"'; file='"'"'/tmp/pip-install-fgiz7f40/chromedriver-binary/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-ia0oygb_/install-record.txt --single-version-externally-managed --compile
cwd: /tmp/pip-install-fgiz7f40/chromedriver-binary/
Complete output (37 lines):
running install
running build
running build_py
Downloading Chromedriver...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-fgiz7f40/chromedriver-binary/setup.py", line 84, in <module>
cmdclass={'build_py': DownloadChromedriver}
File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/local/lib/python3.7/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/usr/local/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-fgiz7f40/chromedriver-binary/setup.py", line 42, in run
url = get_chromedriver_url(version=chromedriver_version)
File "/tmp/pip-install-fgiz7f40/chromedriver-binary/chromedriver_binary/utils.py", line 52, in get_chromedriver_url
raise RuntimeError('Could not determine chromedriver download URL for this platform.')
RuntimeError: Could not determine chromedriver download URL for this platform.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fgiz7f40/chromedriver-binary/setup.py'"'"'; file='"'"'/tmp/pip-install-fgiz7f40/chromedriver-binary/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-ia0oygb_/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
WARNING: You are using pip version 19.2.2, however version 19.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.