Saturday, April 4, 2015

MQTT - Bridge Work-a-Round

 UPDATE:
I was using a very OLD version of "mosquitto" which did not support Bridges well, I am hoping the current version will work better.

-

To experiment with the Internet-of-Things (IoT), while waiting to receive my Esp8266's (see previous post), I have enlisted my Raspberry PI's into playing the part of a remote data collection device. My Desktop Workstation is the Control Point and the Master MQTT Message Broker.

Originally I had planned to use a Master/Slave Bridged Broker configuration, where the Workstation would be the Master, and the Raspberry PI's would be a Bridged Slave Brokers, and they would collect data and messages from the Esp8266's.

But, I have not been able to get the "mosquitto" Bridged Broker configuration to work as documented :-(

I have a work-a-round; I will temporary use an "ssh tunnel" to directly collect messages from the Raspberry PI's.

At each Raspberry PI's, an "ssh tunnel" is created for "port 1883" (the MQTT port), and therefore the Master Broker is directly available to the Raspberry PI's. A side benefit of is; the "tunnel" is compressed and encrypted.

On Raspberry PI:


$ ssh -CnNTf -L 1883:localhost:1883 <master workstation IPA>




With this setup, I can conduct; tests for camera servo control, send SMS messages to the Cell Phone, and other experiments (see previous posts).



-- Home Page: https://WA0UWH.blogspot.com

No comments:

Post a Comment