How about if the Ryukyus get help from the Portugeuse when Satsuma goes to invade them. They subsequently become a Portuguese protectorate and from there a crown colony.
An uneasy peace results in Satsuma becoming even more independent from the Tokugawa than they were.
The problem here is that you're weakening Satsuma, which is your best candidate for rebellion from the Tokugawa and the separate statehood you're looking for.
Perhaps, though, you could have a reinvasion of the Ryukyus by Satsuma as Portugal declines in power. This might lead to a Satsuma rebellion as the war with Portugal shows how far behind the West the shogunate has fallen.
Satsuma would probably win against even a Portugeuse based Ryukyus in the late 1700s because of a weaker Portugal's supply difficulties to such a far flung place, while the Japanese still retained a great deal of their samarai effectiveness, population, and wealth advantages. The late 1700's were also, AFAIK, a period of some ferment among the daimyo, and ripe for a rebellion.
However, a problem here now becomes how to prevent a flintlock equipped Satsuma army from establishing a new Shogunate in their turn.
This does seem more difficult than at first glance. You could go back to well before the Tokugawa, but Japan's development under the Tokugawa was really unique, it's hard to see how you could have the Japanese retain many of their identifiable characteristics without at least some Edo/Isolation influences. My thought is they would become far more of an offshore tributary state of China than their own separate culture, like the various states of Southeast Asia, but without Indian influence.
What would happen if the Portugeuse, instead of running off when theri ship was burned, got their dander up and sent the biggest invasion fleet they could gather in 1640? (or thereabouts, not sure of the date).