See this post and thread. The issue is most likely that for some reason ST isn’t sending commands to the correct endpoint. If you edit the devicetype and hardcode the correct endpoint, it should work.
If you need help with using custom code, just search the forum for “FAQ custom code” for a great primer.