To reference an input id via setInputValue in a modular app that uses namespaces, simply add the namespace id in front of the input id, separated by a dash. Example:
Shiny.setInputValue("the_namespace_id-serial","new value"); // Report the change to Shiny