This is third-party module for the inkycal project for release 2.0.0.
This module displays the locations of everyone you are connected with via Google Location Sharing.
You must follow the instructions these instructions to set it up:
- Install a chrome extension to download your cookies, like this one (called Open Cookies.txt, the successor to Get Cookies.txt): https://chrome.google.com/webstore/detail/open-cookiestxt/gdocmgbfkjnnpapoeobnolbbkoibbcif/related.
- Navigate to Google Maps, and log in (if you aren't already logged in).
- Use the extension to download your cookies.
- Move the cookies file to your Pi.
- Enter the full file path to your cookies file in the box in the settings file web-ui. For example: /home/pi/Inkycal/example.cookies
- Enter the email address you logged into Google Maps with into the box in the settings file web-ui. For example: myemail@gmail.com
How to install the module.
-
Navigate to the modules directory
cd Inkycal/inkycal/modules
-
Download the third-party module:
# The URL is the rawfile url. e.g. open mymodule.py, then click on [raw] to see the rawfile-url
wget https://raw.githubusercontent.com/emilyboda/inkycal_locationsharing/master/inkycal_locationsharing.py
- Install locationsharinglib
pip3 install locationsharinglib
- Register this module in Inkycal
Navigate to this file and edit it:
nano /Inkycal/inkycal/__init__.py
Under #Default modules, add:
import inkycal.modules.inkycal_locationsharing
Navigate to this file and edit it:
nano /Inkycal/inkycal/modules/__init__.py
Add:
from .inkycal_locationsharing import Locationsharing
Once the module is registered, navigate to Inkycal/server
and run the flask-server with:
flask run --host=0.0.0.0
The web-UI should now be available at http://raspberrypi.local:5000/
. If this does not work, you can manually use the IP address instead: http://192.168.1.142:5000/
Copy the generated settings.json file to your raspberry Pi (VNC/ WinSCP). If you don't have access to the Raspberry Pi via VNC/ WinSCP, you can copy the settings.json file to the microSD card instead. After inkycal starts, it will use the new settings.json file.
# In python, run the following commands:
from inkycal import Inkycal
Inkycal.remove_module('filename.py') # where filename.py is the name of your third-party module in Inkycal/inkycal/modules
# If everything went well, you'll see a printed message without red lines.