Release Trade Dangerous (Est. 2015) Power user's highly configurable trade optimizer

Yes, that is partially correct in that this returns the profile part of the EDAPI output, used for the commander data and the current ship, but TDH2 also requires the shipyard part of the EDAPI output for all the other ships owned by the commander so it won't work as a replacement for EDCD without some modification.
Um, all the ships are included. The full list is in the json right after the detail of the current ship.
I only have the two ships right now, a Cobra Mk. III and a Diamondback Explorer:
Code:
      "ships":{
         "0":{
            "id":0,
            "name":"CobraMkIII",
            "value":{
               "hull":207372,
               "modules":2916240,
               "cargo":0,
               "total":3123612,
               "unloaned":58007
            },
            "free":false,
            "shipName":"calamity jane",
            "shipID":"eye-01",
            "station":{
               "id":3228565248,
               "name":"Elder Hub"
            },
            "starsystem":{
               "id":16065191028137,
               "name":"Mundii",
               "systemaddress":16065191028137
            }
         },
         "2":{
            "id":2,
            "name":"DiamondBackXL",
            "value":{
               "hull":1637277,
               "modules":8433085,
               "cargo":0,
               "total":10070362,
               "unloaned":127728
            },
            "free":false,
            "station":{
               "id":3230484480,
               "name":"Plante Enterprise"
            },
            "starsystem":{
               "id":7230678110946,
               "name":"Miao Thixo",
               "systemaddress":7230678110946
            }
         }
      }
   }
]

The "shipyard" portion of the EDAPI response contains information about the last docked station, there's no information at all about the ships the CMDR owns:
Code:
   "market":{

   },
   "shipyard":{
      "id":3230484480,
      "name":"Plante Enterprise",
      "outpostType":"starport",
      "imported":{
         "128049191":"NaturalFabrics",
         "128049190":"Leather",
         "128049193":"SyntheticFabrics",
         "128049197":"Polymers",
         "128672302":"CeramicComposites",
         "128673850":"HydrogenPeroxide",
         "128049176":"Aluminium",
         "128049226":"HazardousEnvironmentSuits",
         "128049171":"Tantalum",
         "128049172":"Uranium",
         "128673851":"LiquidOxygen",
         "128682044":"ConductiveFabrics",
         "128049175":"Copper",
         "128049155":"Silver",
         "128049177":"Algae",
         "128049174":"Titanium",
         "128671118":"Osmium",
         "128049199":"Semiconductors",
         "128049214":"Beer",
         "128049173":"Lithium",
         "128049166":"Water",
         "128049162":"Cobalt",
         "128049153":"Palladium",
         "128049180":"Grain",
         "128049200":"Superconductors",
         "128673847":"Samarium",
         "128673845":"Praseodymium",
         "128673857":"CoolingHoses",
         "128049170":"Gallium",
         "128049168":"Beryllium",
         "128049178":"FruitAndVegetables",
         "128049227":"Robotics",
         "128049183":"Fish",
         "128049169":"Indium",
         "128049228":"AutoFabricators",
         "128049215":"Wine",
         "128049185":"SyntheticMeat",
         "128673856":"CMMComposite",
         "128049154":"Gold",
         "128673866":"ExhaustManifold",
         "128682046":"AdvancedMedicines",
         "128049213":"Tobacco",
         "128673861":"EmergencyPowerCells",
         "128673855":"InsulatingMembrane",
         "128049236":"NonLethalWeapons",
         "128673873":"MicroControllers",
         "128049243":"Slaves",
         "128049189":"Coffee",
         "128049152":"Platinum",
         "128049235":"ReactiveArmour",
         "128049188":"Tea",
         "128049182":"Animalmeat",
         "128049240":"ConsumerTechnology",
         "128673848":"LowTemperatureDiamond",
         "128049212":"BasicNarcotics",
         "128672306":"BootlegLiquor",
         "128049209":"PerformanceEnhancers",
         "128672123":"WreckageComponents",
         "128049669":"ProgenitorCells",
         "128049670":"CombatStabilisers",
         "128668550":"Painite",
         "128888499":"AncientKey",
         "128732188":"AncientTotem",
         "128732187":"AncientUrn",
         "128732186":"AncientTablet",
         "128732185":"AncientCasket",
         "128732184":"AncientOrb",
         "128732183":"AncientRelic",
         "128672124":"EncriptedDataStorage",
         "128682049":"DataCore",
         "128682051":"MysteriousIdol",
         "128672811":"DamagedEscapePod",
         "128682054":"SpacePioneerRelics",
         "128682055":"FossilRemnants",
         "128666757":"USSCargoRareArtwork",
         "128672810":"UnstableDataCore",
         "128672159":"AntiqueJewellery",
         "128672127":"ComercialSamples",
         "128672128":"TacticalData",
         "128672129":"AssaultPlans",
         "128672130":"EncryptedCorrespondence",
         "128672131":"DiplomaticBag",
         "128672132":"ScientificResearch",
         "128672133":"ScientificSamples",
         "128672315":"GeologicalSamples",
         "128672136":"LargeExplorationDataCash",
         "128672137":"SmallExplorationDataCash",
         "128672134":"PoliticalPrisoner",
         "128672160":"PreciousGems",
         "128672161":"EarthRelics",
         "128672163":"TimeCapsule",
         "128672162":"GeneBank",
         "128672135":"Hostage",
         "128666752":"USSCargoBlackBox",
         "128672126":"PersonalEffects",
         "128672125":"OccupiedCryoPod"
      },
      "exported":{
         "128049218":"WaterPurifiers",
         "128049222":"CropHarvesters",
         "128672309":"BuildingFabricators",
         "128049223":"MarineSupplies",
         "128049248":"Scrap",
         "128049221":"MineralExtractors",
         "128049202":"HydrogenFuel",
         "128672308":"ThermalCoolingUnits",
         "128064028":"AtmosphericExtractors",
         "128049233":"PersonalWeapons",
         "128673860":"HNShockMount",
         "128049238":"DomesticAppliances",
         "128049184":"FoodCartridges",
         "128667728":"ImperialSlaves",
         "128682048":"SurvivalEquipment",
         "128049244":"Biowaste",
         "128049210":"BasicMedicines",
         "128049217":"PowerGenerators",
         "128049241":"Clothing",
         "128672313":"SkimerComponents",
         "128672307":"GeologicalEquipment",
         "128049225":"ComputerComponents",
         "128049234":"BattleWeapons",
         "128049216":"Liquor"
      },
      "services":{
         "dock":"ok",
         "contacts":"ok",
         "exploration":"ok",
         "commodities":"ok",
         "refuel":"ok",
         "repair":"ok",
         "rearm":"ok",
         "crewlounge":"ok",
         "powerplay":"ok",
         "searchrescue":"ok",
         "engineer":"ok",
         "facilitator":"ok",
         "blackmarket":"ok"
      },
      "economies":{
         "35":{
            "name":"Industrial",
            "proportion":1
         }
      }
   }
}

That said, I did find reason to edit the plugin to make it easier for TDH to use:
https://github.com/eyeonus/Trade-Dangerous/commit/fbd5912851c3af340504f9170cc63778e2e7062d
 
Last edited:
I am taking a moderate break from Elite, until the new stuff comes in, so I'm plenty fresh for it. Obviously I'm still going to keep running the server side for TD and you know where to find me if anything breaks so don't worry about my silence/absence. Not going far.
 
Um, all the ships are included. The full list is in the json right after the detail of the current ship.
I only have the two ships right now, a Cobra Mk. III and a Diamondback Explorer:
You are quite correct. My turn to say my bad!

That said, I did find reason to edit the plugin to make it easier for TDH to use:
https://github.com/eyeonus/Trade-Dangerous/commit/fbd5912851c3af340504f9170cc63778e2e7062d
That is great. I'll make a start on using this plugin instead of EDCE in a few days time. Many thanks.

I am taking a moderate break from Elite, until the new stuff comes in, so I'm plenty fresh for it. Obviously I'm still going to keep running the server side for TD and you know where to find me if anything breaks so don't worry about my silence/absence. Not going far.
I have had to curtail my Elite playing time also, the list of things to do has grown much too large to ignore anymore and Elite has taken a back seat as a result.
 
I just noticed Tromador's server hasn't been updating its mirror of the EDDB.io files. This means the listener's update checker method is hanging, which means it's my fault. I'm surprised no one noticed before me, though, since apparently they haven't been updated since 19th September.

I sent a message to Tromador about this, but until he sees the message, updates the listener, and restarts it, you'll want to run the eddblink import plugin with the fallback option to get the daily updates from EDDB.io directly.

This doesn't affect the live listings, btw- that's still being output by the server and updated to the minute, so if you want fully up-to-date data, run once with fallback any day you start playing, then run like normal whenever you want a market update.
 
My brother and I noticed we weren’t getting the listings.csv only listings-live.csv

I thought maybe Mark has done some magic and made it so that we didn’t need it. I knew that was too simple a solution, though! We’ll just wait for Tromador and do your suggestion while we wait.
 
TD has just been updated with a new plugin, called "edmc_batch", which was written by Ryanel - or at least that's the name on Github, no idea what his CMDR name is. ;)

In any case, this plugin is designed to import multiple Elite Dangerous Market Connector .prices files all at once, either by passing it a list of files, a folder containing multiple files, or both. The plugin only works with files that contain one and only one station per file, such as EDMC generates, at this time, although it sounds like Ryanel might be adding the ability to support multiple stations per file at some point in the future.

Running the plugin is simple:

Accepts two options: "files", a ';' separated list of files; and "folder", which contains a single path. For both options, if the folder or any of the files have one or more spaces in the path, the entirety must be enclosed in quotes.

Examples:

trade.py import -P edmc_batch -O files=test.prices
trade.py import -P edmc_batch -O files=test.prices;..\test2\test2.prices
trade.py import -P edmc_batch -O files="test.prices;..\test2\test2.prices;..\test3\test with space.prices"
trade.py import -P edmc_batch -O folder=C:\Users\eyeonus\Documents\EDMC
trade.py import -P edmc_batch -O folder="L:\custom EDMC logging folder"
trade.py import -P edmc_batch -O folder=C:\Users\eyeonus\Documents\EDMC files="test.prices;..\test2\test2.prices;..\test3\test with space.prices"

EDIT: The "Plugins Options" page on the wiki has been updated to include this information.
 
Last edited:
Hi all, I am new here and to ED in general.
I am using this wonderful tool with the helper too (TDH) but I am having issues when I try to use the edmc_batch plugin.
I setted EDMC to output .prices file to a "edmc_prices" folder inside C:\TD\data but when I run
Code:
C:\TD>trade.py import -P edmc_batch -O folder=C:\TD\data\edmc_prices
I get
Code:
PLUGIN ERROR: Not implemented
the edmc_batch plugin is in the plugin folder but for some reason TD doesn't seem to see or like it.

Any ideas on how to let it works?

Thanks! o7 CMDRs
 
*sigh*

Apparently my notifications from this forum haven't been arriving, so I have missed the current thread.

To get things running sooner rather than later, I've restarted the listener as is, so everything should be fine until I have time to update with the new code.

I'll also see if I can't work out what is going on with forum notifications so I don't miss stuff next time.

Eyeonus - i haven't seen a message from you? What did you use to sent it?
 
Updates applied - rebuilding files.

Code:
Exception in thread Thread-3:
Traceback (most recent call last):
  File "./eddblink_listener.py", line 685, in process_messages
    curs.executemany(insStmt, itemList)
sqlite3.OperationalError: attempt to write a readonly database

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/elite/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/home/elite/local/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "./eddblink_listener.py", line 687, in process_messages
    except Error as e:
NameError: name 'Error' is not defined
sqlite3.OperationalError not Error @ 687??
 
Last edited:
We seem to be again doing that thing where listings-live.csv is roughly same size as listings.csv.
 
Last edited:
Yeah, I noticed that too. Hence the flood of commits this morning. :)

EDIT: I should probably say that, while TD has been updated on github, the changes made only affect server deployments- i.e., Tromador. While you can update your TD client if you want, there's no need to do so.
 
Last edited:
Okay.

With many apologies for the late fix and disruption today...

The server is fully updated and working with eyeonus latest fixes.

The listing-live.csv file is much smaller and should contain only the updates to arrive on the server since the latest overnight.

Due to this, we have lost some data from this morning, which will reappear in the database after the overnight cycle is next run. Any new updates are being processed as normal.

I have worked out why I wasn't getting notifications and fixed it.

So, fingers crossed, we are good.
 
On that note- the good news is that the data is only lost on the server, so any data you downloaded before the loss isn't really lost for you.

The bad news is it's about half a day's worth of data, although as Tromador said this is a temporary thing that will go away with the next EDDB.io update, so if you're not reading this the same day it was posted, this no longer applies.

The other good news is that most (I'm guessing) of that lost data has already been rendered obsolete by pilots docking at stations while running EDMC and/or EDDiscovery, thus providing updated data for those stations. :)

EDIT: Oh yes, and the last bit of good news is that listings updates will be much faster now that the listings-live file problem has been fixed, for example:
Code:
>trade.py import -P eddblink -O progbar
NOTE: Downloading file 'listings-live.csv'.
NOTE: Requesting http://elite.ripz.org/files/listings-live.csv
NOTE: Downloaded   0.9MB of gziped data  93.6KB/s
NOTE: Processing market data from listings-live.csv: Start time = 2018-11-25 07:18:13.822884
NOTE: Finished processing market data. End time = 2018-11-25 07:18:16.933494
NOTE: Regenerating .prices file.
NOTE: Import completed.
Took less than a minute from start to finish on my PC.
 
Last edited:
Hi all, I am new here and to ED in general.
I am using this wonderful tool with the helper too (TDH) but I am having issues when I try to use the edmc_batch plugin.
I setted EDMC to output .prices file to a "edmc_prices" folder inside C:\TD\data but when I run
Code:
C:\TD>trade.py import -P edmc_batch -O folder=C:\TD\data\edmc_prices
I get
Code:
PLUGIN ERROR: Not implemented
the edmc_batch plugin is in the plugin folder but for some reason TD doesn't seem to see or like it.

Any ideas on how to let it works?

Thanks! o7 CMDRs
Totally my fault. Update TD and try again, you won't get that error anymore.

(Sorry I took so long to reply, BTW.)
 
Last edited:
Ryanel, I've found a problem in your plugin, please take a look at the PR conversation for details.

In the meantime, if anyone encounters an "Unrecognized item name" error while using the edmc_batch plugin, run it again with -i, as in:
Code:
>trade.py import -i -P edmc_batch -O folder=C:\Users\eyeonus\Documents\EDMC
You'll still get the "Unrecognized item name", but as a warning, not an error, so while that item won't be imported, everything else will.
 
Last edited:
Hi Mark, I hope your list things has reduced enough for you to rejoin us! I have found a minor bug in TDH in that if I copy data from the output window to Save#1, Save#2 or Save#3 tabs the data gets transferred but if it is large enough to need scroll bars to read it, scroll bars do not appear. It is minor in the fact that I can maximise the screen to read it but it is an annoyance. The scroll bars seem to work as expected on the output tab but not the other save tabs. Thanks.
 
Last edited:
Top Bottom