Not only can you make this lovely Lure-like case, you can make the Pi Zero act as a reverse-Lure, a Pokemon Finder! By loading some python software into the Pi, you can connect to the unofficial Niantic Pokemon API and determine when a Pokemon spawns in your area.
Thanks to James for the writeup!
Connecting to Niantic's servers and using the API is completely against the terms of service. It's a fun hack but is not authorized by Niantic and can cause the account used to be soft-banned or perhaps even perma-banned!
Do not use your main account!
Also, Niantic doesn't particularly like it when people use the API and they are very likely to shut access to it (again) soon!
This code may not work past when this was written on August 11, 2016. There is no guarantee or support or expectation that this will work at all!
Prepare Pi Zero
Start by loading up Jessie Lite on your Raspberry Pi
You'll also need to log into a shell on your Pi Zero, we prefer using a USB console cable but you can also connect a keyboard and use HDMI or connect an ethernet adapter and ssh to raspberrypi.local
Either way, get your Pi Zero up and running and you are logged in. Expand Filesystem from within sudo raspi-config
. Reboot with the WiFi adapter connected to the USB OTG port
Then set up the WiFi adapter, we prefer to do it this way but there's other techniques, just do whatever you like to get the Pi Zero on the network.
Reboot and make sure you can ping raspberrypi.org
successfully
Install packages
Once networking is working, run the following at the shell to install pkgs:
sudo apt-get update
sudo apt-get install git python python-pip python-dev
sudo pip install --upgrade pip
Install Pokemon Go API
From the shell, get the latest PGoAPI with git clone https://github.com/keyphact/pgoapi
cd in the new directory (cd pgoapi
) and then find and download the latest encryption file. As of this writing it was available at http://pastebin.com/raw/fCSw0Fz4
Run wget http://encryptionfilelocationhere -O encrypt.c
to save it as encrypt.c
Compile it into a linked library (libencrypt.so) with gcc -std=c99 -shared -o libencrypt.so -fPIC encrypt.c
You'll need to install a bunch of software, luckily it's in a file so you can just run
sudo pip install -r requirements.txt
To do them all
Grab the adapokefinder.py file with wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Pokemon-Detector/master/adapokefinder.py -O adapokefinder.py
Time to configure!
Create your config with mv config.json.example config.json
and then edit it with nano config.json
- put in your account and the location you want to monitor
Remember, do not use your main account!
Test it out
That's it! time to test. Run python adapokefinder.py and make sure you authenticate and see pokemon 'appear'
Page last edited August 10, 2016
Text editor powered by tinymce.