After initially denying all charges except a driving matter, he admitted a charge of arson, two charges of burglary, attempting intentionally to access a computer and driving while forbidden.
Judge Strettell told Wilson he was lucky not to be facing charges relating to deaths at the property, and described the arson as "grossly reckless at the very least".
He had known there were children sleeping in the house and their bedroom was near the garage.
The fire caused a "high risk to life" and threatened the safety of everyone in the house, including two children "with whom for 10 months you had developed a strong bond of friendship and for them, dependence on you".
The complainant and her children still suffered an "emotional and psychological impact" from the incident.
Wilson had struggled to accept the end of the relationship, and made several attempts to resurrect it.
After one such attempt about a month before the arson, he had gone to the house and taken a set of keys and the victim's pain medication. He was still there when she came home, and she asked friends to come and remove him. He later messaged her and threatened suicide.
Three days before the arson, he sent her a text message saying he had been inside the house that night. He had blown out some candles and listened at a door.
Three days after the arson, he was stopped by police in Kelvin Heights after a car was reported stolen. It was found he had been forbidden from driving about a fortnight earlier. While on bail after appearing in court on the matters, he breached a condition by contacting the victim using a computer, and impersonated the profile of one of her friends.
In a probation report, Wilson attributed his behaviour to his use of P and his grief at the end of the relationship.
Judge Strettell sentenced him to three years and 11 months' imprisonment on the arson charge, and a concurrent sentence of six months' imprisonment on the other charges.
He was convicted and discharged on the driving while forbidden charge, and ordered to pay the victim $4000 in reparation.