MAD Your (very) First Worker Setup (Raids) - madBeavis/PimpMyAtv GitHub Wiki

WORK-IN-PROGRESS

Foreward

Initial setup for how to get things running in MAD can be a bit overwhelming for those that are new. Resist the urge to get distracted by shiny shit as that fascination will likely slow your progress towards fulfilling the goal of a working server and building foundational skills along the way. You do not want to get too far ahead of yourself, as in real life, one has to learn how to roll before one can crawl before one can walk before one can run.

This quick write up is meant to be an easy to follow and implement way to get things running. There are a multitude of options you can change in MAD, but as this is designed to get you running fast and simple, nothing beyond the bare essential settings will be covered, so all options/settings will not be discussed. This guide assumes that you have ports/address/origin setup properly on one device with sane startup times for pd & rgc about 60 seconds.

The gentlemen writing MAD and determining default settings have substantial experience with scanners, so accept their defaults until you gain more experience. Don't get distracted by shiny shit. The time to tinker is later, the goal here is to get you up and running without too much other than self inflicted shenanigans. Basically, if you can't outline the effects you will cause with changes, don't do it.

I chose raids as it is the easiest one to initialize and get running well. Just about everything with MAD builds on prior experience, you have to get it somewhere, so here we are.

Where to run MAD

There are several options on where to run MAD. Most choose to run MAD on a VPS (Virtual Private Server). Some run on virtual machines. Some do it on a local machine in their house. Some have run WSL, but not recommended. Some have run a pi in the past, but not recommended for new users due to various issues.

Most run MAD on a vps. For those with decent internet, this works well. They do it for various reasons, easier to just do than explain all the reasons why.

I run MAD locally for a variety of reasons, mostly due to having a 3mbit DSL for internet. The machine is MSI GL63 8SC-059 laptop with an i7-8750h 6 core processor that I got during Fourth of July sales for $699. I upgraded the ram to 16gb and install a 500gb WD black NVME ssd that I had collecting dust on the shelf. I currently run Mint 19 on it. I did my first install on a silly little Celeron mini-pc, which was slow, so I upgraded to a $400 laptop. The cheap laptop didn't cut it, so I upgraded to the MSI. For a hands on person, there is something nice about having a monitor, keyboard and mouse right there in front of you to do the tasks necessary for running a whole setup.

Accounts

As you need to be a level 5 account to enter gyms, you also need that level to do raids. For my first, I just made a google based account on a spare phone, hotspotted it to my main phone without playing pogo on it and headed downtown to spin some stops, catch mons and get to level 5. It took longer to drive downtown than it did to level up.

Networking

I run my devices through a router that hooks up to a VPN for all the data that goes through it. I keep my real life pogo accounts separate from their scanner only relatives. But remember these folks are not the same quality of mods at say ogame, but you never know if they could get their shit together someday and start going through logs. So better to be safer than sorry.

Geofences

A geofence defines a physical area in the world. You simply draw a fence around the area.

MAD now has a fence editor in it. Right click at icon on upper right of map to start making one. Go to the map, navigate the map to the area of interest. In the upper right corner, you will see a little triangle button, click on it. Click on the map on one of the corner points of the area you want to define. Keep clicking to make corner points around the area you want to define. Click on the first point you made to close the geofence. Click on the now fenced area, give it a name and save it. Hit the 'Apply Settings' button.

The remainder of the geofence section is maintained for historical purposes. I still use jasparke editor for some tasks, but for most I have transitioned myself to MAD geofence editor.

Geofences define an area, with the corner points being setup by you. I prefer to create and edit geofences by using the tools at geo.jasparke.net site, as i learned it prior to MAD having a fence editor. Some may vociferously bemoan the startup centering of it over the Vancouver area of Canada, but it's benefits far out way that insignificant detraction. With the site you can import, create, edit and save geofences setups.

  1. Navigate the map to your area of interest
  2. Click on the create button, a dialog pops up. Put a name in it. This is where you can also import existing fence coords.
  3. Start clicking where you want the corner points. Close the area by clicking on your start point. For your first area, I would keep things simple, say use an area of less than one quarter square mile. A park, downtown, your neighborhood - it is up to you.
  4. You can edit the geofence by clicking on the checkbox just to the right of the geofence name
  5. Once you have the area set to your liking and ready to get it into MAD, click on the 'exp' button for the area. Copy the lat long list from the dialog.
  6. Go into MADmin settings
    1. Click on geofence
    2. Create a new one by clicking on the 'plus' button
    3. Set the 'Geofence Name to something along the lines of "test1", "MyGrandePark" or whatever you want
    4. In the first line of the 'fence_data' field, you need to name it for MADmin map. Enter something like '[MyGrandePark]'
    5. Paste in lat long values from the dialog
    6. Save it
  7. You now have a geofence that is ready to use in an area
  8. Click on the 'Apply Settings' button at the top right

Areas

Areas in MAD define the geographic area using the a geofence for a worker to work in and what they will be in for that area. For the first one ever for you, I would go with just plain raid scanning. Get things running here, you can easily expand your modes as you gain experience.

  1. Get into MADmin settings, click on 'area' at the top.
  2. Create a new area by clicking on the 'plus' button, choosing raids_mitm from the dropdown.
  3. Name the area, you will find you own convention over time, but for now "raids-test1"
    1. I have chosen the convention of Mode-Area to name my areas.
    2. But to each their own, you can always change it later.
  4. Pick the geofence to use in the 'geofence-included' field, i.e. the one you just made
  5. Since you have no data, you need to set init=true with just one round. More rounds are only necessary for mon-mitm, not pokestop or raid modes.
  6. Accept default values for the remainder of the fields. As I did early on, I screwed shit up royally, going back to defaults just worked.
    1. If you want invasion data, you can set 'including_stops' to true. This will cause the route calculated to get raids and also get near enough to stops on its travels to receive invasion data from all stops in the fence.
  7. Click on the 'Apply Settings' button at the top right

Walker

Walker's define how a worker operates, you give them tasks to do and times to do them in. Best to treat them like your semi-retarded cousin that has difficulty following directions and be very explicit. You can get more clever later on, but not today.

  1. In MADmin settings, click on walker in the menu
  2. Create a new walker by clicking on the 'plus' button at the upper right, set the 'walkername' variable to "walkertest1"
  3. Save it
  4. Find the walker from your long list of one, click on the name to edit the details of it
  5. Although not particularly realistic, but merely used as an illustration, we want this walker to just do raid scanning 24/7 (invasions are 24/7 though)
    1. Add a new walker area to the walker by clicking on the 'plus' button
    2. Pick the area you just made, i.e. "test1-raids"
    3. Choose coords. Do not use others until you have more experience.
    4. Set the 'Value for Walkermode' to "00:00-23:59" for 24 hour operation.
      1. If you do times across midnite, I won't help you!
      2. Since my time doing MAD, most people that have had problems with walkers have one this thing in common, don't become a statistic
    5. Click to save the walker area
    6. Click again to save the walker
    7. Apply settings as before

Device

Devices are self explanatory, whether they be ATVs or phones. It is necessary to restart MAD after adding devices.

  1. In MADmin settings, click on devices
  2. Create a new one by clicking on the 'plus' button found in the familiar location
  3. Name it appropriately setting the 'Origin' field
    1. Set the origin to the same value you set in pd/rgc during device setup
    2. I name mine of the form 'Atv001' for #1, 'Atv002' for #2 and so on
  4. Click the save button
  5. Assign the walker you the device you just created
  6. Apply settings
  7. Restart MAD
    1. This used to be required, but I would still suggest it after adding a device

What to expect from MAD

Assuming you setup your device up and followed the directions, you should have a setup that will run. This will guide you though what to expect and some common errors.

  1. If you are on a VPS or even local machine, check that your firewall allows the pd & rgc ports to pass. Make a mental note can proxy them through nginx to make the process more secure.
  2. Start MAD with the device powered off
    1. MAD will run through its startup sequence
    2. Start the device after MAD went through startup, this will allow you to easily see what is going on with the device.
    3. You should see something about your new area and it being initialized
  3. Turn on the device
  4. Say you set 60 second delays for pd & rgc, you should see a line that denotes a connection and waiting for injection approximately the boot time plus 120 seconds
    1. If you see something about unknown origin, you fat fingered the origin on the device and/or MAD
    2. Does the websocket uri seem correct and not subject to fat fingers, i.e. ws://ip_address:port
    3. No spaces before or after
    4. If you have problems, do not post your ip for vps in the public forums
  5. A countup for waiting for injection will start, assuming you have pd setup right, you should start getting GMO messages. This means your device is getting data to MAD successfully
    1. Does pogodroid login successfully? You can't do settings until is it authorized with the backend. Reauth with the backend will fix many problems, the the #faq channel in discord for a link.
    2. is the origin correct
    3. Does the 'post destination' field make sense, i.e. http://ip_address:port
    4. No spaces anywhere
  6. If you are in the ocean, that is not bad, as things communicating. MAD likely doesn't have things for worker to do as defined by the walker. Check your settings.