NAT
The trick a home router uses so many devices with private addresses can share one public address.
Network address translation rewrites source addresses and ports as packets leave a private network, so many hosts share one public address; replies are mapped back, but unsolicited inbound connections have nowhere to go.
Examples
When the sensor at 192.168.1.37 port 49153 connects out, the router rewrites the source to its public address and records the mapping, say port 40001.
Because NAT only maps connections that start inside, a server can't connect in to the sensor, so the sensor always connects out to its broker.
See also