-
Notifications
You must be signed in to change notification settings - Fork 199
Displaying Pokestops + LuredPokestops #362
base: master
Are you sure you want to change the base?
Conversation
Lured will be showed too. (lure_expiration data only for next 3 minutes available)
Very nice work! Please merge this! |
does this display the lured pokemon from the lured stop? |
Tested it! Very good work! |
@Unknown66 Why does the lure expiration time shows only the next 3 minutes and not his final time expiration ? And i can see that the lures pokemons are not shown. |
I have try this but is not 100% accure pokèstop lures,but shows all pokèstops,thanks for improvement. |
Well, by using the last version with db-support, lured PS are only shown for 2-3 minute. |
Don't know why there's only data for the next 3minutes. There's possibly something wrong with the calculated date inside the db. |
@@ -42,6 +42,7 @@ function pad(num, size) { | |||
document.getElementById('pokemon-checkbox').checked = getFromStorage("displayPokemons", "true"); | |||
document.getElementById('gyms-checkbox').checked = getFromStorage("displayGyms", "true"); | |||
document.getElementById('coverage-checkbox').checked = getFromStorage("displayCoverage", "true"); | |||
document.getElementById('pokestops-checkbox').checked = getFromStorage("displayPokestops", true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change true
to "true"
, it doesn't get recognized so the pokestops are not displayed by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it better to use true or false instead of "true"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, but currently it doesn't work if you use booleans.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I'm using the last version and it's working pretty well (Python 2.7.x)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true
is the right expression there.
But the option pokestops inside app.py
was set to false as default. (for case: not specified in request)
Default is now don't Display-pokestops.
Could it be that there is something wrong in the models.py (line 172 - 193)? Once the pokestop has been seen in lure, within the next scan cycle 'lure_expiration' is set to NULL in the db as well as active_pokemon_id. Either setting l_e and a_p_ip to NULL or the math could be a problem. | last_modified | lure_expiration | active_pokemon_id | 8 minutes later: 8 minutes later: 5 minutes later: 4 minutes later: lure_expiration and active_pokemon_id are NULL between they show up again. |
Ok. @Unknown66: Your code seems to be right.
|
Got it, at least a quick fix: line 176:
|
Seems like you got an older version of this one. In current master its not a temp pokemon_id anymore. |
It should display lured pokestops and remaining time as well. Today’s test was successful. |
Got it. When you want to catch the lured pokemons, add an if / else with new fields beginning at line 180 with your if 'lure_info' in f: code. Best would be to extend or a new the base model for this. |
We've only got to return pokemon inside model.py if pokestop is lured. |
Here we go with a diff. It displays on the map:
|
...and the models.py renamed to .txt for upload.... Before it gets lost: |
Is there a way to get and show the picture of the pokestops? |
Mhh dont know if: And another thought. Please correct me if I missed something. |
Well, maybe I'm wrong, but my understanding is that 'last_modified_timestamp_ms' is the time, when the pokestop has been switched into lure mode. Lure expiration should be 30 minutes later. Even when the scan is detecting the lured pokestop 5min before deactivation, the timestamp is still valid and lure will expire in 5min. Updated pokemons['encounter_id'] to pokemons[f['lure_info']['encounter_id']] . Many thanks!!!! |
Checked it. You're right Will change my code this evening! Thanks for your help 👍 |
@smartcuc can you make a separate PR with your changes? i have yet to getting any working lured pokestop/pokemon working |
@@ -42,6 +42,7 @@ function pad(num, size) { | |||
document.getElementById('pokemon-checkbox').checked = getFromStorage("displayPokemons", "true"); | |||
document.getElementById('gyms-checkbox').checked = getFromStorage("displayGyms", "true"); | |||
document.getElementById('coverage-checkbox').checked = getFromStorage("displayCoverage", "true"); | |||
document.getElementById('pokestops-checkbox').checked = getFromStorage("displayPokestops", false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is still incorrect, shouldn't it be the "false" string instead of a boolean? Just basing off from the code above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, line 45 looks fine to me Line 42, 43 and 44 should be true instead of "true".
The other lines are wrong. Forgot the write this yesterday.. |
#375 fine to use with this to have less traffic. (pokestops need much traffic in citys) |
I dont if someone have the same issue but for only show this http://prntscr.com/cp2ym8 . |
That is normal! |
Displaying Pokestops + LuredPokestops.
(lure_expiration data only for next 3 minutes available.)