You are actually closer than you think, at least to identifying the ruler. After that, you'll have to identify to which of his possessions the coin pertains, where it was minted and which nominal it is.
There were 25 states in the German Empire, but only very few kingdoms: Wurttemberg, Bavaria and Saxonia. Both last with ages-old houses, Wettin and Wittelsbach.
William I, Duke of Bavaria led a very colourful life and played an important role in the 14th century's violent politics...
You nailed him. Now all there's left is figuring out which one of the realms he ruled, the city and the denomination
Great detective work, guys. It's a dubbele mijt from the 1350s minted for Wilhelm von Bayern as Count of Hainaut. Pretty scarce and historically relevant for a society that just escaped the Black Death and was heading towards the end of the Late Middle Ages.