Symmetries and conservation laws for Hamiltonian Systems with inputs and outputs