Posts

Showing posts from August, 2019

Rants

All times should be passed in ISO 8601 UTC format especially between APIs from different vendors. Any deviation from ISO 8601 is amateurish. I'm talking to you Microsoft, Samsara, and a whole bunch of others. Localization should only be done at the point it is needed such as displaying it to the user. Whenever I receive something on my phone from someone not in my contacts list, I think "scam" as my second thought after the "what the?" That's not cynical. It's just a sign of the times.

TWF UI and Hours Of Service

I finally got the UI to add drivers to TWF (Tandem Workflow) done. At least I got it to test. It was harder because I tried something new to me: verify unique usernames as you type. This required me to learn how to implement JS Promises because JS is Async. That means JS can return results (null, undefined or default) before the web request to the database returns our desired data. Promises wait for the web results and then continue execution from there. Next on the list, Hours Of Service (HOS). I need to implement HOS for TWF. This includes the standard BOLT HOS and GeoTab. Keep Trucking, a new data provider, will also be added even though I don't know who will write that integration. I got TWF HOS started but now I find myself waiting on Eleos to disable GeoTab in the sandbox so that I can see the HOS card. The HOS card is hidden while GeoTab is active.

A Menu and a Mess

Added a menu link for CFC's editable class-pay table. Pushed a file to the repository for Jerry. Used the wrong branch. Made a mess. had to delete my local copy and re-clone the repository. Everything is all better now. Working to get Transervice's GeoTab account added to Tandem Workflow. Waiting on Eleos to request the login creds.

Notifications and CFC

Today Yellow Cab is reporting a lot of issues receiving notifications. I am switching the affected drivers over to SMS as the reports come in. Oddly, all of the reports are Android users. I think I have finally finished CFC's driver settlement. Meanwhile, I figured out how to get the segment miles using the array of stop ids that are passed into the settlement method. It was so simple that I had to recheck it to make sure I wasn't hallucinating. Eleos sent a message that the configuration options have been copied over to production. El Paso can now start using/testing Tandem Workflow.  I need a list of their driver ids for that. I also need to create a UI or some way to automatically add drivers to TWF.

Drawing circles on maps

I translated GeoTab's JS calc circle example into ColdFusion. We start with the lat and lng of an address. Then we take 1 degree steps around the circle. We could take 15 degree steps by changing the i++ to i = i + 15. Whatever number we use should go into 360 evenly to make it a closed circle. Otherwise, we'd need to do some fancy-schmancy calculating to close the circle. function generateCircleZonePoints(lat, lng, radius) { var earthRadius = 6371000 ; var latitude = lat * ( pi()/ 180 ); // in radians var longitude = lng * ( pi()/ 180 ); var angularDistance = radius / earthRadius; // radius is the radius of the circle we are drawing in meters local .zonePoints = []; Math = createObject( "java" , "java.lang.Math" ); // usage: Math.atan2(javacast("double",firstArg),javacast("double",secondArg)); for ( var i = 0 ; i <= 360 ; i++) { var radians = i * ( pi()/ 180 ); var latitudeRadians = asin

CFC and iPhones

I think I have CFC's settlement completed. I did not have a way to complete the daily minimum for them because our settlement system is load based not date based. There is a way but the amount of work required to implement something they will rarely use is not justified. Still having weird issues with notifications... I need to build a message Id trap to help PushBots troubleshoot it. It mostly seems to be an iPhone issue. Now back to GeoTab. I need to create geofences and rules for those geofences. Here is a JS rule example: api.call("Add", { typeName : "Rule", entity : rule }, function (ruleId) { api.call("Get", { typeName : "Rule", search : {id: ruleId} }, function (r) { console.log("Added rule: ", r); }, function (error) { alert(error); }); }, function (error) { alert(error); });

Bummed out on notifications

I think the Pushbots issue is behind us. I don't know what caused the time-out but they only occurred for about one hour and then our server auto-rebooted. Just finished a conference with GeoTab. Seems we can set-up geo-fences on the fly and use their rules and exceptions system to get the arrive-depart data we need.

Open mouth, insert foot

Since 2:30 PM, PushBots seems to have become unstable. Sometimes timing out after 20 seconds, sometimes not sending messages but responding with 200OK plus a message-id. Looks like the priority of changing providers has just been increased to 01 mission-critical. Now, where is that source code?

Notifications are up and stable

I pushed the changes to the notifications up on Friday night. There have not been any complaints. I'm taking that as good news. Notifications were down for several days this past week because of a series of issues that combined to make a perfect storm. I glad that's behind us. Going forward, I want to change to a provider that's in a closer time zone. Being separated by 8 hours severely hampers getting support in a timely fashion. The people at PushBots are great. They build a custom solution for me in about a day's time. But because of the timezone issue, it took 3 days to implement. The change of providers won't happen overnight. I'm thinking months. I will need to rebuild the mobile app because PushBots is hardwired into the app. There is no way around hardwiring the provider. The device needs to be able to talk to their server directly from the app. Twilio may be the provider I go with because I have been using them for SMS messaging and they have be
This morning I worked on the iDispatcher notification issue. It seems the Google pulled the plug on an API we were using. We now need to update to their new API. I have part of it done. Still a ways to go. In the meantime, I've switched everybody to SMS messaging. 9:07 AM  Reading GeoTab documentation. The goal is auto arrive and depart. I can log in on a device read its data. According to their help forum, sending load information seems a bit archaic. You send a series of "text" messages to the device. One for each stop.  Stop data can contain a sequence as well as a scheduled arrival and a geofence or zone as they call it. Clearing a route, or load as we call it, can only be done from the GeoTab admin interface > Clear all stops.

8-8-2019

Funny, I remember where I was 8/8/88 thanks to Paul Harvey.  I had several go-arounds with PushBots over MusicCity et al, not receiving notifications. Seems they changed their API without telling me. I will need to update iDispatcher to the new API. I hope I can get that done this evening. I know this is making everybody crazy. TandemWF now saves images to S3 MetaData attached is: [redacted] 2 cron jobs will need to be started. - not core Updated fineUploader.cfc to work with those 2 cron jobs. - core Removed Walgreens Anderson bid sheets for Troy. He may need a tool built to do this himself. It seems to be a repeating request. Brandon F said that auto-arrive and depart need to be working on TandemWF before go-live. digging in...

Trans-Loco

Added a link to invoicing for Music City. Fixed US Trans Loco driver pay bug. BOLT Tandem WorkFlow: I have images uploading with boo coo (beaucoup) meta-data. The images come in a zip file with an XML file containing the meta-data. I have all of the pieces together and ready to upload the images to S3 Tomorrow I will complete the "to S3" stuff and removal of aged temp files.

Spireon, Tandem Workflow and GeoTab

12:00 After 8 hours of work, yesterday and today, I finally figured out the trailer naming issue in ULS' Spireon.  1. ULS has 2 Spireon accounts. 2. Some trailers are in both accounts. 3. Trailers have hidden names which only the imported can see as well as public names which the users can see.  What took so long? There was a problem with the access keys for the accounts. Both accounts were using the same access key. I had to delete both keys and request new keys. 1:15 PM I got imaging working in BOLT TandemWorkFlow. Woot! We can now attach meta-data to scanned documents. BTWF things to do: convert the image downloader to ColdFusion. Get GeoTab auto-arrival and departure working - this basically requires a new integration. 4:30 Image downloader complete Next, move images to S3 and register them with the correct company, load, and stop.
iDispatcher: Early this morning, 5- 6 AM, I got the Hill, Corral, and Firing Line polygons displaying on the new Mapbox airport maps. I still need to get the cars to auto-refresh their locations and status on the map. BOLT: 10:04 AM Back to the PDF settlement issue. Jason said he did some work in this realm that may be helpful. The code/methods may be found in settelment.cfc in the same directory. 10:10 Changed my mind. I'm adding POs to BTW stops.   12:00 Hmm, doesn't look good. Jason said scrap it and put pick list of POs and a capture image link in the arrive form instead. 12:09 break for lunch having ho-made veggie soup. 12:26 Investigating POs plus image capture... ...

Eleos and El Paso

Today started out normal enough, I started working on the settlement PDF issue. I was making some headway with it... Then Gayle had to pin me down on how long it will take me to have Tandem Workflow ready to go live for a customer. This makes me cringe because I am absolutely horrible at time estimates and Gayle does not except "I don't know" or anything greater than 2 weeks. So I said "One Week". She was happy with that but I know I have no idea of what I just got myself into. The customer is El Paso Freight. They have a GeoTab contract with T-Mobile which is incompatible with Tandem Workflow, besides, T-Mobile's coverage is spotty at best in the Texas area that El Paso operates. They also have a Rand McNally account which does Hours of Service but is not plug-in-play with Tandem Workflow. Jerry said something about getting Rand's HOS into Tandem Workflow. I'm sure that will take a week by itself. One of the things that needs to be com