

<!--XBRL Document Created with Wdesk from Workiva-->
<!-- -->
<link:linkbase xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <link:roleRef roleURI="http://www.oesx.com/role/AccountsReceivable" xlink:href="oesx-20170930.xsd#AccountsReceivable" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/AccountsReceivableDetails" xlink:href="oesx-20170930.xsd#AccountsReceivableDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/AccountsReceivableTables" xlink:href="oesx-20170930.xsd#AccountsReceivableTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/AccruedExpensesAndOtherLongTermLiabilities" xlink:href="oesx-20170930.xsd#AccruedExpensesAndOtherLongTermLiabilities" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/AccruedExpensesAndOtherLongTermLiabilitiesAccruedExpensesAndOtherDetails" xlink:href="oesx-20170930.xsd#AccruedExpensesAndOtherLongTermLiabilitiesAccruedExpensesAndOtherDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/AccruedExpensesAndOtherLongTermLiabilitiesNarrativeDetails" xlink:href="oesx-20170930.xsd#AccruedExpensesAndOtherLongTermLiabilitiesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/AccruedExpensesAndOtherLongTermLiabilitiesOtherLongTermLiabilitiesDetails" xlink:href="oesx-20170930.xsd#AccruedExpensesAndOtherLongTermLiabilitiesOtherLongTermLiabilitiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/AccruedExpensesAndOtherLongTermLiabilitiesTables" xlink:href="oesx-20170930.xsd#AccruedExpensesAndOtherLongTermLiabilitiesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/AccruedExpensesAndOtherLongTermLiabilitiesWarrantyAccrualDetails" xlink:href="oesx-20170930.xsd#AccruedExpensesAndOtherLongTermLiabilitiesWarrantyAccrualDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/CommitmentsAndContingencies" xlink:href="oesx-20170930.xsd#CommitmentsAndContingencies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/CommitmentsAndContingenciesDetails" xlink:href="oesx-20170930.xsd#CommitmentsAndContingenciesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/DescriptionOfBusiness" xlink:href="oesx-20170930.xsd#DescriptionOfBusiness" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/DocumentAndEntityInformation" xlink:href="oesx-20170930.xsd#DocumentAndEntityInformation" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/IncomeTaxes" xlink:href="oesx-20170930.xsd#IncomeTaxes" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/IncomeTaxesDetails" xlink:href="oesx-20170930.xsd#IncomeTaxesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/IntangibleAssets" xlink:href="oesx-20170930.xsd#IntangibleAssets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/IntangibleAssetsComponentsAndChangesInOtherIntangibleAssetsDetails" xlink:href="oesx-20170930.xsd#IntangibleAssetsComponentsAndChangesInOtherIntangibleAssetsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/IntangibleAssetsFutureAmortizationByFiscalYearDetails" xlink:href="oesx-20170930.xsd#IntangibleAssetsFutureAmortizationByFiscalYearDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/IntangibleAssetsNarrativeDetails" xlink:href="oesx-20170930.xsd#IntangibleAssetsNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/IntangibleAssetsTables" xlink:href="oesx-20170930.xsd#IntangibleAssetsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/Inventories" xlink:href="oesx-20170930.xsd#Inventories" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/InventoriesDetails" xlink:href="oesx-20170930.xsd#InventoriesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/InventoriesTables" xlink:href="oesx-20170930.xsd#InventoriesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/LongTermDebt" xlink:href="oesx-20170930.xsd#LongTermDebt" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/LongTermDebtNarrativeDetails" xlink:href="oesx-20170930.xsd#LongTermDebtNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/LongTermDebtSummaryOfLongTermDebtDetails" xlink:href="oesx-20170930.xsd#LongTermDebtSummaryOfLongTermDebtDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/LongTermDebtTables" xlink:href="oesx-20170930.xsd#LongTermDebtTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/NetLossPerCommonShare" xlink:href="oesx-20170930.xsd#NetLossPerCommonShare" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/NetLossPerCommonShareEarningsPerShareDetails" xlink:href="oesx-20170930.xsd#NetLossPerCommonShareEarningsPerShareDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/NetLossPerCommonSharePotentiallyDilutiveSecuritiesDetails" xlink:href="oesx-20170930.xsd#NetLossPerCommonSharePotentiallyDilutiveSecuritiesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/NetLossPerCommonShareTables" xlink:href="oesx-20170930.xsd#NetLossPerCommonShareTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/OtherLongTermAssets" xlink:href="oesx-20170930.xsd#OtherLongTermAssets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/OtherLongTermAssetsSummaryOfOtherLongTermAssetsDetails" xlink:href="oesx-20170930.xsd#OtherLongTermAssetsSummaryOfOtherLongTermAssetsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/OtherLongTermAssetsTables" xlink:href="oesx-20170930.xsd#OtherLongTermAssetsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/PrepaidExpensesAndOtherCurrentAssets" xlink:href="oesx-20170930.xsd#PrepaidExpensesAndOtherCurrentAssets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/PrepaidExpensesAndOtherCurrentAssetsDetails" xlink:href="oesx-20170930.xsd#PrepaidExpensesAndOtherCurrentAssetsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/PrepaidExpensesAndOtherCurrentAssetsTables" xlink:href="oesx-20170930.xsd#PrepaidExpensesAndOtherCurrentAssetsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/PropertyAndEquipment" xlink:href="oesx-20170930.xsd#PropertyAndEquipment" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/PropertyAndEquipmentEquipmentUnderCapitalLeasesDetails" xlink:href="oesx-20170930.xsd#PropertyAndEquipmentEquipmentUnderCapitalLeasesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/PropertyAndEquipmentNarrativeDetails" xlink:href="oesx-20170930.xsd#PropertyAndEquipmentNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/PropertyAndEquipmentSummaryOfPropertyAndEquipmentDetails" xlink:href="oesx-20170930.xsd#PropertyAndEquipmentSummaryOfPropertyAndEquipmentDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/PropertyAndEquipmentTables" xlink:href="oesx-20170930.xsd#PropertyAndEquipmentTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/RelatedPartyTransactions" xlink:href="oesx-20170930.xsd#RelatedPartyTransactions" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/RelatedPartyTransactionsDetails" xlink:href="oesx-20170930.xsd#RelatedPartyTransactionsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/ReorganizationOfBusiness" xlink:href="oesx-20170930.xsd#ReorganizationOfBusiness" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/ReorganizationOfBusinessChangeInReserveDetails" xlink:href="oesx-20170930.xsd#ReorganizationOfBusinessChangeInReserveDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/ReorganizationOfBusinessNarrativeDetails" xlink:href="oesx-20170930.xsd#ReorganizationOfBusinessNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/ReorganizationOfBusinessRestructuringBySegmentDetails" xlink:href="oesx-20170930.xsd#ReorganizationOfBusinessRestructuringBySegmentDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/ReorganizationOfBusinessRestructuringByStatementOfOperationsLocationDetails" xlink:href="oesx-20170930.xsd#ReorganizationOfBusinessRestructuringByStatementOfOperationsLocationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/ReorganizationOfBusinessTables" xlink:href="oesx-20170930.xsd#ReorganizationOfBusinessTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/Segments" xlink:href="oesx-20170930.xsd#Segments" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/SegmentsDetails" xlink:href="oesx-20170930.xsd#SegmentsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/SegmentsTables" xlink:href="oesx-20170930.xsd#SegmentsTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/ShareholdersEquity" xlink:href="oesx-20170930.xsd#ShareholdersEquity" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/ShareholdersEquityDetails" xlink:href="oesx-20170930.xsd#ShareholdersEquityDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/ShareholdersEquityTables" xlink:href="oesx-20170930.xsd#ShareholdersEquityTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/StockOptionsAndRestrictedShares" xlink:href="oesx-20170930.xsd#StockOptionsAndRestrictedShares" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/StockOptionsAndRestrictedSharesNarrativeDetails" xlink:href="oesx-20170930.xsd#StockOptionsAndRestrictedSharesNarrativeDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/StockOptionsAndRestrictedSharesRestrictedSharesAndStockOptionsDetails" xlink:href="oesx-20170930.xsd#StockOptionsAndRestrictedSharesRestrictedSharesAndStockOptionsDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/StockOptionsAndRestrictedSharesStockBasedCompensationDetails" xlink:href="oesx-20170930.xsd#StockOptionsAndRestrictedSharesStockBasedCompensationDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/StockOptionsAndRestrictedSharesTables" xlink:href="oesx-20170930.xsd#StockOptionsAndRestrictedSharesTables" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/SubsequentEvents" xlink:href="oesx-20170930.xsd#SubsequentEvents" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/SummaryOfSignificantAccountingPolicies" xlink:href="oesx-20170930.xsd#SummaryOfSignificantAccountingPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/SummaryOfSignificantAccountingPoliciesDetails" xlink:href="oesx-20170930.xsd#SummaryOfSignificantAccountingPoliciesDetails" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/SummaryOfSignificantAccountingPoliciesPolicies" xlink:href="oesx-20170930.xsd#SummaryOfSignificantAccountingPoliciesPolicies" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/UnauditedCondensedConsolidatedBalanceSheets" xlink:href="oesx-20170930.xsd#UnauditedCondensedConsolidatedBalanceSheets" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/UnauditedCondensedConsolidatedBalanceSheetsParenthetical" xlink:href="oesx-20170930.xsd#UnauditedCondensedConsolidatedBalanceSheetsParenthetical" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/UnauditedCondensedConsolidatedStatementsOfCashFlows" xlink:href="oesx-20170930.xsd#UnauditedCondensedConsolidatedStatementsOfCashFlows" xlink:type="simple" />
  <link:roleRef roleURI="http://www.oesx.com/role/UnauditedCondensedConsolidatedStatementsOfOperations" xlink:href="oesx-20170930.xsd#UnauditedCondensedConsolidatedStatementsOfOperations" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member" xlink:type="simple" />
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension" xlink:type="simple" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/AccountsReceivable" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/AccountsReceivableDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/AccountsReceivableTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/AccruedExpensesAndOtherLongTermLiabilities" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/AccruedExpensesAndOtherLongTermLiabilitiesAccruedExpensesAndOtherDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/AccruedExpensesAndOtherLongTermLiabilitiesNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentReportingInformationLineItems" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_6AF24D5C51CC53D6ABA71026CA4F6FF2" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_964259352F925F6F95CBB70151EC1EB5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_6AF24D5C51CC53D6ABA71026CA4F6FF2" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_964259352F925F6F95CBB70151EC1EB5" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_9ACFE0C6744154EEAD2DFA35CF7800D0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_964259352F925F6F95CBB70151EC1EB5" xlink:to="loc_us-gaap_RangeAxis_9ACFE0C6744154EEAD2DFA35CF7800D0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_1C7AADB64CA9AC0E953861C0FEA930D9_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_9ACFE0C6744154EEAD2DFA35CF7800D0" xlink:to="loc_us-gaap_RangeMember_1C7AADB64CA9AC0E953861C0FEA930D9_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_5DB32E7A54EF5D09B5D25D373658F80E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_9ACFE0C6744154EEAD2DFA35CF7800D0" xlink:to="loc_us-gaap_RangeMember_5DB32E7A54EF5D09B5D25D373658F80E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_C1B1AEE73BD75D8F9D3D0D252A7D1F5F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_5DB32E7A54EF5D09B5D25D373658F80E" xlink:to="loc_us-gaap_MinimumMember_C1B1AEE73BD75D8F9D3D0D252A7D1F5F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_5A9D3FB6CB995D83BE1109CAD21ED1BA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_5DB32E7A54EF5D09B5D25D373658F80E" xlink:to="loc_us-gaap_MaximumMember_5A9D3FB6CB995D83BE1109CAD21ED1BA" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_LimitedProductWarrantyTerm" xlink:label="loc_oesx_LimitedProductWarrantyTerm_19ABA74FA2AA5E6A9E10BA5412262C07" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_6AF24D5C51CC53D6ABA71026CA4F6FF2" xlink:to="loc_oesx_LimitedProductWarrantyTerm_19ABA74FA2AA5E6A9E10BA5412262C07" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/AccruedExpensesAndOtherLongTermLiabilitiesOtherLongTermLiabilitiesDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/AccruedExpensesAndOtherLongTermLiabilitiesTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/AccruedExpensesAndOtherLongTermLiabilitiesWarrantyAccrualDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/CommitmentsAndContingencies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/CommitmentsAndContingenciesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongTermPurchaseCommitmentLineItems" xlink:label="loc_us-gaap_LongTermPurchaseCommitmentLineItems_D258D6A73A59715C8BAC73B923EECAB5" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongTermPurchaseCommitmentTable" xlink:label="loc_us-gaap_LongTermPurchaseCommitmentTable_E49DC6DD85384281FBFA73B923EDDBA2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LongTermPurchaseCommitmentLineItems_D258D6A73A59715C8BAC73B923EECAB5" xlink:to="loc_us-gaap_LongTermPurchaseCommitmentTable_E49DC6DD85384281FBFA73B923EDDBA2" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SaleLeasebackTransactionDescriptionAxis" xlink:label="loc_us-gaap_SaleLeasebackTransactionDescriptionAxis_0BD4C596D2D6CFD978CD73B923EDAF03" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LongTermPurchaseCommitmentTable_E49DC6DD85384281FBFA73B923EDDBA2" xlink:to="loc_us-gaap_SaleLeasebackTransactionDescriptionAxis_0BD4C596D2D6CFD978CD73B923EDAF03" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SaleLeasebackTransactionNameDomain" xlink:label="loc_us-gaap_SaleLeasebackTransactionNameDomain_B78413F9A17D60D14E7573B923EDBD31_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SaleLeasebackTransactionDescriptionAxis_0BD4C596D2D6CFD978CD73B923EDAF03" xlink:to="loc_us-gaap_SaleLeasebackTransactionNameDomain_B78413F9A17D60D14E7573B923EDBD31_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SaleLeasebackTransactionNameDomain" xlink:label="loc_us-gaap_SaleLeasebackTransactionNameDomain_B78413F9A17D60D14E7573B923EDBD31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SaleLeasebackTransactionDescriptionAxis_0BD4C596D2D6CFD978CD73B923EDAF03" xlink:to="loc_us-gaap_SaleLeasebackTransactionNameDomain_B78413F9A17D60D14E7573B923EDBD31" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_ManitowocManufacturingAndDistributionFacilityMember" xlink:label="loc_oesx_ManitowocManufacturingAndDistributionFacilityMember_59FCA4BA1DD7B5DFD5D273B923ED1422" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SaleLeasebackTransactionNameDomain_B78413F9A17D60D14E7573B923EDBD31" xlink:to="loc_oesx_ManitowocManufacturingAndDistributionFacilityMember_59FCA4BA1DD7B5DFD5D273B923ED1422" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeTaxAuthorityAxis" xlink:label="loc_us-gaap_IncomeTaxAuthorityAxis_B9B21CFBFFC81C776FEF73B923EDBE74" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LongTermPurchaseCommitmentTable_E49DC6DD85384281FBFA73B923EDDBA2" xlink:to="loc_us-gaap_IncomeTaxAuthorityAxis_B9B21CFBFFC81C776FEF73B923EDBE74" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeTaxAuthorityDomain" xlink:label="loc_us-gaap_IncomeTaxAuthorityDomain_966D1FF7FD0C9907D51273B923EDA98C_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeTaxAuthorityAxis_B9B21CFBFFC81C776FEF73B923EDBE74" xlink:to="loc_us-gaap_IncomeTaxAuthorityDomain_966D1FF7FD0C9907D51273B923EDA98C_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeTaxAuthorityDomain" xlink:label="loc_us-gaap_IncomeTaxAuthorityDomain_966D1FF7FD0C9907D51273B923EDA98C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeTaxAuthorityAxis_B9B21CFBFFC81C776FEF73B923EDBE74" xlink:to="loc_us-gaap_IncomeTaxAuthorityDomain_966D1FF7FD0C9907D51273B923EDA98C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StateAndLocalJurisdictionMember" xlink:label="loc_us-gaap_StateAndLocalJurisdictionMember_63EC9DC9B7522686D4BC73B923EDB0D5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxAuthorityDomain_966D1FF7FD0C9907D51273B923EDA98C" xlink:to="loc_us-gaap_StateAndLocalJurisdictionMember_63EC9DC9B7522686D4BC73B923EDB0D5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeTaxAuthorityNameAxis" xlink:label="loc_us-gaap_IncomeTaxAuthorityNameAxis_F5808D2CBD16C2DDEB0B73B923EE0270" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LongTermPurchaseCommitmentTable_E49DC6DD85384281FBFA73B923EDDBA2" xlink:to="loc_us-gaap_IncomeTaxAuthorityNameAxis_F5808D2CBD16C2DDEB0B73B923EE0270" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeTaxAuthorityNameDomain" xlink:label="loc_us-gaap_IncomeTaxAuthorityNameDomain_A63E15FC660E1AC7257773B923EEDD87_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeTaxAuthorityNameAxis_F5808D2CBD16C2DDEB0B73B923EE0270" xlink:to="loc_us-gaap_IncomeTaxAuthorityNameDomain_A63E15FC660E1AC7257773B923EEDD87_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeTaxAuthorityNameDomain" xlink:label="loc_us-gaap_IncomeTaxAuthorityNameDomain_A63E15FC660E1AC7257773B923EEDD87" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeTaxAuthorityNameAxis_F5808D2CBD16C2DDEB0B73B923EE0270" xlink:to="loc_us-gaap_IncomeTaxAuthorityNameDomain_A63E15FC660E1AC7257773B923EEDD87" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_WisconsinDepartmentOfRevenueMember" xlink:label="loc_oesx_WisconsinDepartmentOfRevenueMember_D268692A1A1A0949F3EA73B923EEB729" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxAuthorityNameDomain_A63E15FC660E1AC7257773B923EEDD87" xlink:to="loc_oesx_WisconsinDepartmentOfRevenueMember_D268692A1A1A0949F3EA73B923EEB729" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SaleLeasebackTransactionGrossProceedsInvestingActivities" xlink:label="loc_us-gaap_SaleLeasebackTransactionGrossProceedsInvestingActivities_04FA972CE90E9ED4310073B923EEB183" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongTermPurchaseCommitmentLineItems_D258D6A73A59715C8BAC73B923EECAB5" xlink:to="loc_us-gaap_SaleLeasebackTransactionGrossProceedsInvestingActivities_04FA972CE90E9ED4310073B923EEB183" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LossContingencyClaimsDismissedNumber" xlink:label="loc_us-gaap_LossContingencyClaimsDismissedNumber_B55BAE099D33228E8AD973B923EEFEC6" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongTermPurchaseCommitmentLineItems_D258D6A73A59715C8BAC73B923EECAB5" xlink:to="loc_us-gaap_LossContingencyClaimsDismissedNumber_B55BAE099D33228E8AD973B923EEFEC6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeTaxExaminationLiabilityRefundAdjustmentFromSettlementWithTaxingAuthority" xlink:label="loc_us-gaap_IncomeTaxExaminationLiabilityRefundAdjustmentFromSettlementWithTaxingAuthority_A20B860321310BE41B6173B923EE917B" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongTermPurchaseCommitmentLineItems_D258D6A73A59715C8BAC73B923EECAB5" xlink:to="loc_us-gaap_IncomeTaxExaminationLiabilityRefundAdjustmentFromSettlementWithTaxingAuthority_A20B860321310BE41B6173B923EE917B" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/DescriptionOfBusiness" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/DocumentAndEntityInformation" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/IncomeTaxes" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/IncomeTaxesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingLossCarryforwardsLineItems" xlink:label="loc_us-gaap_OperatingLossCarryforwardsLineItems_EA79048DE01E3DA54FD47828E3EAB5F5" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingLossCarryforwardsTable" xlink:label="loc_us-gaap_OperatingLossCarryforwardsTable_CBE4A7164648D4534BF47828E3EAC43A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_OperatingLossCarryforwardsLineItems_EA79048DE01E3DA54FD47828E3EAB5F5" xlink:to="loc_us-gaap_OperatingLossCarryforwardsTable_CBE4A7164648D4534BF47828E3EAC43A" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeTaxAuthorityAxis" xlink:label="loc_us-gaap_IncomeTaxAuthorityAxis_3BAD6B51C31EFACE65BE7828E3EA0A92" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_OperatingLossCarryforwardsTable_CBE4A7164648D4534BF47828E3EAC43A" xlink:to="loc_us-gaap_IncomeTaxAuthorityAxis_3BAD6B51C31EFACE65BE7828E3EA0A92" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeTaxAuthorityDomain" xlink:label="loc_us-gaap_IncomeTaxAuthorityDomain_62F40DE481F42AA6BC707828E3EADD31_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeTaxAuthorityAxis_3BAD6B51C31EFACE65BE7828E3EA0A92" xlink:to="loc_us-gaap_IncomeTaxAuthorityDomain_62F40DE481F42AA6BC707828E3EADD31_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeTaxAuthorityDomain" xlink:label="loc_us-gaap_IncomeTaxAuthorityDomain_62F40DE481F42AA6BC707828E3EADD31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeTaxAuthorityAxis_3BAD6B51C31EFACE65BE7828E3EA0A92" xlink:to="loc_us-gaap_IncomeTaxAuthorityDomain_62F40DE481F42AA6BC707828E3EADD31" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DomesticCountryMember" xlink:label="loc_us-gaap_DomesticCountryMember_CB02DFF8501DAC67C6947828E3EAA705" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxAuthorityDomain_62F40DE481F42AA6BC707828E3EADD31" xlink:to="loc_us-gaap_DomesticCountryMember_CB02DFF8501DAC67C6947828E3EAA705" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StateAndLocalJurisdictionMember" xlink:label="loc_us-gaap_StateAndLocalJurisdictionMember_2830D1353E0F64A7B3FC7828E3EAB3F4" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxAuthorityDomain_62F40DE481F42AA6BC707828E3EADD31" xlink:to="loc_us-gaap_StateAndLocalJurisdictionMember_2830D1353E0F64A7B3FC7828E3EAB3F4" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_IncomeTaxTextualAbstract" xlink:label="loc_oesx_IncomeTaxTextualAbstract_A7D3D1A5479410A45AF17828E3EA459B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OperatingLossCarryforwardsLineItems_EA79048DE01E3DA54FD47828E3EAB5F5" xlink:to="loc_oesx_IncomeTaxTextualAbstract_A7D3D1A5479410A45AF17828E3EA459B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EffectiveIncomeTaxRateContinuingOperations" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_7C90485152445C3B53A57828E3EAFBC9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_oesx_IncomeTaxTextualAbstract_A7D3D1A5479410A45AF17828E3EA459B" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateContinuingOperations_7C90485152445C3B53A57828E3EAFBC9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingLossCarryforwards" xlink:label="loc_us-gaap_OperatingLossCarryforwards_9118C0E6C7B0B89828227828E3EABD41" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_oesx_IncomeTaxTextualAbstract_A7D3D1A5479410A45AF17828E3EA459B" xlink:to="loc_us-gaap_OperatingLossCarryforwards_9118C0E6C7B0B89828227828E3EABD41" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TaxCreditCarryforwardAmount" xlink:label="loc_us-gaap_TaxCreditCarryforwardAmount_D38F6FF6D4E600853BA47828E3EB1C6D" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_oesx_IncomeTaxTextualAbstract_A7D3D1A5479410A45AF17828E3EA459B" xlink:to="loc_us-gaap_TaxCreditCarryforwardAmount_D38F6FF6D4E600853BA47828E3EB1C6D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ValuationAllowanceDeferredTaxAssetChangeInAmount" xlink:label="loc_us-gaap_ValuationAllowanceDeferredTaxAssetChangeInAmount_B016941058E52BBEF6F37828E3EB686B" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_oesx_IncomeTaxTextualAbstract_A7D3D1A5479410A45AF17828E3EA459B" xlink:to="loc_us-gaap_ValuationAllowanceDeferredTaxAssetChangeInAmount_B016941058E52BBEF6F37828E3EB686B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_UnrecognizedTaxBenefits" xlink:label="loc_us-gaap_UnrecognizedTaxBenefits_066B60303BCB40AF08787828E3EBD61E" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_oesx_IncomeTaxTextualAbstract_A7D3D1A5479410A45AF17828E3EA459B" xlink:to="loc_us-gaap_UnrecognizedTaxBenefits_066B60303BCB40AF08787828E3EBD61E" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/IntangibleAssets" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/IntangibleAssetsComponentsAndChangesInOtherIntangibleAssetsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsLineItems" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_A0E7745E62505EF5874F63C36CD4E208" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable" xlink:label="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_481CB972D3A75F2FB68A9600D97A776C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_A0E7745E62505EF5874F63C36CD4E208" xlink:to="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_481CB972D3A75F2FB68A9600D97A776C" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_C491CC0DA2C950F1BCB1457656588F33" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_481CB972D3A75F2FB68A9600D97A776C" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_C491CC0DA2C950F1BCB1457656588F33" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_1B109A559CD481E5BD8861C0FEC4FC4C_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_C491CC0DA2C950F1BCB1457656588F33" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_1B109A559CD481E5BD8861C0FEC4FC4C_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_23ACAFD37B0F51C9A8CCB219F93878CA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_C491CC0DA2C950F1BCB1457656588F33" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_23ACAFD37B0F51C9A8CCB219F93878CA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PatentsMember" xlink:label="loc_us-gaap_PatentsMember_263F565909995014B1C8345C22521FF3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_23ACAFD37B0F51C9A8CCB219F93878CA" xlink:to="loc_us-gaap_PatentsMember_263F565909995014B1C8345C22521FF3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LicensingAgreementsMember" xlink:label="loc_us-gaap_LicensingAgreementsMember_E4915ED84F3C5C6F9761DE3DFCED77C4" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_23ACAFD37B0F51C9A8CCB219F93878CA" xlink:to="loc_us-gaap_LicensingAgreementsMember_E4915ED84F3C5C6F9761DE3DFCED77C4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TrademarksAndTradeNamesMember" xlink:label="loc_us-gaap_TrademarksAndTradeNamesMember_CF233453AE945189BA2D82240186F30E" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_23ACAFD37B0F51C9A8CCB219F93878CA" xlink:to="loc_us-gaap_TrademarksAndTradeNamesMember_CF233453AE945189BA2D82240186F30E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CustomerRelationshipsMember" xlink:label="loc_us-gaap_CustomerRelationshipsMember_C7F378DAB0A65FFBAD4599CA5AB5E1F6" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_23ACAFD37B0F51C9A8CCB219F93878CA" xlink:to="loc_us-gaap_CustomerRelationshipsMember_C7F378DAB0A65FFBAD4599CA5AB5E1F6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DevelopedTechnologyRightsMember" xlink:label="loc_us-gaap_DevelopedTechnologyRightsMember_6E8147C058DF5E5C9957A9B109C97255" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_23ACAFD37B0F51C9A8CCB219F93878CA" xlink:to="loc_us-gaap_DevelopedTechnologyRightsMember_6E8147C058DF5E5C9957A9B109C97255" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NoncompeteAgreementsMember" xlink:label="loc_us-gaap_NoncompeteAgreementsMember_BB3066DD74005EAFBE2F4D9817EE8C7B" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_23ACAFD37B0F51C9A8CCB219F93878CA" xlink:to="loc_us-gaap_NoncompeteAgreementsMember_BB3066DD74005EAFBE2F4D9817EE8C7B" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_FiniteLivedAndIndefiniteLivedIntangibleAssetsGross" xlink:label="loc_oesx_FiniteLivedAndIndefiniteLivedIntangibleAssetsGross_12B0D4C876555262B24F077E86C852B9" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_A0E7745E62505EF5874F63C36CD4E208" xlink:to="loc_oesx_FiniteLivedAndIndefiniteLivedIntangibleAssetsGross_12B0D4C876555262B24F077E86C852B9" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_E74B1F0A35F3535486DA56EF2CBE7E8A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_A0E7745E62505EF5874F63C36CD4E208" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_E74B1F0A35F3535486DA56EF2CBE7E8A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_5A1778CDE69A5E86948F7220B104D31F" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_A0E7745E62505EF5874F63C36CD4E208" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_5A1778CDE69A5E86948F7220B104D31F" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/IntangibleAssetsFutureAmortizationByFiscalYearDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/IntangibleAssetsNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentReportingInformationLineItems" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_A5D9F89351040EEE84997479ADD3005A" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_1F11AD3BA478D1F1DE367479ADCDC3CF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_A5D9F89351040EEE84997479ADD3005A" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_1F11AD3BA478D1F1DE367479ADCDC3CF" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_DA28D5374B029A34E0817479ADCE8109" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_1F11AD3BA478D1F1DE367479ADCDC3CF" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_DA28D5374B029A34E0817479ADCE8109" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_F6DE59EE28CC3186D3A97479ADCE6ED5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_DA28D5374B029A34E0817479ADCE8109" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_F6DE59EE28CC3186D3A97479ADCE6ED5_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_F6DE59EE28CC3186D3A97479ADCE6ED5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_DA28D5374B029A34E0817479ADCE8109" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_F6DE59EE28CC3186D3A97479ADCE6ED5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TrademarksAndTradeNamesMember" xlink:label="loc_us-gaap_TrademarksAndTradeNamesMember_FA5CA7962F433CE2A7317479ADCEE585" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_F6DE59EE28CC3186D3A97479ADCE6ED5" xlink:to="loc_us-gaap_TrademarksAndTradeNamesMember_FA5CA7962F433CE2A7317479ADCEE585" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_3FC3BA83FE30812729B07479ADCE355E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_1F11AD3BA478D1F1DE367479ADCDC3CF" xlink:to="loc_us-gaap_RangeAxis_3FC3BA83FE30812729B07479ADCE355E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_34144B77C188BEA5B4277479ADCEED52_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_3FC3BA83FE30812729B07479ADCE355E" xlink:to="loc_us-gaap_RangeMember_34144B77C188BEA5B4277479ADCEED52_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_34144B77C188BEA5B4277479ADCEED52" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_3FC3BA83FE30812729B07479ADCE355E" xlink:to="loc_us-gaap_RangeMember_34144B77C188BEA5B4277479ADCEED52" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_WeightedAverageMember" xlink:label="loc_us-gaap_WeightedAverageMember_CD7F0D5CB4A276303EAA7479ADCE0B3A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_34144B77C188BEA5B4277479ADCEED52" xlink:to="loc_us-gaap_WeightedAverageMember_CD7F0D5CB4A276303EAA7479ADCE0B3A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ImpairmentOfIntangibleAssetsFinitelived" xlink:label="loc_us-gaap_ImpairmentOfIntangibleAssetsFinitelived_6E0329FD4EA295D5BC047479ADD3B2BD" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_A5D9F89351040EEE84997479ADD3005A" xlink:to="loc_us-gaap_ImpairmentOfIntangibleAssetsFinitelived_6E0329FD4EA295D5BC047479ADD3B2BD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetUsefulLife" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_12E18BCF6E133E7BF5B87479ADD3B107" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_A5D9F89351040EEE84997479ADD3005A" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_12E18BCF6E133E7BF5B87479ADD3B107" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/IntangibleAssetsTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/Inventories" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/InventoriesDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/InventoriesTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/LongTermDebt" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/LongTermDebtNarrativeDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditFacilityLineItems" xlink:label="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditFacilityTable" xlink:label="loc_us-gaap_LineOfCreditFacilityTable_74D3DAE20F3672D64646565EC0019F10" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_us-gaap_LineOfCreditFacilityTable_74D3DAE20F3672D64646565EC0019F10" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentAxis" xlink:label="loc_us-gaap_DebtInstrumentAxis_1BB9264FD59723C1B7B6565EC00178DE" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_74D3DAE20F3672D64646565EC0019F10" xlink:to="loc_us-gaap_DebtInstrumentAxis_1BB9264FD59723C1B7B6565EC00178DE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_68B80453DD99E2E6F702565EC0018855_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_1BB9264FD59723C1B7B6565EC00178DE" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_68B80453DD99E2E6F702565EC0018855_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_68B80453DD99E2E6F702565EC0018855" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_1BB9264FD59723C1B7B6565EC00178DE" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_68B80453DD99E2E6F702565EC0018855" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_CreditAgreementMember" xlink:label="loc_oesx_CreditAgreementMember_B1A6D67367496C28CB5A565EC0017BDA" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_68B80453DD99E2E6F702565EC0018855" xlink:to="loc_oesx_CreditAgreementMember_B1A6D67367496C28CB5A565EC0017BDA" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_December2014OTAFinanceProgramMember" xlink:label="loc_oesx_December2014OTAFinanceProgramMember_F312070FCB2A80D6934E565EC00240F4" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_68B80453DD99E2E6F702565EC0018855" xlink:to="loc_oesx_December2014OTAFinanceProgramMember_F312070FCB2A80D6934E565EC00240F4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CreditFacilityAxis" xlink:label="loc_us-gaap_CreditFacilityAxis_3ED81B86693F201091E9565EC0026A44" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_74D3DAE20F3672D64646565EC0019F10" xlink:to="loc_us-gaap_CreditFacilityAxis_3ED81B86693F201091E9565EC0026A44" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_4053318F680F4FB1ADEE565EC00257C5_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_3ED81B86693F201091E9565EC0026A44" xlink:to="loc_us-gaap_CreditFacilityDomain_4053318F680F4FB1ADEE565EC00257C5_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CreditFacilityDomain" xlink:label="loc_us-gaap_CreditFacilityDomain_4053318F680F4FB1ADEE565EC00257C5" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_3ED81B86693F201091E9565EC0026A44" xlink:to="loc_us-gaap_CreditFacilityDomain_4053318F680F4FB1ADEE565EC00257C5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RevolvingCreditFacilityMember" xlink:label="loc_us-gaap_RevolvingCreditFacilityMember_0B48DCDB82F696BC6439565EC0025B77" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_4053318F680F4FB1ADEE565EC00257C5" xlink:to="loc_us-gaap_RevolvingCreditFacilityMember_0B48DCDB82F696BC6439565EC0025B77" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LetterOfCreditMember" xlink:label="loc_us-gaap_LetterOfCreditMember_A8A4D275AE48C899B610565EC00213B6" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_4053318F680F4FB1ADEE565EC00257C5" xlink:to="loc_us-gaap_LetterOfCreditMember_A8A4D275AE48C899B610565EC00213B6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditFacilityAxis" xlink:label="loc_us-gaap_LineOfCreditFacilityAxis_C4A1FED07DD135BA45D4565EC00236AD" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_74D3DAE20F3672D64646565EC0019F10" xlink:to="loc_us-gaap_LineOfCreditFacilityAxis_C4A1FED07DD135BA45D4565EC00236AD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditFacilityLenderDomain" xlink:label="loc_us-gaap_LineOfCreditFacilityLenderDomain_D09F515B20ABE3432DDE565EC002929A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LineOfCreditFacilityAxis_C4A1FED07DD135BA45D4565EC00236AD" xlink:to="loc_us-gaap_LineOfCreditFacilityLenderDomain_D09F515B20ABE3432DDE565EC002929A_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditFacilityLenderDomain" xlink:label="loc_us-gaap_LineOfCreditFacilityLenderDomain_D09F515B20ABE3432DDE565EC002929A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LineOfCreditFacilityAxis_C4A1FED07DD135BA45D4565EC00236AD" xlink:to="loc_us-gaap_LineOfCreditFacilityLenderDomain_D09F515B20ABE3432DDE565EC002929A" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_WellsFargoBankNationalAssociationMember" xlink:label="loc_oesx_WellsFargoBankNationalAssociationMember_E57FE5644846A77E724E565EC0028394" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLenderDomain_D09F515B20ABE3432DDE565EC002929A" xlink:to="loc_oesx_WellsFargoBankNationalAssociationMember_E57FE5644846A77E724E565EC0028394" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_DeLageLandenFinancialServicesInc.Member" xlink:label="loc_oesx_DeLageLandenFinancialServicesInc.Member_561AC045E9186AF777D5565EC002B2A8" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLenderDomain_D09F515B20ABE3432DDE565EC002929A" xlink:to="loc_oesx_DeLageLandenFinancialServicesInc.Member_561AC045E9186AF777D5565EC002B2A8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeAxis" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_074AFE91E92317CE1F80565EC0021B62" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_74D3DAE20F3672D64646565EC0019F10" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_074AFE91E92317CE1F80565EC0021B62" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_30A21D1517045DF54A76565EC0024E16_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_074AFE91E92317CE1F80565EC0021B62" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_30A21D1517045DF54A76565EC0024E16_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_30A21D1517045DF54A76565EC0024E16" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_074AFE91E92317CE1F80565EC0021B62" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_30A21D1517045DF54A76565EC0024E16" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_HarrisSellersNoteMember" xlink:label="loc_oesx_HarrisSellersNoteMember_93DC2B05F38EB6373A64565EC002BFD3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_30A21D1517045DF54A76565EC0024E16" xlink:to="loc_oesx_HarrisSellersNoteMember_93DC2B05F38EB6373A64565EC002BFD3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SecuredDebtMember" xlink:label="loc_us-gaap_SecuredDebtMember_928E2A3661C1E593C908565EC0024D86" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_30A21D1517045DF54A76565EC0024E16" xlink:to="loc_us-gaap_SecuredDebtMember_928E2A3661C1E593C908565EC0024D86" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_June2011OtaFinanceProgramMember" xlink:label="loc_oesx_June2011OtaFinanceProgramMember_E12C24A5FADB67B70581565EC0022A1D" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_30A21D1517045DF54A76565EC0024E16" xlink:to="loc_oesx_June2011OtaFinanceProgramMember_E12C24A5FADB67B70581565EC0022A1D" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_AgreementWithWisconsinDepartmentOfCommerceMember" xlink:label="loc_oesx_AgreementWithWisconsinDepartmentOfCommerceMember_4FF6AC0353370E038D13565EC0029359" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_30A21D1517045DF54A76565EC0024E16" xlink:to="loc_oesx_AgreementWithWisconsinDepartmentOfCommerceMember_4FF6AC0353370E038D13565EC0029359" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_VariableRateAxis" xlink:label="loc_us-gaap_VariableRateAxis_A589D4EE0820C69955BF565EC00239D0" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_74D3DAE20F3672D64646565EC0019F10" xlink:to="loc_us-gaap_VariableRateAxis_A589D4EE0820C69955BF565EC00239D0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_VariableRateDomain" xlink:label="loc_us-gaap_VariableRateDomain_CCE323F221E19FCCE728565EC0025EAF_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_VariableRateAxis_A589D4EE0820C69955BF565EC00239D0" xlink:to="loc_us-gaap_VariableRateDomain_CCE323F221E19FCCE728565EC0025EAF_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_VariableRateDomain" xlink:label="loc_us-gaap_VariableRateDomain_CCE323F221E19FCCE728565EC0025EAF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_VariableRateAxis_A589D4EE0820C69955BF565EC00239D0" xlink:to="loc_us-gaap_VariableRateDomain_CCE323F221E19FCCE728565EC0025EAF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LondonInterbankOfferedRateLIBORMember" xlink:label="loc_us-gaap_LondonInterbankOfferedRateLIBORMember_D67E35E93B8C84AA95C3565EC002F6EB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_CCE323F221E19FCCE728565EC0025EAF" xlink:to="loc_us-gaap_LondonInterbankOfferedRateLIBORMember_D67E35E93B8C84AA95C3565EC002F6EB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ExtinguishmentOfDebtAxis" xlink:label="loc_us-gaap_ExtinguishmentOfDebtAxis_0589AE2DFB03589A7DA6565EC0029033" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_74D3DAE20F3672D64646565EC0019F10" xlink:to="loc_us-gaap_ExtinguishmentOfDebtAxis_0589AE2DFB03589A7DA6565EC0029033" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ExtinguishmentOfDebtTypeDomain" xlink:label="loc_us-gaap_ExtinguishmentOfDebtTypeDomain_85EE862261F8065A5703565EC00308A4_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ExtinguishmentOfDebtAxis_0589AE2DFB03589A7DA6565EC0029033" xlink:to="loc_us-gaap_ExtinguishmentOfDebtTypeDomain_85EE862261F8065A5703565EC00308A4_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ExtinguishmentOfDebtTypeDomain" xlink:label="loc_us-gaap_ExtinguishmentOfDebtTypeDomain_85EE862261F8065A5703565EC00308A4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ExtinguishmentOfDebtAxis_0589AE2DFB03589A7DA6565EC0029033" xlink:to="loc_us-gaap_ExtinguishmentOfDebtTypeDomain_85EE862261F8065A5703565EC00308A4" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CapitalLeaseObligationsMember" xlink:label="loc_us-gaap_CapitalLeaseObligationsMember_07319D2623C71FFBA072565EC00397F7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ExtinguishmentOfDebtTypeDomain_85EE862261F8065A5703565EC00308A4" xlink:to="loc_us-gaap_CapitalLeaseObligationsMember_07319D2623C71FFBA072565EC00397F7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditFacilityCurrentBorrowingCapacity" xlink:label="loc_us-gaap_LineOfCreditFacilityCurrentBorrowingCapacity_8D614AF950079A2A9380565EC003EF2A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_us-gaap_LineOfCreditFacilityCurrentBorrowingCapacity_8D614AF950079A2A9380565EC003EF2A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity" xlink:label="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_EDBEF260AC787FFB2CD4565EC0039514" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_EDBEF260AC787FFB2CD4565EC0039514" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LettersOfCreditOutstandingAmount" xlink:label="loc_us-gaap_LettersOfCreditOutstandingAmount_FE5792302A5D9888FF62565EC00381EA" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_us-gaap_LettersOfCreditOutstandingAmount_FE5792302A5D9888FF62565EC00381EA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongTermLineOfCredit" xlink:label="loc_us-gaap_LongTermLineOfCredit_1954905C942FACB84C6A565EC003F57A" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_us-gaap_LongTermLineOfCredit_1954905C942FACB84C6A565EC003F57A" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_LineOfCreditFacilityAdditionalBorrowingCapacity" xlink:label="loc_oesx_LineOfCreditFacilityAdditionalBorrowingCapacity_2333DD2E88AEFDCAD67F565EC0032911" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_oesx_LineOfCreditFacilityAdditionalBorrowingCapacity_2333DD2E88AEFDCAD67F565EC0032911" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_LineOfCreditFacilityPotentialMaximumBorrowingCapacity" xlink:label="loc_oesx_LineOfCreditFacilityPotentialMaximumBorrowingCapacity_147813F0D21079284474565EC003E307" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_oesx_LineOfCreditFacilityPotentialMaximumBorrowingCapacity_147813F0D21079284474565EC003E307" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_LineOfCreditFacilityCovenantTermsMinimumIndebtednessRatio" xlink:label="loc_oesx_LineOfCreditFacilityCovenantTermsMinimumIndebtednessRatio_10E7544DD299CFD61B04565EC0030624" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_oesx_LineOfCreditFacilityCovenantTermsMinimumIndebtednessRatio_10E7544DD299CFD61B04565EC0030624" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentBasisSpreadOnVariableRate1" xlink:label="loc_us-gaap_DebtInstrumentBasisSpreadOnVariableRate1_771445B6084AB0430EA5565EC0030BA0" xlink:type="locator" />
    <link:definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_us-gaap_DebtInstrumentBasisSpreadOnVariableRate1_771445B6084AB0430EA5565EC0030BA0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentPeriodicPaymentInterest" xlink:label="loc_us-gaap_DebtInstrumentPeriodicPaymentInterest_A92BC6997F40B571301C565EC00344BA" xlink:type="locator" />
    <link:definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_us-gaap_DebtInstrumentPeriodicPaymentInterest_A92BC6997F40B571301C565EC00344BA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentInterestRateEffectivePercentage" xlink:label="loc_us-gaap_DebtInstrumentInterestRateEffectivePercentage_3EA3496624327D41C927565EC003F260" xlink:type="locator" />
    <link:definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_us-gaap_DebtInstrumentInterestRateEffectivePercentage_3EA3496624327D41C927565EC003F260" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LineOfCreditFacilityUnusedCapacityCommitmentFeePercentage" xlink:label="loc_us-gaap_LineOfCreditFacilityUnusedCapacityCommitmentFeePercentage_6BA45E6A4840DD130F11565EC003DFE1" xlink:type="locator" />
    <link:definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_us-gaap_LineOfCreditFacilityUnusedCapacityCommitmentFeePercentage_6BA45E6A4840DD130F11565EC003DFE1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentFaceAmount" xlink:label="loc_us-gaap_DebtInstrumentFaceAmount_16ECF10784891F25357B565EC0032172" xlink:type="locator" />
    <link:definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_us-gaap_DebtInstrumentFaceAmount_16ECF10784891F25357B565EC0032172" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentInterestRateStatedPercentage" xlink:label="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_3073AFF07FA16BCAC9FF565EC0037172" xlink:type="locator" />
    <link:definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_3073AFF07FA16BCAC9FF565EC0037172" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentCarryingAmount" xlink:label="loc_us-gaap_DebtInstrumentCarryingAmount_F39FA69A634CF8FB1EE8565EC003FA0F" xlink:type="locator" />
    <link:definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_us-gaap_DebtInstrumentCarryingAmount_F39FA69A634CF8FB1EE8565EC003FA0F" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_DebtInstrumentBuyoutOption" xlink:label="loc_oesx_DebtInstrumentBuyoutOption_6907DD6C762CA9159161565EC003CD2E" xlink:type="locator" />
    <link:definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_oesx_DebtInstrumentBuyoutOption_6907DD6C762CA9159161565EC003CD2E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SecuredDebt" xlink:label="loc_us-gaap_SecuredDebt_8F8C00E5603CA27C7E0F565EC003909C" xlink:type="locator" />
    <link:definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_us-gaap_SecuredDebt_8F8C00E5603CA27C7E0F565EC003909C" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_DebtInstrumentNumberOfContractsForCollateral" xlink:label="loc_oesx_DebtInstrumentNumberOfContractsForCollateral_E5BCDD6F47B013B6F3CC565EC003FEC8" xlink:type="locator" />
    <link:definitionArc order="17" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_oesx_DebtInstrumentNumberOfContractsForCollateral_E5BCDD6F47B013B6F3CC565EC003FEC8" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_PeriodOfTimeWithoutInterestAccruingOrPrincipalPaymentsDue" xlink:label="loc_oesx_PeriodOfTimeWithoutInterestAccruingOrPrincipalPaymentsDue_B87B38B385EC7A7AF2F2565EC00301A0" xlink:type="locator" />
    <link:definitionArc order="18" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_oesx_PeriodOfTimeWithoutInterestAccruingOrPrincipalPaymentsDue_B87B38B385EC7A7AF2F2565EC00301A0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentPeriodicPayment" xlink:label="loc_us-gaap_DebtInstrumentPeriodicPayment_41854CBB57248357BF6F565EC00446B6" xlink:type="locator" />
    <link:definitionArc order="19" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_D087EC230D9859B8843C565EC0032E29" xlink:to="loc_us-gaap_DebtInstrumentPeriodicPayment_41854CBB57248357BF6F565EC00446B6" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/LongTermDebtSummaryOfLongTermDebtDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ExtinguishmentOfDebtLineItems" xlink:label="loc_us-gaap_ExtinguishmentOfDebtLineItems_09B28AEE35B45C99A49C5BC57B866BF0" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfExtinguishmentOfDebtTable" xlink:label="loc_us-gaap_ScheduleOfExtinguishmentOfDebtTable_4B81B416DC8250BA8CCB59523F9CEADF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ExtinguishmentOfDebtLineItems_09B28AEE35B45C99A49C5BC57B866BF0" xlink:to="loc_us-gaap_ScheduleOfExtinguishmentOfDebtTable_4B81B416DC8250BA8CCB59523F9CEADF" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeAxis" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_CDBDD4A8ED7D54918DF9120A019ACF66" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfExtinguishmentOfDebtTable_4B81B416DC8250BA8CCB59523F9CEADF" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_CDBDD4A8ED7D54918DF9120A019ACF66" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_04B19B6CF07B6B00496B7581243BE8AA_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_CDBDD4A8ED7D54918DF9120A019ACF66" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_04B19B6CF07B6B00496B7581243BE8AA_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_F1A7831D196F5FF68B5F6A019422CDB8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_CDBDD4A8ED7D54918DF9120A019ACF66" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_F1A7831D196F5FF68B5F6A019422CDB8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RevolvingCreditFacilityMember" xlink:label="loc_us-gaap_RevolvingCreditFacilityMember_A1C2F14BB89C533B8FB327EB8ABA9C76" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_F1A7831D196F5FF68B5F6A019422CDB8" xlink:to="loc_us-gaap_RevolvingCreditFacilityMember_A1C2F14BB89C533B8FB327EB8ABA9C76" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CapitalLeaseObligationsMember" xlink:label="loc_us-gaap_CapitalLeaseObligationsMember_3BFD8825FB43567DA719F77C951380A1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_F1A7831D196F5FF68B5F6A019422CDB8" xlink:to="loc_us-gaap_CapitalLeaseObligationsMember_3BFD8825FB43567DA719F77C951380A1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentAxis" xlink:label="loc_us-gaap_DebtInstrumentAxis_CCB2D3FEF5FC53E1B5CF727C2AD04D53" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfExtinguishmentOfDebtTable_4B81B416DC8250BA8CCB59523F9CEADF" xlink:to="loc_us-gaap_DebtInstrumentAxis_CCB2D3FEF5FC53E1B5CF727C2AD04D53" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_9F69AF4CA909BA05C6267581243B3E37_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_CCB2D3FEF5FC53E1B5CF727C2AD04D53" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_9F69AF4CA909BA05C6267581243B3E37_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_1CC35A213742513ABBC63F932BF68205" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_CCB2D3FEF5FC53E1B5CF727C2AD04D53" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_1CC35A213742513ABBC63F932BF68205" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_CustomerEquipmentFinanceNotesPayableMember" xlink:label="loc_oesx_CustomerEquipmentFinanceNotesPayableMember_599DCE9E6D0D53FDA9B732D0B1906265" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_1CC35A213742513ABBC63F932BF68205" xlink:to="loc_oesx_CustomerEquipmentFinanceNotesPayableMember_599DCE9E6D0D53FDA9B732D0B1906265" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_OtherLongTermDebtMember" xlink:label="loc_oesx_OtherLongTermDebtMember_88EEF50AFF99516EAEA01179D910BBDF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_1CC35A213742513ABBC63F932BF68205" xlink:to="loc_oesx_OtherLongTermDebtMember_88EEF50AFF99516EAEA01179D910BBDF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongTermDebtByCurrentAndNoncurrentAbstract" xlink:label="loc_us-gaap_LongTermDebtByCurrentAndNoncurrentAbstract_8916C3859295533D82921E870DCF495F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ExtinguishmentOfDebtLineItems_09B28AEE35B45C99A49C5BC57B866BF0" xlink:to="loc_us-gaap_LongTermDebtByCurrentAndNoncurrentAbstract_8916C3859295533D82921E870DCF495F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongTermDebt" xlink:label="loc_us-gaap_LongTermDebt_130CF69F6F2053859124DD0E3BA3DBD8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongTermDebtByCurrentAndNoncurrentAbstract_8916C3859295533D82921E870DCF495F" xlink:to="loc_us-gaap_LongTermDebt_130CF69F6F2053859124DD0E3BA3DBD8" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongTermDebtCurrent" xlink:label="loc_us-gaap_LongTermDebtCurrent_90B018AE83575135B8A7210789F6BDDF" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongTermDebtByCurrentAndNoncurrentAbstract_8916C3859295533D82921E870DCF495F" xlink:to="loc_us-gaap_LongTermDebtCurrent_90B018AE83575135B8A7210789F6BDDF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LongTermDebtNoncurrent" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_BE4D0FBBCE795B8BAD3BA6E848D40CD3" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongTermDebtByCurrentAndNoncurrentAbstract_8916C3859295533D82921E870DCF495F" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_BE4D0FBBCE795B8BAD3BA6E848D40CD3" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/LongTermDebtTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/NetLossPerCommonShare" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/NetLossPerCommonShareEarningsPerShareDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/NetLossPerCommonSharePotentiallyDilutiveSecuritiesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_059AC52F46BD50B98A3330643B4F527B" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable" xlink:label="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_31BA159413C254868F8E06E66E49FBCC" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_059AC52F46BD50B98A3330643B4F527B" xlink:to="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_31BA159413C254868F8E06E66E49FBCC" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_4079E69FD26357EC9A92B0EC32CD0F70" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_31BA159413C254868F8E06E66E49FBCC" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_4079E69FD26357EC9A92B0EC32CD0F70" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AntidilutiveSecuritiesNameDomain" xlink:label="loc_us-gaap_AntidilutiveSecuritiesNameDomain_298A26E56F93E1521FA561C0FE9CF999_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_4079E69FD26357EC9A92B0EC32CD0F70" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_298A26E56F93E1521FA561C0FE9CF999_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AntidilutiveSecuritiesNameDomain" xlink:label="loc_us-gaap_AntidilutiveSecuritiesNameDomain_3E5D7916D54B54B18C8F081ED03443F0" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_4079E69FD26357EC9A92B0EC32CD0F70" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_3E5D7916D54B54B18C8F081ED03443F0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeStockOptionMember" xlink:label="loc_us-gaap_EmployeeStockOptionMember_E790C1B6C6B757F5B2D1FDB935135A1A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesNameDomain_3E5D7916D54B54B18C8F081ED03443F0" xlink:to="loc_us-gaap_EmployeeStockOptionMember_E790C1B6C6B757F5B2D1FDB935135A1A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestrictedStockMember" xlink:label="loc_us-gaap_RestrictedStockMember_39C7AF5BAE865EAD83F35E55AEA9B966" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesNameDomain_3E5D7916D54B54B18C8F081ED03443F0" xlink:to="loc_us-gaap_RestrictedStockMember_39C7AF5BAE865EAD83F35E55AEA9B966" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_806370EAC77955EFA05941666897EC43" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_059AC52F46BD50B98A3330643B4F527B" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_806370EAC77955EFA05941666897EC43" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/NetLossPerCommonShareTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/OtherLongTermAssets" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/OtherLongTermAssetsSummaryOfOtherLongTermAssetsDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/OtherLongTermAssetsTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/PrepaidExpensesAndOtherCurrentAssets" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/PrepaidExpensesAndOtherCurrentAssetsDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/PrepaidExpensesAndOtherCurrentAssetsTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/PropertyAndEquipment" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/PropertyAndEquipmentEquipmentUnderCapitalLeasesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CapitalLeasedAssetsLineItems" xlink:label="loc_us-gaap_CapitalLeasedAssetsLineItems_6C3F6977A21D59AD91CA63179B773294" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfCapitalLeasedAsssetsTable" xlink:label="loc_us-gaap_ScheduleOfCapitalLeasedAsssetsTable_4108FE6F525B584C8641427CFF8486EB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_CapitalLeasedAssetsLineItems_6C3F6977A21D59AD91CA63179B773294" xlink:to="loc_us-gaap_ScheduleOfCapitalLeasedAsssetsTable_4108FE6F525B584C8641427CFF8486EB" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_3B6537EF83515AEAA2835615FFB39706" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfCapitalLeasedAsssetsTable_4108FE6F525B584C8641427CFF8486EB" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_3B6537EF83515AEAA2835615FFB39706" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_4146937C4040B3BC676161C0FECCDF8E_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_3B6537EF83515AEAA2835615FFB39706" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_4146937C4040B3BC676161C0FECCDF8E_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_DBB1DC0E12405156A947ECAD961E2B0B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_3B6537EF83515AEAA2835615FFB39706" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_DBB1DC0E12405156A947ECAD961E2B0B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AssetsHeldUnderCapitalLeasesMember" xlink:label="loc_us-gaap_AssetsHeldUnderCapitalLeasesMember_2D46E59806F25E10A63C0B2871022116" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_DBB1DC0E12405156A947ECAD961E2B0B" xlink:to="loc_us-gaap_AssetsHeldUnderCapitalLeasesMember_2D46E59806F25E10A63C0B2871022116" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentGross" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_79CCF8E246765ED7978240A936A234F2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CapitalLeasedAssetsLineItems_6C3F6977A21D59AD91CA63179B773294" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_79CCF8E246765ED7978240A936A234F2" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_44053BCD6FD05AAF9D5C5DF01486ADEA" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CapitalLeasedAssetsLineItems_6C3F6977A21D59AD91CA63179B773294" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_44053BCD6FD05AAF9D5C5DF01486ADEA" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_89A2FE0FF67F5E0C992FB3D5736677C0" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CapitalLeasedAssetsLineItems_6C3F6977A21D59AD91CA63179B773294" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_89A2FE0FF67F5E0C992FB3D5736677C0" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/PropertyAndEquipmentNarrativeDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/PropertyAndEquipmentSummaryOfPropertyAndEquipmentDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentLineItems" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentLineItems_D2440C24B1055B0BBB36C2FBB0C6887F" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" xlink:label="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_B35D05B7057E50E4BEAF6D1D04FFFB3A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_D2440C24B1055B0BBB36C2FBB0C6887F" xlink:to="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_B35D05B7057E50E4BEAF6D1D04FFFB3A" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_6FC99F6FF208525A964D6A1AB4E58988" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_B35D05B7057E50E4BEAF6D1D04FFFB3A" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_6FC99F6FF208525A964D6A1AB4E58988" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_5B3AE908AD939F7078DB61C0FED0A261_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_6FC99F6FF208525A964D6A1AB4E58988" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_5B3AE908AD939F7078DB61C0FED0A261_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_D09D21D67C0F593C81460D85FCEC9E98" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_6FC99F6FF208525A964D6A1AB4E58988" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_D09D21D67C0F593C81460D85FCEC9E98" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LandImprovementsMember" xlink:label="loc_us-gaap_LandImprovementsMember_4EA5C22C1F9C53358D76D17978FCCA94" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_D09D21D67C0F593C81460D85FCEC9E98" xlink:to="loc_us-gaap_LandImprovementsMember_4EA5C22C1F9C53358D76D17978FCCA94" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_BuildingAndBuildingImprovementsMember" xlink:label="loc_us-gaap_BuildingAndBuildingImprovementsMember_B6194456570750C29179D85E7B64CEE1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_D09D21D67C0F593C81460D85FCEC9E98" xlink:to="loc_us-gaap_BuildingAndBuildingImprovementsMember_B6194456570750C29179D85E7B64CEE1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_FurnitureAndFixturesMember" xlink:label="loc_us-gaap_FurnitureAndFixturesMember_C82CD38CA416512CB2A8D57A79FD779A" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_D09D21D67C0F593C81460D85FCEC9E98" xlink:to="loc_us-gaap_FurnitureAndFixturesMember_C82CD38CA416512CB2A8D57A79FD779A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_LeaseholdImprovementsMember" xlink:label="loc_us-gaap_LeaseholdImprovementsMember_F06BF03195B45DACB4B57DAF14864446" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_D09D21D67C0F593C81460D85FCEC9E98" xlink:to="loc_us-gaap_LeaseholdImprovementsMember_F06BF03195B45DACB4B57DAF14864446" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquipmentLeasedToOtherPartyMember" xlink:label="loc_us-gaap_EquipmentLeasedToOtherPartyMember_5731062308A85853A47DA4CDBD7002DE" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_D09D21D67C0F593C81460D85FCEC9E98" xlink:to="loc_us-gaap_EquipmentLeasedToOtherPartyMember_5731062308A85853A47DA4CDBD7002DE" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EquipmentMember" xlink:label="loc_us-gaap_EquipmentMember_A9631364665B5F879EFD1B0300FB06D0" xlink:type="locator" />
    <link:definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_D09D21D67C0F593C81460D85FCEC9E98" xlink:to="loc_us-gaap_EquipmentMember_A9631364665B5F879EFD1B0300FB06D0" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConstructionInProgressMember" xlink:label="loc_us-gaap_ConstructionInProgressMember_BEA7A314DA3151B8AD22B140E4000B5D" xlink:type="locator" />
    <link:definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_D09D21D67C0F593C81460D85FCEC9E98" xlink:to="loc_us-gaap_ConstructionInProgressMember_BEA7A314DA3151B8AD22B140E4000B5D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNetAbstract" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNetAbstract_0DAA60C5C0245947BBF8DE56E5974104" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_D2440C24B1055B0BBB36C2FBB0C6887F" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNetAbstract_0DAA60C5C0245947BBF8DE56E5974104" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentGross" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_C70618295B635AAD8417C850DA646BFB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNetAbstract_0DAA60C5C0245947BBF8DE56E5974104" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_C70618295B635AAD8417C850DA646BFB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_1C349FE5C449590C949CF587B36E550F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNetAbstract_0DAA60C5C0245947BBF8DE56E5974104" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_1C349FE5C449590C949CF587B36E550F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_CB6D9B8D6A0B5CF99DE2C8BE6697A393" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentNetAbstract_0DAA60C5C0245947BBF8DE56E5974104" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_CB6D9B8D6A0B5CF99DE2C8BE6697A393" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/PropertyAndEquipmentTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/RelatedPartyTransactions" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/RelatedPartyTransactionsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RelatedPartyTransactionLineItems" xlink:label="loc_us-gaap_RelatedPartyTransactionLineItems_EF9F05B8F100CFCC895C54B1FFF21657" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable" xlink:label="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_709D93B32C8C108E6F2854B1FFF22F04" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_EF9F05B8F100CFCC895C54B1FFF21657" xlink:to="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_709D93B32C8C108E6F2854B1FFF22F04" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RelatedPartyTransactionsByRelatedPartyAxis" xlink:label="loc_us-gaap_RelatedPartyTransactionsByRelatedPartyAxis_CF6121E62D0839BC6B4B54B1FFF204C3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_709D93B32C8C108E6F2854B1FFF22F04" xlink:to="loc_us-gaap_RelatedPartyTransactionsByRelatedPartyAxis_CF6121E62D0839BC6B4B54B1FFF204C3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RelatedPartyDomain" xlink:label="loc_us-gaap_RelatedPartyDomain_9C117FEFE6163F9EA28E54B1FFF26706_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RelatedPartyTransactionsByRelatedPartyAxis_CF6121E62D0839BC6B4B54B1FFF204C3" xlink:to="loc_us-gaap_RelatedPartyDomain_9C117FEFE6163F9EA28E54B1FFF26706_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RelatedPartyDomain" xlink:label="loc_us-gaap_RelatedPartyDomain_9C117FEFE6163F9EA28E54B1FFF26706" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RelatedPartyTransactionsByRelatedPartyAxis_CF6121E62D0839BC6B4B54B1FFF204C3" xlink:to="loc_us-gaap_RelatedPartyDomain_9C117FEFE6163F9EA28E54B1FFF26706" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_EntityThatCurrentDirectorOwnsMinorityInterestAndServesAsBoardOfDirectorsChairmanMember" xlink:label="loc_oesx_EntityThatCurrentDirectorOwnsMinorityInterestAndServesAsBoardOfDirectorsChairmanMember_DEDD2B6111330B66A8CC54B1FFF29A6A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyDomain_9C117FEFE6163F9EA28E54B1FFF26706" xlink:to="loc_oesx_EntityThatCurrentDirectorOwnsMinorityInterestAndServesAsBoardOfDirectorsChairmanMember_DEDD2B6111330B66A8CC54B1FFF29A6A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RelatedPartyTransactionPurchasesFromRelatedParty" xlink:label="loc_us-gaap_RelatedPartyTransactionPurchasesFromRelatedParty_A4FC5983F8C553A9AEDC54B1FFF21CB8" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_EF9F05B8F100CFCC895C54B1FFF21657" xlink:to="loc_us-gaap_RelatedPartyTransactionPurchasesFromRelatedParty_A4FC5983F8C553A9AEDC54B1FFF21CB8" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/ReorganizationOfBusiness" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/ReorganizationOfBusinessChangeInReserveDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringCostAndReserveLineItems" xlink:label="loc_us-gaap_RestructuringCostAndReserveLineItems_DE0516C75F4F5F729E0A7CFBCD42D71B" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfRestructuringAndRelatedCostsTable" xlink:label="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_6F46BD2D9E3656928C594A88D37F1D38" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_DE0516C75F4F5F729E0A7CFBCD42D71B" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_6F46BD2D9E3656928C594A88D37F1D38" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringCostAndReserveAxis" xlink:label="loc_us-gaap_RestructuringCostAndReserveAxis_290D452808325C8FA6F15B64CEC42904" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_6F46BD2D9E3656928C594A88D37F1D38" xlink:to="loc_us-gaap_RestructuringCostAndReserveAxis_290D452808325C8FA6F15B64CEC42904" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfRestructuringDomain" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_E23DDDABAFA261B920D17C6694A36DA6_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_290D452808325C8FA6F15B64CEC42904" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_E23DDDABAFA261B920D17C6694A36DA6_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TypeOfRestructuringDomain" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_B6FF0B4A51FB5474B2DF81BD3FF33B8B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_290D452808325C8FA6F15B64CEC42904" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_B6FF0B4A51FB5474B2DF81BD3FF33B8B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeSeveranceMember" xlink:label="loc_us-gaap_EmployeeSeveranceMember_BE1618D7801754F7A843E94975ABC37A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_B6FF0B4A51FB5474B2DF81BD3FF33B8B" xlink:to="loc_us-gaap_EmployeeSeveranceMember_BE1618D7801754F7A843E94975ABC37A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SpecialTerminationBenefitsMember" xlink:label="loc_us-gaap_SpecialTerminationBenefitsMember_858171B8EC0E5003A1A708ED3ADF9D6C" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_B6FF0B4A51FB5474B2DF81BD3FF33B8B" xlink:to="loc_us-gaap_SpecialTerminationBenefitsMember_858171B8EC0E5003A1A708ED3ADF9D6C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringReserveRollForward" xlink:label="loc_us-gaap_RestructuringReserveRollForward_546D98FAA1EE536E8825F74FEEC996C7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_DE0516C75F4F5F729E0A7CFBCD42D71B" xlink:to="loc_us-gaap_RestructuringReserveRollForward_546D98FAA1EE536E8825F74FEEC996C7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringReserve" xlink:label="loc_us-gaap_RestructuringReserve_C061CE4F96355207ACD6C70DFCD26C7D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringReserveRollForward_546D98FAA1EE536E8825F74FEEC996C7" xlink:to="loc_us-gaap_RestructuringReserve_C061CE4F96355207ACD6C70DFCD26C7D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringCharges" xlink:label="loc_us-gaap_RestructuringCharges_34CB57EDCF8A519E919F45FBA7126FC6" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringReserveRollForward_546D98FAA1EE536E8825F74FEEC996C7" xlink:to="loc_us-gaap_RestructuringCharges_34CB57EDCF8A519E919F45FBA7126FC6" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_PaymentsForRestructuring" xlink:label="loc_us-gaap_PaymentsForRestructuring_272C71596BE8579DAB75959AD4152971" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringReserveRollForward_546D98FAA1EE536E8825F74FEEC996C7" xlink:to="loc_us-gaap_PaymentsForRestructuring_272C71596BE8579DAB75959AD4152971" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_DefinedBenefitPlanBenefitPeriod" xlink:label="loc_oesx_DefinedBenefitPlanBenefitPeriod_ABC21F178B16573CA8C61CCDD1A81A63" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_DE0516C75F4F5F729E0A7CFBCD42D71B" xlink:to="loc_oesx_DefinedBenefitPlanBenefitPeriod_ABC21F178B16573CA8C61CCDD1A81A63" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanHealthCareCostTrendRateAssumedNextFiscalYear" xlink:label="loc_us-gaap_DefinedBenefitPlanHealthCareCostTrendRateAssumedNextFiscalYear_D8A3C7DAC4545B3FBFC24CF394AD9F26" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_DE0516C75F4F5F729E0A7CFBCD42D71B" xlink:to="loc_us-gaap_DefinedBenefitPlanHealthCareCostTrendRateAssumedNextFiscalYear_D8A3C7DAC4545B3FBFC24CF394AD9F26" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_DefinedBenefitPlanUltimateHealthCareCostTrendRate1" xlink:label="loc_us-gaap_DefinedBenefitPlanUltimateHealthCareCostTrendRate1_60BEA2F6E81754C086A354A425FB80E8" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_DE0516C75F4F5F729E0A7CFBCD42D71B" xlink:to="loc_us-gaap_DefinedBenefitPlanUltimateHealthCareCostTrendRate1_60BEA2F6E81754C086A354A425FB80E8" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_DefinedBenefitPlanPeriodHealthCareCostTrendRateReachesUltimateTrendRate" xlink:label="loc_oesx_DefinedBenefitPlanPeriodHealthCareCostTrendRateReachesUltimateTrendRate_24CFB201DDE557A1AE596CC64A2AA07B" xlink:type="locator" />
    <link:definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_DE0516C75F4F5F729E0A7CFBCD42D71B" xlink:to="loc_oesx_DefinedBenefitPlanPeriodHealthCareCostTrendRateReachesUltimateTrendRate_24CFB201DDE557A1AE596CC64A2AA07B" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/ReorganizationOfBusinessNarrativeDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/ReorganizationOfBusinessRestructuringBySegmentDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringCostAndReserveLineItems" xlink:label="loc_us-gaap_RestructuringCostAndReserveLineItems_7FA7CAD4832B3067662F565EBF3D01E4" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfRestructuringAndRelatedCostsTable" xlink:label="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_22220BA73649DBB9CF63565EBF3C5E3F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_7FA7CAD4832B3067662F565EBF3D01E4" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_22220BA73649DBB9CF63565EBF3C5E3F" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsAxis" xlink:label="loc_us-gaap_ConsolidationItemsAxis_53B46274B8B08B55B823565EBF3C0594" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_22220BA73649DBB9CF63565EBF3C5E3F" xlink:to="loc_us-gaap_ConsolidationItemsAxis_53B46274B8B08B55B823565EBF3C0594" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_1740AE7C890F770891A3565EBF3C98AF_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConsolidationItemsAxis_53B46274B8B08B55B823565EBF3C0594" xlink:to="loc_us-gaap_ConsolidationItemsDomain_1740AE7C890F770891A3565EBF3C98AF_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_1740AE7C890F770891A3565EBF3C98AF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConsolidationItemsAxis_53B46274B8B08B55B823565EBF3C0594" xlink:to="loc_us-gaap_ConsolidationItemsDomain_1740AE7C890F770891A3565EBF3C98AF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingSegmentsMember" xlink:label="loc_us-gaap_OperatingSegmentsMember_D6FA45BBC2A8AC575B2B565EBF3C8381" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_1740AE7C890F770891A3565EBF3C98AF" xlink:to="loc_us-gaap_OperatingSegmentsMember_D6FA45BBC2A8AC575B2B565EBF3C8381" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CorporateNonSegmentMember" xlink:label="loc_us-gaap_CorporateNonSegmentMember_BAEA89DAB6D47DD06EB0565EBF3C547E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_1740AE7C890F770891A3565EBF3C98AF" xlink:to="loc_us-gaap_CorporateNonSegmentMember_BAEA89DAB6D47DD06EB0565EBF3C547E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_13DC4E6AC932B8140B63565EBF3D791D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_22220BA73649DBB9CF63565EBF3C5E3F" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_13DC4E6AC932B8140B63565EBF3D791D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_137EA0D79ADFF8B22246565EBF3D0CEB_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_13DC4E6AC932B8140B63565EBF3D791D" xlink:to="loc_us-gaap_SegmentDomain_137EA0D79ADFF8B22246565EBF3D0CEB_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_137EA0D79ADFF8B22246565EBF3D0CEB" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_13DC4E6AC932B8140B63565EBF3D791D" xlink:to="loc_us-gaap_SegmentDomain_137EA0D79ADFF8B22246565EBF3D0CEB" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_EnergyManagementMember" xlink:label="loc_oesx_EnergyManagementMember_1DDE45E185220BC11F09565EBF3DD834" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_137EA0D79ADFF8B22246565EBF3D0CEB" xlink:to="loc_oesx_EnergyManagementMember_1DDE45E185220BC11F09565EBF3DD834" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_EngineeredSystemsMember" xlink:label="loc_oesx_EngineeredSystemsMember_2144D798F391653A24AD565EBF3D22AD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_137EA0D79ADFF8B22246565EBF3D0CEB" xlink:to="loc_oesx_EngineeredSystemsMember_2144D798F391653A24AD565EBF3D22AD" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_DistributionServicesMember" xlink:label="loc_oesx_DistributionServicesMember_B2F7341AD51895D90C74565EBF3D6E18" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_137EA0D79ADFF8B22246565EBF3D0CEB" xlink:to="loc_oesx_DistributionServicesMember_B2F7341AD51895D90C74565EBF3D6E18" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringCharges" xlink:label="loc_us-gaap_RestructuringCharges_F6124C4DAB26D2F039A9565EBF3D1709" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_7FA7CAD4832B3067662F565EBF3D01E4" xlink:to="loc_us-gaap_RestructuringCharges_F6124C4DAB26D2F039A9565EBF3D1709" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/ReorganizationOfBusinessRestructuringByStatementOfOperationsLocationDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringCostAndReserveLineItems" xlink:label="loc_us-gaap_RestructuringCostAndReserveLineItems_092D2E2B0CC618ED0140565EBF4A7FE2" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfRestructuringAndRelatedCostsTable" xlink:label="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_E5ED7B0743D7CDAB0243565EBF4A3706" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_092D2E2B0CC618ED0140565EBF4A7FE2" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_E5ED7B0743D7CDAB0243565EBF4A3706" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_1D8297DDBE3CB83B9D2C565EBF4A69E3" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_E5ED7B0743D7CDAB0243565EBF4A3706" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_1D8297DDBE3CB83B9D2C565EBF4A69E3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_6273AB2ED983E3DE6DC1565EBF4A286A_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_1D8297DDBE3CB83B9D2C565EBF4A69E3" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_6273AB2ED983E3DE6DC1565EBF4A286A_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_6273AB2ED983E3DE6DC1565EBF4A286A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_1D8297DDBE3CB83B9D2C565EBF4A69E3" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_6273AB2ED983E3DE6DC1565EBF4A286A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CostOfSalesMember" xlink:label="loc_us-gaap_CostOfSalesMember_63FA88A526CB52FAB39D565EBF4AE46B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_6273AB2ED983E3DE6DC1565EBF4A286A" xlink:to="loc_us-gaap_CostOfSalesMember_63FA88A526CB52FAB39D565EBF4AE46B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GeneralAndAdministrativeExpenseMember" xlink:label="loc_us-gaap_GeneralAndAdministrativeExpenseMember_71EC41A2D402AC7E8536565EBF4AD2D3" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_6273AB2ED983E3DE6DC1565EBF4A286A" xlink:to="loc_us-gaap_GeneralAndAdministrativeExpenseMember_71EC41A2D402AC7E8536565EBF4AD2D3" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SellingAndMarketingExpenseMember" xlink:label="loc_us-gaap_SellingAndMarketingExpenseMember_327948FB3BE984AB87A6565EBF4A92FC" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_6273AB2ED983E3DE6DC1565EBF4A286A" xlink:to="loc_us-gaap_SellingAndMarketingExpenseMember_327948FB3BE984AB87A6565EBF4A92FC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ResearchAndDevelopmentExpenseMember" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpenseMember_83582F12E2AE4AF1F743568722238AAB" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_6273AB2ED983E3DE6DC1565EBF4A286A" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpenseMember_83582F12E2AE4AF1F743568722238AAB" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestructuringCharges" xlink:label="loc_us-gaap_RestructuringCharges_2ED5BBC95848EA9748D2565EBF4A1B1E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_092D2E2B0CC618ED0140565EBF4A7FE2" xlink:to="loc_us-gaap_RestructuringCharges_2ED5BBC95848EA9748D2565EBF4A1B1E" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/ReorganizationOfBusinessTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/Segments" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/SegmentsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentReportingInformationLineItems" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_3B95E15F5F5EF8F67DB07479C739F637" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_86A43FE87FBCE8FAF0BB7479C7380826" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_3B95E15F5F5EF8F67DB07479C739F637" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_86A43FE87FBCE8FAF0BB7479C7380826" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsAxis" xlink:label="loc_us-gaap_ConsolidationItemsAxis_A8160DEFF02A02082B4B7479C7389FE1" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_86A43FE87FBCE8FAF0BB7479C7380826" xlink:to="loc_us-gaap_ConsolidationItemsAxis_A8160DEFF02A02082B4B7479C7389FE1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_CD7D44BB14F9893E19717479C73859C7_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConsolidationItemsAxis_A8160DEFF02A02082B4B7479C7389FE1" xlink:to="loc_us-gaap_ConsolidationItemsDomain_CD7D44BB14F9893E19717479C73859C7_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConsolidationItemsDomain" xlink:label="loc_us-gaap_ConsolidationItemsDomain_CD7D44BB14F9893E19717479C73859C7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConsolidationItemsAxis_A8160DEFF02A02082B4B7479C7389FE1" xlink:to="loc_us-gaap_ConsolidationItemsDomain_CD7D44BB14F9893E19717479C73859C7" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingSegmentsMember" xlink:label="loc_us-gaap_OperatingSegmentsMember_306980B4AC4D17165B597479C738B69E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_CD7D44BB14F9893E19717479C73859C7" xlink:to="loc_us-gaap_OperatingSegmentsMember_306980B4AC4D17165B597479C738B69E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CorporateNonSegmentMember" xlink:label="loc_us-gaap_CorporateNonSegmentMember_592AAE1C0BD0A7435E4D7479C7385805" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConsolidationItemsDomain_CD7D44BB14F9893E19717479C73859C7" xlink:to="loc_us-gaap_CorporateNonSegmentMember_592AAE1C0BD0A7435E4D7479C7385805" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_D211AB72D09411A3FA4F7479C7394533" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_86A43FE87FBCE8FAF0BB7479C7380826" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_D211AB72D09411A3FA4F7479C7394533" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_7E5127EDA8B3375FFA9B7479C739C1D2_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_D211AB72D09411A3FA4F7479C7394533" xlink:to="loc_us-gaap_SegmentDomain_7E5127EDA8B3375FFA9B7479C739C1D2_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentDomain" xlink:label="loc_us-gaap_SegmentDomain_7E5127EDA8B3375FFA9B7479C739C1D2" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_D211AB72D09411A3FA4F7479C7394533" xlink:to="loc_us-gaap_SegmentDomain_7E5127EDA8B3375FFA9B7479C739C1D2" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_EnergyManagementMember" xlink:label="loc_oesx_EnergyManagementMember_EE676430A22067043C867479C7395F18" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_7E5127EDA8B3375FFA9B7479C739C1D2" xlink:to="loc_oesx_EnergyManagementMember_EE676430A22067043C867479C7395F18" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_EngineeredSystemsMember" xlink:label="loc_oesx_EngineeredSystemsMember_F80E1B0C5CE428A22B987479C739DDEE" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_7E5127EDA8B3375FFA9B7479C739C1D2" xlink:to="loc_oesx_EngineeredSystemsMember_F80E1B0C5CE428A22B987479C739DDEE" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_DistributionServicesMember" xlink:label="loc_oesx_DistributionServicesMember_C7E47E60C587B62DE08C7479C7391A2C" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_7E5127EDA8B3375FFA9B7479C739C1D2" xlink:to="loc_oesx_DistributionServicesMember_C7E47E60C587B62DE08C7479C7391A2C" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SegmentReportingInformationRevenueAbstract" xlink:label="loc_us-gaap_SegmentReportingInformationRevenueAbstract_18AFC09EBD9EB5F9D0B57479C7394439" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_3B95E15F5F5EF8F67DB07479C739F637" xlink:to="loc_us-gaap_SegmentReportingInformationRevenueAbstract_18AFC09EBD9EB5F9D0B57479C7394439" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_9BCA8A62DF8CFE012CE57479C7390B0E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationRevenueAbstract_18AFC09EBD9EB5F9D0B57479C7394439" xlink:to="loc_us-gaap_Revenues_9BCA8A62DF8CFE012CE57479C7390B0E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_OperatingIncomeLoss" xlink:label="loc_us-gaap_OperatingIncomeLoss_3BFD333824A68F730FC77479C739AA2D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationRevenueAbstract_18AFC09EBD9EB5F9D0B57479C7394439" xlink:to="loc_us-gaap_OperatingIncomeLoss_3BFD333824A68F730FC77479C739AA2D" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/SegmentsTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/ShareholdersEquity" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/ShareholdersEquityDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BF783E5C23FB0070F2C573B923E32EF9" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_834B25A4468B23E9084E73B923E2E0E7" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BF783E5C23FB0070F2C573B923E32EF9" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_834B25A4468B23E9084E73B923E2E0E7" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_D118E5142AFD7D6CD8B173B923E2A113" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_834B25A4468B23E9084E73B923E2E0E7" xlink:to="loc_us-gaap_RangeAxis_D118E5142AFD7D6CD8B173B923E2A113" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_E0DB382A8920A5955AE973B923E3B453_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_D118E5142AFD7D6CD8B173B923E2A113" xlink:to="loc_us-gaap_RangeMember_E0DB382A8920A5955AE973B923E3B453_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_E0DB382A8920A5955AE973B923E3B453" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_D118E5142AFD7D6CD8B173B923E2A113" xlink:to="loc_us-gaap_RangeMember_E0DB382A8920A5955AE973B923E3B453" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_2BA2409D0B38543E7EFE73B923E30B42" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_E0DB382A8920A5955AE973B923E3B453" xlink:to="loc_us-gaap_MinimumMember_2BA2409D0B38543E7EFE73B923E30B42" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_FC71BE975264CFD7B9A373B923E30FAC" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_E0DB382A8920A5955AE973B923E3B453" xlink:to="loc_us-gaap_MaximumMember_FC71BE975264CFD7B9A373B923E30FAC" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_5332AFF8B3A8C24E720173B923E34B0E" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_834B25A4468B23E9084E73B923E2E0E7" xlink:to="loc_us-gaap_AwardTypeAxis_5332AFF8B3A8C24E720173B923E34B0E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_BB02E155025C2048A30773B923E35A04_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_5332AFF8B3A8C24E720173B923E34B0E" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_BB02E155025C2048A30773B923E35A04_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_BB02E155025C2048A30773B923E35A04" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_5332AFF8B3A8C24E720173B923E34B0E" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_BB02E155025C2048A30773B923E35A04" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_StockCompensationPlanMember" xlink:label="loc_us-gaap_StockCompensationPlanMember_7E2AD35652FBFAC068DE73B923E30803" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_BB02E155025C2048A30773B923E35A04" xlink:to="loc_us-gaap_StockCompensationPlanMember_7E2AD35652FBFAC068DE73B923E30803" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardSharesIssuedInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardSharesIssuedInPeriod_5188184D5FFFDF63C8DA73B923E3271B" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BF783E5C23FB0070F2C573B923E32EF9" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardSharesIssuedInPeriod_5188184D5FFFDF63C8DA73B923E3271B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SharesIssuedPricePerShare" xlink:label="loc_us-gaap_SharesIssuedPricePerShare_C1BCB4F907DA67DA5FA073B923E3BAD5" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BF783E5C23FB0070F2C573B923E32EF9" xlink:to="loc_us-gaap_SharesIssuedPricePerShare_C1BCB4F907DA67DA5FA073B923E3BAD5" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ReceivableFromShareholdersOrAffiliatesForIssuanceOfCapitalStock" xlink:label="loc_us-gaap_ReceivableFromShareholdersOrAffiliatesForIssuanceOfCapitalStock_41D19F907FB905FEEFAD73B923E3C190" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BF783E5C23FB0070F2C573B923E32EF9" xlink:to="loc_us-gaap_ReceivableFromShareholdersOrAffiliatesForIssuanceOfCapitalStock_41D19F907FB905FEEFAD73B923E3C190" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_TreasuryStockSharesAcquired" xlink:label="loc_us-gaap_TreasuryStockSharesAcquired_729BC4A51B70B8BAB64873B923E31B79" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_BF783E5C23FB0070F2C573B923E32EF9" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_729BC4A51B70B8BAB64873B923E31B79" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/ShareholdersEquityTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/StockOptionsAndRestrictedShares" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/StockOptionsAndRestrictedSharesNarrativeDetails" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/StockOptionsAndRestrictedSharesRestrictedSharesAndStockOptionsDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_69D38C90C716523687FCC1FE1229B324" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_34C509589F1E53B8BEB458D0B7FBA823" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_69D38C90C716523687FCC1FE1229B324" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_34C509589F1E53B8BEB458D0B7FBA823" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_FF2A1920412359C1AD5AAC03590F5678" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_34C509589F1E53B8BEB458D0B7FBA823" xlink:to="loc_us-gaap_AwardTypeAxis_FF2A1920412359C1AD5AAC03590F5678" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_869208C969F3F5CE731CA8D4D2DFC0A9_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_FF2A1920412359C1AD5AAC03590F5678" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_869208C969F3F5CE731CA8D4D2DFC0A9_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_93DAED97C6F25D36930796BCDAE09C60" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_FF2A1920412359C1AD5AAC03590F5678" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_93DAED97C6F25D36930796BCDAE09C60" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RestrictedStockMember" xlink:label="loc_us-gaap_RestrictedStockMember_EDBB48B6593F5CC5AA2CDA535A522A28" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_93DAED97C6F25D36930796BCDAE09C60" xlink:to="loc_us-gaap_RestrictedStockMember_EDBB48B6593F5CC5AA2CDA535A522A28" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_E7918D379088561B92268BFB406EDA3B" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_34C509589F1E53B8BEB458D0B7FBA823" xlink:to="loc_us-gaap_RangeAxis_E7918D379088561B92268BFB406EDA3B" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_9C055ED8188B39110944A8D4D2DFDCE2_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_E7918D379088561B92268BFB406EDA3B" xlink:to="loc_us-gaap_RangeMember_9C055ED8188B39110944A8D4D2DFDCE2_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_C770F1167DF951C9BB008A651BC895BF" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_E7918D379088561B92268BFB406EDA3B" xlink:to="loc_us-gaap_RangeMember_C770F1167DF951C9BB008A651BC895BF" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_19E3C6F07997553DA4402383757FC46A" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_C770F1167DF951C9BB008A651BC895BF" xlink:to="loc_us-gaap_MinimumMember_19E3C6F07997553DA4402383757FC46A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_79100E80D9F0580DB130F7A5B88BD127" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_C770F1167DF951C9BB008A651BC895BF" xlink:to="loc_us-gaap_MaximumMember_79100E80D9F0580DB130F7A5B88BD127" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_RestrictedSharesIssuedToKeyEmployeesAbstract" xlink:label="loc_oesx_RestrictedSharesIssuedToKeyEmployeesAbstract_5A911CAB88D25750A976013C5BCCCB86" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_69D38C90C716523687FCC1FE1229B324" xlink:to="loc_oesx_RestrictedSharesIssuedToKeyEmployeesAbstract_5A911CAB88D25750A976013C5BCCCB86" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_66F9CB0E62FD5DB8B9A3E3FC13D69185" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_oesx_RestrictedSharesIssuedToKeyEmployeesAbstract_5A911CAB88D25750A976013C5BCCCB86" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_66F9CB0E62FD5DB8B9A3E3FC13D69185" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_4DB53A093D1257F6B405D68083D9BA3A" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_oesx_RestrictedSharesIssuedToKeyEmployeesAbstract_5A911CAB88D25750A976013C5BCCCB86" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_4DB53A093D1257F6B405D68083D9BA3A" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_FE8DA552CCA652E1ADF6C761E2C62E78" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_oesx_RestrictedSharesIssuedToKeyEmployeesAbstract_5A911CAB88D25750A976013C5BCCCB86" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_FE8DA552CCA652E1ADF6C761E2C62E78" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_CF2DAE90F77655D0829ACE3138D59117" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_oesx_RestrictedSharesIssuedToKeyEmployeesAbstract_5A911CAB88D25750A976013C5BCCCB86" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_CF2DAE90F77655D0829ACE3138D59117" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_DFFBD0E531205007BD44B262F7AAC05D" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_69D38C90C716523687FCC1FE1229B324" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_DFFBD0E531205007BD44B262F7AAC05D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_C2D2BDBB7D415AE4B2DBF6BEF4EB6447" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_69D38C90C716523687FCC1FE1229B324" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_C2D2BDBB7D415AE4B2DBF6BEF4EB6447" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfShares" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfShares_414A779A3DA1544583F5DFCC45620361" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_C2D2BDBB7D415AE4B2DBF6BEF4EB6447" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfShares_414A779A3DA1544583F5DFCC45620361" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross_E71A07C6D3295EDABE6497C9806231A1" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_C2D2BDBB7D415AE4B2DBF6BEF4EB6447" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross_E71A07C6D3295EDABE6497C9806231A1" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedNumberOfShares" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedNumberOfShares_6C7807FA347D5055A5B2714D91084732" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_C2D2BDBB7D415AE4B2DBF6BEF4EB6447" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedNumberOfShares_6C7807FA347D5055A5B2714D91084732" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedOptionsForfeitedNumberOfShares" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedOptionsForfeitedNumberOfShares_E1A1D638E6DE55A385C80733E468840D" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_C2D2BDBB7D415AE4B2DBF6BEF4EB6447" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedOptionsForfeitedNumberOfShares_E1A1D638E6DE55A385C80733E468840D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice_DA679C3BDEE0578E9508B8A51C29D2C6" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_69D38C90C716523687FCC1FE1229B324" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice_DA679C3BDEE0578E9508B8A51C29D2C6" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/StockOptionsAndRestrictedSharesStockBasedCompensationDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems_198A49A8FA7059F29D7244EC15E135B4" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable" xlink:label="loc_us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable_8819AECA46505C0EA80485249B163A9C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems_198A49A8FA7059F29D7244EC15E135B4" xlink:to="loc_us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable_8819AECA46505C0EA80485249B163A9C" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_9F4447C34557516882450E6F6F41DE19" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable_8819AECA46505C0EA80485249B163A9C" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_9F4447C34557516882450E6F6F41DE19" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_B0FAC20B1900D5171CA261C00EE3C31C_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_9F4447C34557516882450E6F6F41DE19" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_B0FAC20B1900D5171CA261C00EE3C31C_DCC8672F0E9551CFA9A69F3806C20B31" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_05681A78A4F75741A873870B20261D3E" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_9F4447C34557516882450E6F6F41DE19" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_05681A78A4F75741A873870B20261D3E" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CostOfSalesMember" xlink:label="loc_us-gaap_CostOfSalesMember_43B85325377B5C578CB1D493B6AAFD84" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_05681A78A4F75741A873870B20261D3E" xlink:to="loc_us-gaap_CostOfSalesMember_43B85325377B5C578CB1D493B6AAFD84" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_GeneralAndAdministrativeExpenseMember" xlink:label="loc_us-gaap_GeneralAndAdministrativeExpenseMember_1DEBCF824E73548385EAFB89E06B9F05" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_05681A78A4F75741A873870B20261D3E" xlink:to="loc_us-gaap_GeneralAndAdministrativeExpenseMember_1DEBCF824E73548385EAFB89E06B9F05" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SellingAndMarketingExpenseMember" xlink:label="loc_us-gaap_SellingAndMarketingExpenseMember_CF6586F24F0A5033ACF7103FA208ED51" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_05681A78A4F75741A873870B20261D3E" xlink:to="loc_us-gaap_SellingAndMarketingExpenseMember_CF6586F24F0A5033ACF7103FA208ED51" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ResearchAndDevelopmentExpenseMember" xlink:label="loc_us-gaap_ResearchAndDevelopmentExpenseMember_6A528BC7683D5B59881BF91640B14060" xlink:type="locator" />
    <link:definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_05681A78A4F75741A873870B20261D3E" xlink:to="loc_us-gaap_ResearchAndDevelopmentExpenseMember_6A528BC7683D5B59881BF91640B14060" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ShareBasedCompensationAllocationAndClassificationInFinancialStatementsAbstract" xlink:label="loc_us-gaap_ShareBasedCompensationAllocationAndClassificationInFinancialStatementsAbstract_B18EA9E18859585BB6D9260EE9696818" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems_198A49A8FA7059F29D7244EC15E135B4" xlink:to="loc_us-gaap_ShareBasedCompensationAllocationAndClassificationInFinancialStatementsAbstract_B18EA9E18859585BB6D9260EE9696818" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AllocatedShareBasedCompensationExpense" xlink:label="loc_us-gaap_AllocatedShareBasedCompensationExpense_40A524C31ACD5747B6CA4D4FC865F017" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationAllocationAndClassificationInFinancialStatementsAbstract_B18EA9E18859585BB6D9260EE9696818" xlink:to="loc_us-gaap_AllocatedShareBasedCompensationExpense_40A524C31ACD5747B6CA4D4FC865F017" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/StockOptionsAndRestrictedSharesTables" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/SubsequentEvents" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/SummaryOfSignificantAccountingPolicies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/SummaryOfSignificantAccountingPoliciesDetails" xlink:type="extended">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskLineItems" xlink:label="loc_us-gaap_ConcentrationRiskLineItems_B8A93806BD6438B0931E7828E46220BA" xlink:type="locator" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskTable" xlink:label="loc_us-gaap_ConcentrationRiskTable_FD0B5E54A72A10C921DA7828E461B5E4" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ConcentrationRiskLineItems_B8A93806BD6438B0931E7828E46220BA" xlink:to="loc_us-gaap_ConcentrationRiskTable_FD0B5E54A72A10C921DA7828E461B5E4" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskByBenchmarkAxis" xlink:label="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_494D8234BC0FF3643B727828E4620845" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ConcentrationRiskTable_FD0B5E54A72A10C921DA7828E461B5E4" xlink:to="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_494D8234BC0FF3643B727828E4620845" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_6AE590C791CC3A47F87A7828E4629F77_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_494D8234BC0FF3643B727828E4620845" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_6AE590C791CC3A47F87A7828E4629F77_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_6AE590C791CC3A47F87A7828E4629F77" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_494D8234BC0FF3643B727828E4620845" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_6AE590C791CC3A47F87A7828E4629F77" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_SalesRevenueNetMember" xlink:label="loc_us-gaap_SalesRevenueNetMember_F8098545E74050255D307828E4629E3D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskBenchmarkDomain_6AE590C791CC3A47F87A7828E4629F77" xlink:to="loc_us-gaap_SalesRevenueNetMember_F8098545E74050255D307828E4629E3D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_AccountsReceivableMember" xlink:label="loc_us-gaap_AccountsReceivableMember_3ACF54894D4EDF92A42A7828E462512F" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskBenchmarkDomain_6AE590C791CC3A47F87A7828E4629F77" xlink:to="loc_us-gaap_AccountsReceivableMember_3ACF54894D4EDF92A42A7828E462512F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskByTypeAxis" xlink:label="loc_us-gaap_ConcentrationRiskByTypeAxis_40957A8A9918E31F7F3F7828E462E6AD" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ConcentrationRiskTable_FD0B5E54A72A10C921DA7828E461B5E4" xlink:to="loc_us-gaap_ConcentrationRiskByTypeAxis_40957A8A9918E31F7F3F7828E462E6AD" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_8C5A5334C629798122BA7828E4621653_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_40957A8A9918E31F7F3F7828E462E6AD" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_8C5A5334C629798122BA7828E4621653_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_8C5A5334C629798122BA7828E4621653" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_40957A8A9918E31F7F3F7828E462E6AD" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_8C5A5334C629798122BA7828E4621653" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_CustomerConcentrationRiskMember" xlink:label="loc_us-gaap_CustomerConcentrationRiskMember_35FC8EDF4B9C2E4B7E4A7828E462B29D" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskTypeDomain_8C5A5334C629798122BA7828E4621653" xlink:to="loc_us-gaap_CustomerConcentrationRiskMember_35FC8EDF4B9C2E4B7E4A7828E462B29D" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_MajorCustomersAxis" xlink:label="loc_us-gaap_MajorCustomersAxis_85DFE9A38B155783BCF47828E4623756" xlink:type="locator" />
    <link:definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ConcentrationRiskTable_FD0B5E54A72A10C921DA7828E461B5E4" xlink:to="loc_us-gaap_MajorCustomersAxis_85DFE9A38B155783BCF47828E4623756" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NameOfMajorCustomerDomain" xlink:label="loc_us-gaap_NameOfMajorCustomerDomain_B9D4E6E8AC4C72A615B67828E4623A6F_default" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorCustomersAxis_85DFE9A38B155783BCF47828E4623756" xlink:to="loc_us-gaap_NameOfMajorCustomerDomain_B9D4E6E8AC4C72A615B67828E4623A6F_default" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_NameOfMajorCustomerDomain" xlink:label="loc_us-gaap_NameOfMajorCustomerDomain_B9D4E6E8AC4C72A615B67828E4623A6F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorCustomersAxis_85DFE9A38B155783BCF47828E4623756" xlink:to="loc_us-gaap_NameOfMajorCustomerDomain_B9D4E6E8AC4C72A615B67828E4623A6F" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_CustomerOneMember" xlink:label="loc_oesx_CustomerOneMember_F38F2ED01B40B32D04B27828E4623F6C" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NameOfMajorCustomerDomain_B9D4E6E8AC4C72A615B67828E4623A6F" xlink:to="loc_oesx_CustomerOneMember_F38F2ED01B40B32D04B27828E4623F6C" xlink:type="arc" />
    <link:loc xlink:href="oesx-20170930.xsd#oesx_NumberOfFinancialInstitutions" xlink:label="loc_oesx_NumberOfFinancialInstitutions_A7A7B29E0F28CEACBCC57828E462630F" xlink:type="locator" />
    <link:definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskLineItems_B8A93806BD6438B0931E7828E46220BA" xlink:to="loc_oesx_NumberOfFinancialInstitutions_A7A7B29E0F28CEACBCC57828E462630F" xlink:type="arc" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2017/elts/us-gaap-2017-01-31.xsd#us-gaap_ConcentrationRiskPercentage1" xlink:label="loc_us-gaap_ConcentrationRiskPercentage1_C5F58379DE046C5284D67828E46274B7" xlink:type="locator" />
    <link:definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskLineItems_B8A93806BD6438B0931E7828E46220BA" xlink:to="loc_us-gaap_ConcentrationRiskPercentage1_C5F58379DE046C5284D67828E46274B7" xlink:type="arc" />
  </link:definitionLink>
  <link:definitionLink xlink:role="http://www.oesx.com/role/SummaryOfSignificantAccountingPoliciesPolicies" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/UnauditedCondensedConsolidatedBalanceSheets" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/UnauditedCondensedConsolidatedBalanceSheetsParenthetical" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/UnauditedCondensedConsolidatedStatementsOfCashFlows" xlink:type="extended" />
  <link:definitionLink xlink:role="http://www.oesx.com/role/UnauditedCondensedConsolidatedStatementsOfOperations" xlink:type="extended" />
</link:linkbase>





