The most straightforward solution would be forward a router port to the ssh port (22) on your Pi at 47 X Rd, and tunnel in there from 55 X Rd.
First, open up the eventbus port at 47X:
brewblox-ctl service expose eventbus 1883:1883
Below is a good walktrough on how to set up an SSH tunnel. For it to work, you need to open a port on your router, and forward it to port 22 on your Pi at 47X.
Don’t open port 22 on your router: it’ll attract a lot of automated malware login attempts.
You must change the Pi password from it’s default value, or disable password SSH login entirely.
Let’s assume the external IP address of 47X is 123.456.0.47, you opened port 8822 on your router at 47X, and forwarded that to port 22 on your Pi.
Follow the instructions in the article. They use 8080 as redirect target, and 3000 as application port.
The 8080 doesn’t matter as long as there’s no conflict.
Replace 3000 with 1883, and where they connect with admin@server1.example.com
, use pi@123.456.0.47:8822
.
Now, at 55X, install Brewblox. Discover and name your sensor. Use a different name for your Spark service than the ones running at 47X.
When your service is set up and working locally, we’ll forward all its published data through the SSH tunnel to 47X.
The use case is rather interesting, so I think I’ll build a trivial forwarding service, and publish that as docker image. I’ll let you know in a bit when it’s done.