hackgvl / trolley-tracker-api-dot-net

API for tracking Greenville's trolleys with .NET
MIT License
4 stars 6 forks source link

Final server address? #10

Closed agautsc closed 8 years ago

agautsc commented 9 years ago

Hodges and I are going to Greenlink tomorrow morning to update the apps to server info and such. Are we on the production server for the API? Mostly, I'm asking if we change the app info to the current server we're not going to have to go back to Greenlink again to change server info are we?

bikeoid commented 9 years ago

There will be a server upgrade, but the name will not change unless we want to for some reason. To avoid a trip in the future, we can consider our API, Server name, and the login credentials I sent to be the final ones.

[ It would be handy to be able to remotely administer that information but that's not necessary at all since it should rarely change if ever. ]

bikeoid commented 9 years ago

I confirmed that my test Beacon here works with the new server, etc.

ajhodges commented 9 years ago

Can we get a domain name so we don't have to change it in the future? On Aug 20, 2015 6:05 PM, "bikeoid" notifications@github.com wrote:

I confirmed that my test Beacon here works with the new server, etc.

— Reply to this email directly or view it on GitHub https://github.com/codeforgreenville/trolley-tracker-api-dot-net/issues/10#issuecomment-133192779 .

agautsc commented 9 years ago

We have two domains. @jeremywight has the login info for that.

bikeoid commented 9 years ago

Yes - I'll get Jeremy started on creating api.yeahthattrolley.com . I can't promise that it will be ready by tomorrow though; our web host will have to get a time slot to make the conversion. It should take him only a minute though once he gets to it.

jeremywight commented 9 years ago

A record in process

On Aug 20, 2015, at 6:38 PM, bikeoid notifications@github.com wrote:

Yes - I'll get Jeremy started on creating api.yeahthattrolley.com . I can't promise that it will be ready by tomorrow though; our web host will have to get a time slot to make the conversion. It should take him only a minute though once he gets to it.

— Reply to this email directly or view it on GitHub.

bikeoid commented 9 years ago

Everything is live now at http://api.yeahthattrolley.com/ . I've confirmed that the Beacon app also works with the server of api.yeahthattrolley.com

ajhodges commented 9 years ago

@bikeoid not sure how to explain this behavior but we were sending data for Trolley IDs both 5 and 6 and it seemed to be POSTing fine on Android's end, but the map still shows Trolley 5 as being at the BofA building when we were sending our data from the greenlink building at the westend. Can you double check to see if the data is being received on your end? It also would be nice to have a 'last updated' field for each trolley we could look at for debugging

bikeoid commented 9 years ago

At the time they were installed, only trolley 5 was defined, so Trolley 6 didn't get those updates. I later created a Trolley 6 and that's what shows now.

After 5 minutes, they are removed from the active list, so nothing has been received for at least 5 minutes.

agautsc commented 9 years ago

I'm running mine #8 that should be moving Limo Trolley On Aug 21, 2015 11:59 AM, "bikeoid" notifications@github.com wrote:

At the time they were installed, only trolley 5 was defined, so Trolley 6 didn't get those updates. I later created a Trolley 6 and that's what shows now.

After 5 minutes, they are removed from the active list, so nothing has been received for at least 5 minutes.

— Reply to this email directly or view it on GitHub https://github.com/codeforgreenville/trolley-tracker-api-dot-net/issues/10#issuecomment-133473147 .

ajhodges commented 9 years ago

Yeah @agautsc just drove downtown with trolley 8 set and it hasn't moved from his house. The output on his phone looks healthy. You aren't showing anything hitting api.trolley.com, @bikeoid ?

bikeoid commented 9 years ago

I just turned my beacon on at my house and it came alive. Was the server api.trolley.com , or api.yeahthattrolley.com ? The Beacon app should have shown org.appache.http.conn.BasicManagedEntity@xxxxxxxx while it was posting.

bikeoid commented 9 years ago

I don't have access to the server front end yet to diagnose any other problems, such as a password or username issue, and we haven't added any logging yet.

agautsc commented 9 years ago

Best I can tell, the beacon doesn't work if the credentials aren't correct. It seems like it is connecting and sending to the server. On Aug 21, 2015 12:27 PM, "bikeoid" notifications@github.com wrote:

I don't have access to the server front end yet to diagnose any other problems, such as a password or username issue, and we haven't added any logging yet.

— Reply to this email directly or view it on GitHub https://github.com/codeforgreenville/trolley-tracker-api-dot-net/issues/10#issuecomment-133481718 .

bikeoid commented 9 years ago

Is Trolley 5 running the Lunch Link? Trolley 6 did have the correct credentials when it was set up.

ajhodges commented 9 years ago

org.appache.http.conn.BasicManagedEntity means there is an error. It should show a lat lng point on successful POST on the app. We noticed the username you gave us did not need the domain

bikeoid commented 9 years ago

Interesting... I find the exact opposite. When I leave off the domain, I get "Location sent" , but the server rejects it. As I understand it, the server does require the domain for successful authentication.

ajhodges commented 9 years ago

Weird. I'll have to do some debugging when I get back from lunch On Aug 21, 2015 12:47 PM, "bikeoid" notifications@github.com wrote:

Interesting... I find the exact opposite. When I leave off the domain, I get "Location sent" , but the server rejects it. As I understand it, the server does require the domain for successful authentication.

— Reply to this email directly or view it on GitHub https://github.com/codeforgreenville/trolley-tracker-api-dot-net/issues/10#issuecomment-133490595 .

bikeoid commented 9 years ago

One thing I found is that I return an HTTP code of 302 along with the unauthorized text, it probably should be a 401 code in this case.

agautsc commented 9 years ago

Just so we're all on the same page.

This is what beacon looks like when it's running correctly https://goo.gl/photos/DmZ8Npx8AKL77tLu6

My phone and the two trolleys are running with api.yeahthattrolley.com UN TrolleyUpdates (no domain added) PW that I'm not sure is suppose to be shared so I won't.

If any of those things aren't like that in the app the screen returns null like https://goo.gl/photos/ECJYqJNVY8aDFSLcA

That's all I got that might be helpful. The rest is up to the smarter people than me to debug.

Let me know if I can help.

agautsc commented 9 years ago

Also, I'll keep my phone running the app this afternoon to help with the debugging. But I will need to kill it later in the afternoon (430pm or later) for battery and kinda creepy to be tracked reasons. If someone needs it on after that just text me and I'll fire it back up.

ajhodges commented 9 years ago

Weird. I added the domain and it's working now. I don't know why the error dump is happening on a successful POST. Might have to do with the HTTP status codes you are returning or might be a bug with how I'm making the request. I can push an update for the trolley app that hard codes the username and we can see if it picks up on tonight's route On Aug 21, 2015 1:32 PM, "Adam Gautsch" notifications@github.com wrote:

Also, I'll keep my phone running the app this afternoon to help with the debugging. But I will need to kill it later in the afternoon (430pm or later) for battery and kinda creepy to be tracked reasons. If someone needs it on after that just text me and I'll fire it back up.

— Reply to this email directly or view it on GitHub https://github.com/codeforgreenville/trolley-tracker-api-dot-net/issues/10#issuecomment-133505514 .

bikeoid commented 9 years ago

Adam - the Limo beacon is not currently successful because the trolley on the DB Dump page is Gray, not Green: http://api.yeahthattrolley.com/DbVisualizer/index.html . The domain is required.

agautsc commented 9 years ago

Is that something I need to changed or update somewhere?

bikeoid commented 9 years ago

'User' setting should be trolleyupdates@yeahthattrolley.com

Yours is Green now so nothing needs to be changed. It might be because your phone went into power save. I have 'background execution' enabled, but when my tablet went into power save, I got 'null' on my output also.

agautsc commented 9 years ago

I can't help but feel y'all are playing a prank on me. I too saw my icon turn green right after I sent my email and it turned gray again right after Mike sent his follow up.

The login is now, for reasons of magic, does work with the domain on the UN.

Other question, should the API address be http://api.trackthattrolley.com or api.trackthatrolley.com

bikeoid commented 9 years ago

Either API address http://api.trackthattrolley.com or api.trackthatrolley.com are correct in concept, but it depends on how the application uses the settings.

ajhodges commented 9 years ago

Just checked the code, don't put http:// in front.

agautsc commented 9 years ago

How I turned the Limo Icon green.

I logged in to http://tracker.wallinginfosystems.com/Account/Login?ReturnUrl=%2FTrolleys%2FEdit%2F6

I was retracing my steps of how that happened earlier and I remembered I logged into the tracker site and sure enough things went green.

How or why did it turn off? I'm not sure. Is the location reporting. Not sure, I'm currently sitting at my house so I can't test it.

bikeoid commented 9 years ago

I now see how the Green/active is set when starting an edit - this was a mistake in my code, but not related to the other problems.

If you're seeing the org.appache.http.conn.BasicManagedEntity but it's still not going green, then double check the username and password. Username is not case sensitive, but the password is.

ajhodges commented 9 years ago

What is the response code you are returning on a successful update? Right now the app thinks that a 200 OK code is a 'success', which is why it is printing out debug stuff instead of the lat/lng success message. org.apache.http.conn.BasicManagedEntity could also mean an authentication error (or any other HTTP status code other than 200 OK)

bikeoid commented 9 years ago

The response code is a 201, which would explain it. I'll change it to return 200, and also not return a copy of the same record that was just sent.

bikeoid commented 9 years ago

That will go on the server in the next update - probably Monday or Tuesday.

ajhodges commented 9 years ago

Okay. I don't know which response code is 'proper'. I also need to improve the error logging on my side...

agautsc commented 9 years ago

If there are things that can get pushed earlier it would be nice to have the weekend to test the actual Trolley. We only have a couple weekends left. On Aug 21, 2015 4:27 PM, "Adam Hodges" notifications@github.com wrote:

Okay. I don't know which response code is 'proper'. I also need to improve the error logging on my side...

— Reply to this email directly or view it on GitHub https://github.com/codeforgreenville/trolley-tracker-api-dot-net/issues/10#issuecomment-133550952 .

bikeoid commented 9 years ago

It should work today with the right settings - Does the Limo Trolley go green for you now when you enable the beacon app?

ajhodges commented 9 years ago

Yeah the response code update isn't "mission critical". It should work tonight once I hardcode the username and push an update. Just hope the tablets actually auto-update.

agautsc commented 9 years ago

!!!!!!!!!!!!!!!!!!!!!!Adam Hodges level exclamation points!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I uninstalled and re-installed the agent and it's now working. I don't know if something was cached from the oldin' days or something. But whatever the case, Limo Trolley 8 shows up in the right place,

jeremywight commented 9 years ago

I'm so grateful for you all, and all your work. You do realize... We ARE doing this!!! BTW - If you turn your app off Adam, how am I going to track down my drinking buddy. Hahaha ;) On Aug 21, 2015 5:24 PM, "Adam Gautsch" notifications@github.com wrote:

!!!!!!!!!!!!!!!!!!!!!!Adam Hodges level exclamation points!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I uninstalled and re-installed the agent and it's now working. I don't know if something was cached from the oldin' days or something. But whatever the case, Limo Trolley 8 shows up in the right place,

— Reply to this email directly or view it on GitHub https://github.com/codeforgreenville/trolley-tracker-api-dot-net/issues/10#issuecomment-133566994 .

ajhodges commented 9 years ago

Just pushed an APK that should work for the trolleys. Let me know if you guys get an update, but don't force the update (don't open the play store). That way we have a good idea of when the automatic update takes place.

Unfortunately I think one of the 'events' that signals a check for new automatic updates is the device connecting to Wifi, which means the update probably won't get loaded on the trolleys til tomorrow (because they are probably already connected to wifi for the night). Who knows though. I have a dashboard too that I can see when devices get the update, so I should be able to tell when the trolleys have it.

bikeoid commented 9 years ago

My tablet went into deep sleep, and it pulled the update when it came back. Looks good here, and now shows "Location.... " when working.

ajhodges commented 9 years ago

Good to hear!! I just pushed another update because I realized that the background collection service doesn't currently restart after updates. Hopefully we should get some live data tonight!!! (there's your exclamation points @agautsc )

ajhodges commented 9 years ago

Oops. Just realized the trolley starts at 10am today... not sure if my new update will be pushed in time. Might not get data today unless someone gets on a trolley and asks the driver to restart the tablet. We'll see.

ajhodges commented 9 years ago

Everyone check out the map! Live trolley data!

jeremywight commented 9 years ago

This is awesome! We are going to go and see if we can track it down using the app in downtown. Johnmark, we should forward trackthetrolley.com to your site On Aug 22, 2015 11:00 AM, "Adam Hodges" notifications@github.com wrote:

Everyone check out the map! Live trolley data!

— Reply to this email directly or view it on GitHub https://github.com/codeforgreenville/trolley-tracker-api-dot-net/issues/10#issuecomment-133713558 .

Linktheoriginal commented 9 years ago

Updated web app - removed an unneeded call to the api from the server. Added styling for attribution button + popup. Added the ability to have one stop service multiple routes, and to match the color(s) of the routes they service on the stop icon (stripes the colors). This is done based on the lat/lng of the stop. Currently supports up to three routes - waiting on better color choices from the designer.

There's still a bunch of trolleys hanging out around the map - still need to update the API to handle only sending 'active' trolleys. Or, if we add a last date updated to the data, I can filter those out of the data (I think we'll need that data to get the API only returning 'active' trolleys anyway.)

Linktheoriginal commented 9 years ago

Just realized I wasn't using the 'running' filter on the API, doh! Adding it now.

Linktheoriginal commented 9 years ago

Updated web app again, now only displays the running trolleys.

bikeoid commented 9 years ago

Fantastic + string('!',25)! I see that the trolley goes into University Square at times. There was a note from Greenlink that they are now including that on the route, but it was vague when it happens. I don't think this is part of a game route.

jeremywight commented 9 years ago

Yes I rode the route and made notes of the additions and adjustments. There is a single stop located in the University Square. I grabbed a screenshot on that spot so we can add it. This is part of the normal weekend route. Also, since Sat mornings they have the morning market the trolley goes around it. As a rider the biggest issue would be getting the other trolley online, since it past me while I was waiting for the other, and then identifying the direction of travel (if possible) since otherwise if you pulled it up initially you would not know which way it is going, although you would if you continuously watched it).

On Aug 22, 2015, at 3:37 PM, bikeoid notifications@github.com wrote:

Fantastic + string('!',25)! I see that the trolley goes into University Square at times. There was a note from Greenlink that they are now including that on the route, but it was vague when it happens. I don't think this is part of a game route.

— Reply to this email directly or view it on GitHub.