I am attempting to import a .d2 file into OpenHistorian to export the data to CSV for a university project.
I have been provided a .d2 file ‘ppa-2021-04-08 22.54.03.163_to_2021-08-17 04.51.13.039-637647726771420351.d2’ and a database file ‘openHistorian.db’.
I can view the metadata from the database file in openHistorian Web Manager, but I’m unable to view or export any of the PMU data. It seems as though openHistorian is unable to locate the PPA .d2 file.
I have the .d2 file saved in C:\Program Files\openHistorian\Archive.
Are there any setups I have missed?
I have also tried exporting the data to CSV using the DataExtractionUtility, but it wants to get the metadata by connecting to a server, and I am not sure how to do that if I am using SQLite locally.
I’d recommend using openHistorian Console to troubleshoot. In many cases, you can just open the console and then use the openHistorian Manager to initialize the PPA adapter on the “Outputs > Historian Instances” screen. The console will automatically display information from the openHistorian service, which may include errors during the initialization process.
The port that the historian is trying to listen on is already in use. Here are a few possible reasons why this might happen.
Another historian instance is configured to use the same port.
Another application or service is configured to use the same port.
Hyper-V sometimes reserves a random range of ports that could conflict with other applications.
An error has caused a lingering instance of the openHistorian archive to hang on to the port beyond the lifetime of the adapter.
I would recommend restarting the openHistorian service using the Services manager in Windows to see if that clears it up. If that doesn’t work, you can also try adding port=12345 to the PPA historian’s connection string, then click Save and Initialize.
Most likely, because you received the openHistorian.db database from a someone who had been archiving data, the database also contains a record that defines the configuration for the data subscriber that was used to retrieve real-time data from another system. You don’t have access to that other system that provides the real-time data so this error is to be expected and should be irrelevant to your goal of retrieving data from the .d2 file.
But when I try to trend or export the data over a valid time period I do not see any data:
(The database file provided to me contains 6205 points, and I don’t know which are relevant to the .d2 file, so I select all.)
My best guesses would be that maybe the file doesn’t have any data for May 5 or that none of the data aligns with the top of a ten-per-second interval. You might need to set up the HistorianDataWalker to see if you can collect information about which specific days between 2021-04-08 and 2021-08-17 actually have data.
I now have 186 .d2 files to which I have directed my working directory, but when I initialise my Phasor Primary Archive, I only see it open 20 of them in my console.
Did you point your working directory to the root of the drive? I can’t say for sure if this is the reason you’re having this issue, but I do recall having my own issues when I did that in the past. Maybe try moving your archive files so they share a common subfolder under the root of the drive and change your working directory to that folder.