Dale started the season with a cruel 3-2 defeat to Peterborough United, after the visitors netted a late winner.
Andy Cannon volleyed Dale into an early lead at the Crown Oil Arena before Marcus Maddison equalised for the visitors midway through the half.
Ian Henderson regained the lead for Dale from the penalty spot, and Chris Forrester levelled the scoring a for a second time in a breathless first half.
Rochdale were on the front foot for most of the second half but an error presented Gwion Edwards with the winning goal at the death.
Dale started on the front foot, with Cannon looking particularly lively and he had an early effort well-saved by visiting 'keeper Ben Alnwick.
However, the Dale academy graduate didn’t need to wait long to net the side's first goal of the new season. When a corner wasn’t cleared properly, he sent a volley into the ground and into the far corner of the net in the eighth minute.
Before Posh drew level, Shaquile Coulthirst had a couple of half chances for the visitors. He fired into the side netting before curling a shot straight at Lillis.
Grant McCann’s side went on to equalise on 21 minutes when Maddison charged up the flank and fired a shot beyond Lillis.
In what was proving to be an open game, Nathaniel Mendez-Laing had a shot blocked, before Cannon fired over the bar from the edge of the area.
Dale’s chance to retake the lead came when Joe Rafferty was clearly felled in the area by Jermaine Anderson. Referee David Webb pointed to the spot and Henderson slammed the spot kick straight down the middle of the goal.
Six minutes later, Posh were back on level terms as Forrester played a one-two on the edge of the area with Paul Taylor before firing an excellent 20-yard strike past Lillis.
There was a flash-point at the end of the first half when Mendez-Laing beat Alnwick to a Joe Bunney flick-on and was brought down by the Posh 'keeper. Alnwick went in the book after being shown a yellow card.
HT: ROCHDALE 2-2 PETERBOROUGH UNITED
The second half started at an altogether quieter pace than the first, but Posh forward Taylor had a golden opportunity to give his side the lead five minutes after the break, but he curled his shot just wide when clean through.
Dale were enjoying plenty of the possession, and substitute Calvin Andrew and defender Harrison McGahey both looped headers onto the roof of the net, while Callum Camps poked agonisingly wide from an Andrew knock-down.
Through on goal, Coulthirst was wasteful, as he dithered, allowing McGahey rushed back to block an effort.
Peterborough had the ball in the net through Tom Nichols as the game moved into its closing stages, but it was ruled out for a hand ball.
However, there was to be another chance for the visitors and they took the lead in the 89th minute when Taylor’s cross was met by the waiting Edwards, who headed into the net to clinch the points.
FT: Rochdale 2-3 Peterborough United