[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [mosquitto-dev] Bridging on a wakeup or connection
|
I also had a need to send commands to Mosquitto. I implemented a mechanism for a client connected as an authorized user to send commands using normal MQTT publish to a special topic. The mechanism is rudimentary in that there is no output to the client in response to the command, but it works for my situation.
-----Original Message-----
From: mosquitto-dev-bounces@xxxxxxxxxxx [mailto:mosquitto-dev-bounces@xxxxxxxxxxx] On Behalf Of Ian Craggs
Sent: Wednesday, July 23, 2014 5:41 AM
To: mosquitto-dev@xxxxxxxxxxx
Subject: Re: [mosquitto-dev] Bridging on a wakeup or connection
#1 In RSMB, I have the capability to stop and restart bridges with a command (read from a file). And create new ones. I think it would be good to add that to Mosquitto, but Roger was wondering how to best accept commands in Mosquitto, last time we discussed the topic.
#2 that could be done via MQTT? Mosquitto could send some information about the bridge starting (I think there might be a state change already indicated). Of course there would have to be an MQTT client running to listen for the signal and start the modem call.
Ian
On 07/22/2014 07:31 AM, Frank Pagliughi wrote:
> Hi,
>
> I'm testing out using Mosquitto on an embedded ARM board as a means of
> sending messages between the on-board apps. Everything is good there.
> Now I'm starting to play with bridging the broker to remote servers to
> get data off the board. When awake and connected to a LAN, it's
> working fine, but there are two situations with a similar pattern that
> I need help with:
>
> (1) The board is asleep most of the time, and the Ethernet controller
> powers down in suspend mode, severing TCP connections to the LAN. The
> board only remains awake for 5-10sec at a time. So immediately upon
> resume, it would be great to kick the broker to tell it to reconnect
> the bridge(s) and start pumping out the messages.
>
> (2) The machine may be deployed in a remote location with a
> cell/satellite modem in which case it has no LAN. It still wakes every
> few minutes, but only once every few hours does it power up the modem
> and make a short phone call to upload data.
>
> In the first case it may suffice to use automatic "start_time" and use
> a very small "restart_timeout" - like 1. The broker wouldn't
> (couldn't) thrash through the suspend, and would reestablish the
> connection very quickly on wakeup. I assume.
>
> But in the second case, it would be better for the broker to not be
> re-trying constantly, using CPU and battery time. What could I do
> here? Is there an existing configuration that might work?
>
> But into the future...
>
> Wish #1: It would be cool in either case to be able to give the
> broker a kick to say, "try to reconnect your bridges now". Obviously a
> signal would do the trick. It could be sent from a ppp-up or resume
> script.
>
> Wish #2: In the second (modem) case, the other way around might be a
> way to go. Rather then the system telling mosquitto when it's time to
> reconnect, mosquitto could tell the board when it's time to place a
> call. Use "lazy" startup with a threshold count, and have the broker
> emit a signal of some sort (maybe run a script or system command) when
> it's time to make a connection. Allow the system to make the call.
> Emit another signal when the idle_timeout expired (hang up the phone).
>
> Thanks,
> Frank
> _______________________________________________
> mosquitto-dev mailing list
> mosquitto-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/mosquitto-dev
--
Ian Craggs
icraggs@xxxxxxxxxx IBM United Kingdom
Committer on Paho, Mosquitto
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/mosquitto-dev
Please visit us at http://www.teletech.com
............................................................
This EMAIL and any attachments may contain confidential, proprietary and/or privileged information. If you are not the intended recipient, please immediately notify the sender by return email, and delete this communication and any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be subject to criminal and civil proceedings. Unless otherwise stated, opinions expressed in this email are those of the author and are not endorsed by TeleTech Holdings.
............................................................