"This is a man who resorted to a home remedy."
The nature of Howard's injury was not disclosed.
Lafferty said that Howard made efforts to isolate a specific strain to alleviate his pain and was "quite adamant it provided him with the relief he sought".
However, police said that Howard's home-grown cannabis operation was also a commercial enterprise, because he was selling it to his friends.
Howard had earlier pleaded guilty to cultivating cannabis and offering to sell cannabis.
The court was told that police searched Howard's property last November and found a specialised temperature-controlled growing room set up in the garage which was accessed via a moveable bookshelf.
It had specialised lighting and ventilation, and humidity controls.
Police found eight large cannabis plants, numerous seedlings and fertiliser and other nutrients, along with 70gm of dried cannabis and 23 seeds.
Judge Gordon Matenga told Howard that medicinal cannabis was legally available with a doctor's prescription.
Howard replied that the legal cannabis oil did not help him with his pain, was quite hard to get and was "very expensive".
Judge Matenga said that Howard's cellphone showed numerous texts between him and associates which showed he was "clearly selling or offering to sell cannabis in various quantities for cash".
"I accept you have suffered an injury I the past. I have received copies of medical notes which confirm that," the judge said.
He said that Howard, who had no past drug-related offending on his record, worked to develop a strain of cannabis which helped his pain.
"Clearly you took great care with what you were doing," he said.
"The problem with that is that cultivation, sale and use of cannabis is illegal. It has been for a long time," Judge Matenga said.
He said the referendum held at the last general election on whether to legalise cannabis had been an opportunity for the community's voice to be heard, and that voice said that the drug should remain illegal.
"I am required to enforce the laws as are they are currently legislated," Judge Matenga said.
He sentenced Howard to three months of home detention with post-detention conditions to undergo an assessment for alcohol and drug counselling, and complete any counselling as directed by a probation officer.