Skip to content
PixelBurstHD edited this page Mar 12, 2018 · 17 revisions

Thanks to MonkeyTedBaker for his awesome job !

Getting Started

It is required to use https://github.com/Hydro74000/aiopogo in requirements.txt. Other one will not work due tu GOHASH integration.

DB Setup

Refer to DB Migration - alembic for details/DB creation.

For a first installation, install requierements for Mysql/MariaDB:

apt-get install libmysqlclient-dev (or libmariadbclient-dev if mariadb used)
pip3[.6] install ConfigParser
pip3[.6] install mysqlclient

Fresh db

-- Run alembic upgrade head

Migration from other forks

  • Recommended way (best to avoid issues):

-- Export the spawnpoint table from your existing database mysqldump -p CURRENTDATABASENAME spawnpoints > spawnpoints.sql;

-- Create a new database CREATE DATABASE hydro CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; and import the old spawnpoints mysql -p hydro < spawnpoints.sql;

-- Then just do a rename of the spawnpoint table to spawnpoints_old, run alembic upgrade head, and then insert into spawnpoints select * from spawnpoints_old;
You might need to specify field list in case structure changed between your fork and Monkey.

  • Simple way (Not recommended) :
    -- Run alembic upgrade head --sql > forkmigration.sql to print the migration SQL scripts in a file and run the forkmigration.sql created script in your db.

Config changes - config.py

Gym details

## Gyms

### Toggles scanning for gym names.
#GYM_NAMES = True 

### Toggles scanning gyms for gym_defenders.
### Set this to False if you want to call GYM_GET_INFO RPC only for gym names.
#GYM_DEFENDERS = True

# notify gyms data updates to webhooks (default = False)
#NOTIFY_GYMS_WEBHOOK = False

Webhook formatting config

#####
## Webhook formatting config
##    
## Allows configuration of outgoing raid webhooks.
## Defines <our field name>:<recipient's field name>
##
## The following are all the available fields for raid webhook.
##   "external_id", "latitude", "longitude", "level", "pokemon_id",
##   "team", "cp", "move_1", "move_2",
##   "raid_begin", "raid_battle", "raid_end",
##   "gym_id", "base64_gym_id", "gym_name", "gym_url"
##
## For PokeAlarm, no config is needed since it is supported out of the box.
#
#WEBHOOK_RAID_MAPPING = {}
#
## For others, the following is an example to map rename the field `raid_seed` to `external_id`.
#
#WEBHOOK_RAID_MAPPING = {
#    'raid_seed': 'external_id',
#    'gym_name': 'name',
#    'gym_url': 'url',
#}

PGScout

####
### PgScout (Credit to Avatar690)
## MUST MATCH YOUR PGSCOUT CONFIG.JSON.  Will encounter based on ENCOUNTER_IDs above.  
## If encounter fails, worker.py will attempt to encounter with the running acount (if lv > 30)
## If it fails, sighting will be saved without additional encounter info.

### Enter in your address for PGSCOUT hook endpoint including hostname, port (if any) and path.
### If set to a url, PGSCOUT will be used. If None, normal Monocle encounter will be used. 
#
#PGSCOUT_ENDPOINT = None
#
## Example,
#PGSCOUT_ENDPOINT = {"http://127.0.0.1:1234/iv","http://127.0.0.1:1235/iv"}
#
## *Take note that /iv is needed at the end for PGScout. Do not remove it.*

## Set the connection timeout to wait on a response from PGScout.  Default is 40 seconds.
## Timeout will be connection dependent, proxy dependent, etc.  I recommend keeping it at the default.
## Going too high will certainly guarantee a response from a Scout but will lead to greater inefficiency
## and instability for Monocle
#
#PGSCOUT_TIMEOUT = 40 
#

Pokemon sighting insert blacklist

### Prevent these pokemon from being inserted to the database and thus visible on the map; at all
### Default is None (Everything is inserted)
#NO_DB_INSERT_IDS = None

### To set it the same as TRASH_IDS do the following.
#NO_DB_INSERT_IDS = TRASH_IDS

Record keeping

### Record keeping settings
###
### If True, new fort_sightings and raids will be inserted. Else, existing records for the same fort will be updated (if found).
### Default is False
#KEEP_GYM_HISTORY = False
#
### If True, new sightings inserted. Else, existing sighting for the same spawnpoint will be updated (if found).
### Default is True
#KEEP_SPAWNPOINT_HISTORY = True 

Python 3.6

Installing Python 3.6 on Linux

apt-get update
apt-get install build-essential libssl-dev libssl1.0.0 libgeos-c1
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar xvf Python-3.6.0.tgz
cd Python-3.6.0
./configure --enable-optimizations
make
make altinstall