This is heading in a good direction.hiran wrote: ↑Sat Jun 15, 2024 9:26 pmThinking about this:hiran wrote: ↑Sat Jun 15, 2024 9:16 pmAn excellent idea to reuse the existing tech stack. So the Oolite Debug Console could preserve it's use to alternatively show/produce MQTT messages while at the same time more and more instruments could be developed and attached. Which would again encourage others to take that route.MrFlibble wrote: ↑Sat Jun 15, 2024 8:18 pmWhat if starter were able to subscribe to a topic, and send anything published there back to Oolite, with filtered responses published. That would allow a kludgy debug console, and also facilitate instruments sending commands to oolite (pause on red alert if bridge empty).
That's a win-win situation.
OoliteStarter should then forward all messages from Oolite. If it is not meant for a special topic (e.g.oolite/comms
) it should go to a default topic likeoolite/debugConsole
. This way an MQTT oriented debug console could still decide which messages to react on.
At the same time I will introduce a topic likeoolite/input
. Messages here will be forwarded to Oolite on the debug console interface - which means they need to contain some JavaScript command. And again this would allow Oolite to react.
I was experimenting in that respect and created this code:
https://github.com/OoliteProject/Oolite ... r.java#L78
But that one is too ship speed oriented. We will need something more generic.
One for the back burner: Could the toplevel topic be configurable in some way, perhaps with an mqtt prefix field per installation in starters 'Oolite versions'? Multiple Oolites could share one MQTT server nicely.
My thinking goes something like this:
Arnold and I have installations sharing an MQTT server. I have two versions of Oolite running from starter, he has one. He sets Arnold/oolite as the prefix in his one, and I set flibble/oolite/dev and flibble/oolite/fun as my two. I'd only have to tweak the prefix on any client devices to switch versions, and all will remain sane. If Arnold decides to set up another one, with a different set of "remote instrumentation" he could use Arnold/otheroolite. Any prefix could be used, potentially allowing even online MQTT servers to be involved (I know.. glaring security hole!, ssl required).
A dev might be able to directly debug a user's Oolite on the other side of the planet by asking them to connect to an MQTT server with starter!