'It is illegal': man convicted after growing cannabis for pain relief