jekirl / poketrainer

The original Pokemon Go bot
Other
120 stars 56 forks source link

New Web UI #297

Open xthedeus opened 8 years ago

xthedeus commented 8 years ago

We should implement a new webinterface that's capable of communication directly with the bot.

I've talked with @LarsDR and we're already on this but if anyone would like to join us, please let us know!

Right now we've begun using AngularJS. To communicate with the web.py I suggest that we use sockets (WebSockets in frontend / Flask-SocketIO in backend)

And please join Slack! It's much easier to communicate there 💃

@Myhorta @LarsDR

Myhorta commented 8 years ago

It is a bit of grey area for me but can't you have the backend only feeding the assets, and the frontend pulling all data through a websocket directly connected to the bot?

xthedeus commented 8 years ago

Maybe. I'm not a python pro and I'm not sure how the client is working atm., but such an approach should work. I was writing about it with danny on slack but I'm sure what his username is on github :/

voodoonofx commented 8 years ago

In the develop branch, the bot is now using a message queue to allow sniping. This can be used for many other tasks as well. Consider that the backend (pokecli.py) could simply be a generator pumping messages into a queue, and the actual bot can be a backend consuming messages from this queue. This allows several new possibilities, including controlling the bot via the web interface.

Anything can be a producer of messages. This can be the user clicking to a new location they want the bot to walk to via the web ui. It could be a campaign manager walking from city to city catching as many types as it can. It could be an item farmer changing configuration settings on the fly.

I'm on slack as @voodoonofx if anyone wants to discuss further, but i'd be happy to help when I get back from vacation on Jul 31st.

xthedeus commented 8 years ago

Sounds awesome! @LarsDR has set up a skeleton in angular that I will start creating some templates for tomorrow.

@voodoonofx, you are more than welcome to help us! I think we need someone to create a standard interface that the frontend can use to communicate with the bot. It would be great if the bot could also communicate with the frontend sending messages such as: pokemon x caught using y pokeballs, transfered x pokemon, moving from location x to location y, current location, spinning fort at x location with reward y. All such messages.

I was considering websockets as I do not know any better alternative yet. Looking forward to discuss this with you in slack when you get home from vacation! :-)

jsnanigans commented 8 years ago

I just tested this bot yesterday and before it stopped working (because of niantics update) I noticed that the web ui could use some love, I am quite experienced with Angular(v1) so i'd like to help if I may :)

xthedeus commented 8 years ago

@jsnanigans you're more than welcome to help. What's your username on Slack? :)

xthedeus commented 8 years ago

We will open a PR when sockets have been implemented in web.py for bi-directional communication and some basic messages like "caught a pokemon" etc is working.