Ideally I would use the same transform for the command topic.
I want the convenience of setting the timer values in the UI and would like to avoid a rule that updates an different item. (would be something like this)
val String VarTimer1AsTime = transform(“JS”, “numberToClock.js”, Timer1.state.toString )
Timer1AsTime.postUpdate(VarTimer1AsTime)
I will need multiple timers running to don’t want to replicate a rule and additional item for each timet
One thing I do notice is that there is a typo in your outgoing value format. You have a single quote before Time and double quotes everywhere else. That will result in an invalid JSON string which your destination will not be able to parse.
Furthermore, your JS transform is only applying to the way that Item appears on your sitemap. It doesn’t change a thing about how the value is stored in the Item itself and therefore has no impact the value published. In otherwords, assuming this Item represents seconds, if you set it to 300 the published message as you currently have it configured would be:
{'Time":"300"}
You need to install a more recent MQTT binding like rossko57 suggests, and then apply your JS transformation on the outgoing message. You will need to change your JS transform to return your full JSON string, not just the MM:SS.
If possible, it would probably be the most ideal to change the end point so it can accept the number of seconds in the first place. Why force OH to go through the effort to convert seconds to MM:SS only to have your Wemo almost certainly need to convert it back to seconds once it receives the message?