Conversion of HPXML to OSM with Python
Hi,
I found an HPXML file and I would like to know how can I convert it into an OSM file using Python. I found this repo https://github.com/NREL/OpenStudio-HP....
However, it seems that the code is in ruby. Is there a Python wrapper or a specific method to access this functionality?
Thanks.




Can you say where your HPXML file came from? There are lots of different flavors of HPXML files (some specifically used for energy modeling, some not).
Hi,
The HPXML file comes from the ResStock dataset, specifically from this location: https://data.openei.org/s3_viewer?buc...
There is a new release (2025) of ResStock building energy models. I only have the .xml file, which is actually an HPXML file. I noticed that there are some tools that can convert this into an .osm file, and I was wondering if there are any Python tools for this conversion.
Thank you !
There is some description of how to do this for an earlier ResStock dataset, but I imagine most of it applies. See here
Thank you ! I will try that and I'll come back.
Thanks again !
Hi, I managed to generate some .osm files by downloading the new resstock datasource and running this :
openstudio path/to/openstudio.exe /path/to/run_analysis.rb -y -u upgrade_name
This generates and executes EnergyPlus runs for all the buildings. However, I am only interested in the .osm building models, the in.schedules.csv files, and the associated TMY/AMY weather files. Is there a way to skip all the simulations and only generate these files? And sort by states ?
Or Should I do it from scratch ?
Sorry for the question if it is too obvious...
Thanks for the help