The origin of the phrase "When the balloon goes up"

I have heard this phrase in stories and on TV, usually in a context implying the start of war or revolution (or just all hell breaking loose).
Anyone have a handle on it’s origin?

I can’t really verify this, but I was told it goes back to the time when hot-air balloons were used as military obsevation platforms (fitted with a telegraph, or semaphore).

When the balloon goes up, the battle is about to start.

Cassell’s Dictionary of Slang makes the same guess Exgineer does: