Thanks, Jan. As most of you know today, we released our first quarter 2021 results in our press release and also filed our 10-Q with the SEC. I'll review some financial highlights compared to the first quarter of 2020.
OmniMetrix revenue grew 27% to $1.7 million in Q1 '21 from $1.3 million in Q1 '20 due to a 57% increase in hardware revenue and a 13% increase in monitoring revenue. The increased hardware revenue was due in part to the sale of custom units designed to 1 specific customer specification to allow them to monitor these units themselves and an increase also in sale of accessories. These revenues are recognized at the point of sale and not deferred over the life of a unit based on the fact that they are sold uniquely by themselves. There was also an overall increase in sales of next-generation monitors, including our Hero-2 pipeline rectifier monitors.
The increase in monitoring is due to a growing number of installed and billable connections that results from new hardware sales, shift in our sales concentration from residential to commercial and industrial, that we talked about for several quarters, and the restructuring of our data plan.
Gross profit increased 31% in Q1 '21 versus Q1 '20 driven by, as I noted previously, an increase in sales to commercial and industrial customers versus residential customers, and that increase I noted in accessory sales, leading to higher hardware margins combined with growth in high-margin monitoring revenue. The gross margin on monitoring increased to 86% in Q1 '21 from 84% in Q1 '20 with a higher concentration at the commercial and industrial revenue segment.
Gross margin on hardware increased to 49% in Q1 '21 from 39% in the prior year period due to increased sales of next-generation monitors and customized units that provide higher margins due to enhanced features, functions and customer value. OmniMetrix' operating expenses decreased 3% to $943,000 in Q1 '21, principally due to $55,000 decrease in SG&A expenses related to travel and trade show expenses, which were partially offset by a $23,000 increase in R&D for new product development.
We expect SG&A expenses will increase in future quarters as travel and trade show activities return to pre-COVID levels and we continue to spend more dollars on upgrades and enhancements to our IT infrastructure. OmniMetrix generated operating income of $267,000 in Q1 '21 versus a loss of $53,000 in Q1 '20 due to the increased revenue and strong gross margin and our lean operating structure. Acorn's corporate costs increased $20,000 to $241,000 in Q1 '21, principally due to increased non-cash stock compensation and audit and tax accounting fees, partially offset by a decrease in travel expenses.
Due to the improved performance at OmniMetrix, Q1 '21 net income attributable to Acorn's shareholders improved by over $300,000 to $20,000 or $0.00 per share from a net loss of $283,000 for a loss of $0.01 per share in Q1 '20.
As you may know, Acorn looks at cash basis sales to supplement our GAAP revenue metrics and particularly for insight regarding growth trends. Cash sales differ from GAAP revenue, because we generally defer and recognize revenue from hardware sales over the life of the unit, typically a 3-year period and we defer and recognize revenue from monitoring contracts over the period of service, typically 1 year. In Q1 '21, our cash basis sales grew 23% to $1.6 million from $1.3 million in Q1 '20. By segment cash basis sales for PG increased 27% to $1.4 million in Q1 '21 versus $1.1 million in the prior year period. CP cash sales increased 3% to $205,000 versus $200,000 in Q1 '20. Cash generated from operating activities was $68,000 in Q1 '21, exceeding consolidated net income of $22,000, primarily due to non-cash expenses.
Cash provided by operating activities was less than the same period in the prior year due to the timing of collection in the first quarter of 2020 of several significant customer receivable balances that were outstanding at December 31, 2019. Also, during the first quarter of 2020, we aggressively focused on receivable collections and extending payables payment terms to conserve cash in the beginning phase of COVID-19 pandemic. We had consolidated cash of approximately $2 million at the close of the quarter compared to $1.4 million last March and $2.1 million at year-end December 31, 2020.
As I noted previously, and as also Jan mentioned, we did pay off our AR credit line and elected not to renew that line following its February 28 expiration. We may in the future seek a revolving line with more favorable terms, but at this time, we believe the company's current cash and expected cash flow provide sufficient liquidity to finance our existing operations for the foreseeable future.
I'd just like to conclude my remarks by saying that we are very excited about how 2021 started and we have the full confidence in our knowledgeable and seasoned sales and marketing team, our depth of engineering expertise in continuing to expand our product line, and the dedication of our support teams to customer service to execute successfully towards our growth goals now that we're getting out from under the burden of COVID-19.
With that, I'd like to turn the call back to the operator to give you all an opportunity to ask any questions. Operator?