The Scottish Daily record reports
Guy Friedberg, 49, admitted growing the illegal drug when he appeared at Ayr Sheriff Court.
It was said in court that the dank smell of cannabis wafted from an open window.
And that was what led to police arriving at 60 High Street with a search warrant.
Police found 28 plants in various stages of growth, depute fiscal Ed Sheeran told the court.
They also found grow tents, heat lamps, a water filtration system, an extraction fan, circulating fans, ducting, thermometers and plant food.
Friedberg was arrested and told officers he was growing cannabis to make oil as a treatment for his son’s cancer.
Defence lawyer Gregor Forbes said his client fully cooperated with police.
He stressed: “It is the accused’s position that he was growing them not for commercial benefit but for his son.
“His son was accessing cannabis oil and he was concerned his son might be getting into dangerous company.”
Mr Forbes added: “He believes a window had been left open and there was smell in the High Street.
“He didn’t get as far as making the oil.”
The lawyer concluded: “It was a misguided, altruistic plan on his part but it did not constitute commercial activity.
“There were no scales and no tick list.”
The court heard that Friedberg’s home base is in Cornwall, where his family reside, and Sheriff Mhari Mactaggart asked what had brought him to Ayr.
Mr Forbes explained that it was a business opportunity with a jeweller’s shop, although Friedberg still receives a form of universal credit that provides a pathway into self-employment.
Friedberg and his son came to Ayr in May 2018 with the idea of the father running the jewellery business, with his son in charge of the coffee shop upstairs.
However, the son was diagnosed with a cancerous tumour which was surgically removed last June.
Thereafter the son required chemotherapy and was treating himself with droplets of cannabis oil, taken under the tongue. He is now in remission from cancer, the court heard.
Friedberg began growing the cannabis in July and it was discovered by police on September 13.
Sheriff Mactaggart told Friedberg: “Whatever gave rise to you embarking on this fairly well-thought-through set-up and operation, the fact of the matter is that the production of this drug is illegal.
“Whatever personal circumstances had blighted your family, you are not above the law.”
The sheriff told Friedberg that the usual starting point for a fine for this offence would be £1500 but she reduced it to £1000, payable at £100 per month.