As discussed earlier, please use n.st.Machine(machineId) to get the machine, not FindEntity (unnecessary indirection, as only machine tags are allowed). You can then pass machineId to this helper method and use names.ParseTag() in the main method below to get the id from the tag.