Closed lmantas closed 8 years ago
@lmantas any errors when you run in debug mode (-d
)?
Oh sorry for not completing the template, I've just updated it.
I do receive one error, which I don't really understand, something about InsecurePlatformWarning (you can see it in my console output). But I've been getting it for a while, and notifications were working fine until I did git pull
@lmantas You should have a look at the Slack wiki. Since PokeAlarm now supports pokemon, gyms and pokestop notifications, each one of those have their own sections in alarms.json
. Specifically, you'll want to look at the Advanced Configuration section to refamiliarize yourself with the new alarms.json
format.
As for the SSL errors, it's probably something specific to your setup and out of the context of PokeAlarm (though someone else might chime in about it.)
@reme-dy thanks again for your response.
I've looked at Advance Configurations for Slack, but it looks totally different than alarms.json.default so it's a bit confusing, sorry.
Where would I have to insert Pokemon names?
Would that be the right code?
{
"active": "True",
"type":"slack",
"api_key":"YOUR_API_KEY",
"channel":"general",
"startup_message":"True",
"startup_list":"True",
"pokemon":{
"Magikarp":"False",
"Lapras":"True",
"Ditto":"False",
"channel":"general",
"username":"<pkmn>",
"icon_url" : "https://raw.githubusercontent.com/kvangent/PokeAlarm/master/icons/<id>.png",
"title":"A wild <pkmn> has appeared!",
"url":"<gmaps>",
"body": "Available until <24h_time> (<time_left>).",
"map": {
"enabled":"true",
"width":"250",
"height":"125",
"maptype":"roadmap",
"zoom": "15"
}
Try putting your code in a JSON editor (here's an online one) to check if your alarms.json is in the correct format.
Edit: You should only have to edit the alarm section of your alarms.json
file.
Here is my whole JSON file http://www.jsoneditoronline.org/?id=0a1638f7b230be4d5430f6f4f63e1077
Like I said, everything works fine, except those 2 fields: title, body. The notifications use the default text instead.
Update: I just did a fresh git clone - it didn't solve the problem either.
You are misunderstanding how the alarm system works. The config on the slack wiki is an example of how to configure the slack alarm only, not the entire alarms.json. The reason your original config doesn't work is because you have to specify which alert type you want to customize. So long story short, start with the alarms.json.default. Copy and paste the advanced slack config over JUST the slack basic config already included. Then make the modifications the way you want them.
Hopefully to make it more clear, I've included an alarms.json with just a slack config in:
{
"alarms":[
{
"active": "True",
"type":"slack",
"api_key":"YOUR_API_KEY",
"channel":"general",
"startup_message":"True",
"startup_list":"True",
"pokemon":{
"channel":"general",
"username":"<pkmn>",
"icon_url" : "https://raw.githubusercontent.com/kvangent/PokeAlarm/master/icons/<id>.png",
"title":"A wild <pkmn> has appeared!",
"url":"<gmaps>",
"body": "Available until <24h_time> (<time_left>).",
"map": {
"enabled":"true",
"width":"250",
"height":"125",
"maptype":"roadmap",
"zoom": "15"
}
},
"pokestop":{
"channel":"general",
"username":"Pokestop",
"icon_url" : "https://raw.githubusercontent.com/kvangent/PokeAlarm/master/icons/pokestop.png",
"title":"Someone has placed a lure on a Pokestop!",
"url":"<gmaps>",
"body":"Lure will expire at <24h_time> (<time_left>)."
},
"gym":{
"channel":"general",
"username":"Pokemon Gym",
"icon_url" : "https://raw.githubusercontent.com/kvangent/PokeAlarm/master/icons/gym.png",
"title":"A Team <old_team> gym has fallen!",
"url":"<gmaps>",
"body": "It is now controlled by <new_team>."
}
}
],
"gyms":{
"To_Valor":"False",
"To_Mystic":"False",
"To_Instinct":"False",
"From_Valor":"False",
"From_Mystic":"False",
"From_Instinct":"False"
},
"pokestops":{
"Lured":"false"
},
"pokemon":{
"Bulbasaur":"False",
"Ivysaur":"False",
"Venusaur":"False",
"Charmander":"False",
"Charmeleon":"False",
"Charizard":"False",
"Squirtle":"False",
"Wartortle":"False",
"Blastoise":"False",
"Caterpie":"False",
"Metapod":"False",
"Butterfree":"False",
"Weedle":"False",
"Kakuna":"False",
"Beedrill":"False",
"Pidgey":"False",
"Pidgeotto":"False",
"Pidgeot":"False",
"Rattata":"False",
"Raticate":"False",
"Spearow":"False",
"Fearow":"False",
"Ekans":"False",
"Arbok":"False",
"Pikachu":"False",
"Raichu":"False",
"Sandshrew":"False",
"Sandslash":"False",
"Nidoran♀":"False",
"Nidorina":"False",
"Nidoqueen":"False",
"Nidoran♂":"False",
"Nidorino":"False",
"Nidoking":"False",
"Clefairy":"False",
"Clefable":"False",
"Vulpix":"False",
"Ninetales":"False",
"Jigglypuff":"False",
"Wigglytuff":"False",
"Zubat":"False",
"Golbat":"False",
"Oddish":"False",
"Gloom":"False",
"Vileplume":"False",
"Paras":"False",
"Parasect":"False",
"Venonat":"False",
"Venomoth":"False",
"Diglett":"False",
"Dugtrio":"False",
"Meowth":"False",
"Persian":"False",
"Psyduck":"False",
"Golduck":"False",
"Mankey":"False",
"Primeape":"False",
"Growlithe":"False",
"Arcanine":"False",
"Poliwag":"False",
"Poliwhirl":"False",
"Poliwrath":"False",
"Abra":"False",
"Kadabra":"False",
"Alakazam":"False",
"Machop":"False",
"Machoke":"False",
"Machamp":"False",
"Bellsprout":"False",
"Weepinbell":"False",
"Victreebel":"False",
"Tentacool":"False",
"Tentacruel":"False",
"Geodude":"False",
"Graveler":"False",
"Golem":"False",
"Ponyta":"False",
"Rapidash":"False",
"Slowpoke":"False",
"Slowbro":"False",
"Magnemite":"False",
"Magneton":"False",
"Farfetch'd":"False",
"Doduo":"False",
"Dodrio":"False",
"Seel":"False",
"Dewgong":"False",
"Grimer":"False",
"Muk":"False",
"Shellder":"False",
"Cloyster":"False",
"Gastly":"False",
"Haunter":"False",
"Gengar":"False",
"Onix":"False",
"Drowzee":"False",
"Hypno":"False",
"Krabby":"False",
"Kingler":"False",
"Voltorb":"False",
"Electrode":"False",
"Exeggcute":"False",
"Exeggutor":"False",
"Cubone":"False",
"Marowak":"False",
"Hitmonlee":"False",
"Hitmonchan":"False",
"Lickitung":"False",
"Koffing":"False",
"Weezing":"False",
"Rhyhorn":"False",
"Rhydon":"False",
"Chansey":"False",
"Tangela":"False",
"Kangaskhan":"False",
"Horsea":"False",
"Seadra":"False",
"Goldeen":"False",
"Seaking":"False",
"Staryu":"False",
"Starmie":"False",
"Mr. Mime":"False",
"Scyther":"False",
"Jynx":"False",
"Electabuzz":"False",
"Magmar":"False",
"Pinsir":"False",
"Tauros":"False",
"Magikarp":"False",
"Gyarados":"False",
"Lapras":"False",
"Ditto":"False",
"Eevee":"False",
"Vaporeon":"False",
"Jolteon":"False",
"Flareon":"False",
"Porygon":"False",
"Omanyte":"False",
"Omastar":"False",
"Kabuto":"False",
"Kabutops":"False",
"Aerodactyl":"False",
"Snorlax":"False",
"Articuno":"False",
"Zapdos":"False",
"Moltres":"False",
"Dratini":"False",
"Dragonair":"False",
"Dragonite":"False",
"Mewtwo":"False",
"Mew":"False"
}
}
@kvangent thanks a lot for helping me. I didn't realize "gym" and "gyms" are different things. Everything works great now. Thanks again for taking your time to help me guys!
Problem Description
For some reason "title", "url" and "body" fields has no affect after the most recent git pull. I probably just missing something, but I can't figure out why? The notifications are still using the default text for the tile and body, while my alarms.json look like this:
P.S "startup_message" and "startup_list" fields are working fine.
Your Environment
Operating System: Linux, Ubuntu Python Version: Python 2.7.6 PokeAlarm startup command: python runwebhook.py -k ***
Console Output
Your Alarms Config