Notices


Reply
Thread Tools
Posts: 1,048 | Thanked: 974 times | Joined on Mar 2008 @ SF Bay Area
#1
Mosquitto is a message broker that implements the MQ Telemetry Transport protocol version 3. MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model.

Why is pub/sub important and why do I care about porting it to Maemo and Diablo?
I needed a decent open source and easily configurable way to provide push support for all the services that would benefit from using a push model.
For example, email: wouldn't it be nice if there were a way for a script to subscribe to a feed that updated whenever there was a new email? That script would run on the n900 and would initiate an email update only when it got the update message. No more email polling = more battery life.
This can be applied to other things as well - for example, updating DialCentral or TOR or qgvdial whenever there is a contacts update... or on an incoming GV Text message... or an incoming GV phone call...

Whats in the packages?
mosquitto: This has the MQTT broker "mosquitto". In a typical usage scenario, you should never need to install this on your n900 or n810. It should sit on a "server". In my case, I plan to use my n810 as a server - at least for a while. There may be someone who wishes to use the n900 as the message broker server.
To account for all such possibilities, mosquitto has been packaged for Diablo as well as Fremantle.
The mosquitto package also contains a sample pub and sub binary. Look for it at /opt/maemo/usr/bin/mosquitto_pub and mosquitto_sub.

libmosquitto: This library is for "client" applications - the publisher and subscriber both use this library to contact the broker.
There are bindings for c and python in this package.

libmosquittopp: This package has the cpp bindings.

What should the average user do with these packages: At this moment, nothing. Don't bother installing them.
This announcement is targeted more towards developers.

Many thanks to xur17 - because the effort to package mosquitto started because xur17 researched it and to ralight - the creator of the mosquitto broker, its libraries and sample apps.

Happy hacking everyone!
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.
 

The Following 8 Users Say Thank You to uvatbc For This Useful Post:
Posts: 356 | Thanked: 123 times | Joined on Dec 2008
#2
Awesome!

Thanks a ton for this! Like I mentioned in the other thread, a few days ago I was just about to write an email to the maintainers of mosquitto to see if I could get some assistance with porting it.
 

The Following User Says Thank You to xur17 For This Useful Post:
Posts: 356 | Thanked: 123 times | Joined on Dec 2008
#3
I started playing with this some more. I got a simple python client that I can send messages to working.

What is the best way to secure my mosquito server so random people can't publish to it?
 
Posts: 1,048 | Thanked: 974 times | Joined on Mar 2008 @ SF Bay Area
#4
Originally Posted by xur17 View Post
I started playing with this some more. I got a simple python client that I can send messages to working.

What is the best way to secure my mosquito server so random people can't publish to it?
Good question... I'm not sure. PM "ralight" - he should know.
btw, I too played around a bit with this:
I ran mosquitto_sub on the n900 and piped its output to espeak.... and spooked my wife from another room
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.
 

The Following 2 Users Say Thank You to uvatbc For This Useful Post:
Posts: 1,048 | Thanked: 974 times | Joined on Mar 2008 @ SF Bay Area
#5
0.9.2 build has been fired.
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.
 

The Following 2 Users Say Thank You to uvatbc For This Useful Post:
Posts: 356 | Thanked: 123 times | Joined on Dec 2008
#6
Doesn't libmosquitto provide the mosquitto library for python (so I can use import mosquitto in my program)?

I can't get that to work for me. It is giving me this:
Code:
ImportError: No module named mosquitto
 
Posts: 1,048 | Thanked: 974 times | Joined on Mar 2008 @ SF Bay Area
#7
Originally Posted by xur17 View Post
Doesn't libmosquitto provide the mosquitto library for python (so I can use import mosquitto in my program)?

I can't get that to work for me. It is giving me this:
Code:
ImportError: No module named mosquitto
The python libraries _do_ exist in the deb. I'm guessing they aren't sitting in the right locations.
I'll look at this on Monday worst case.
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.
 

The Following User Says Thank You to uvatbc For This Useful Post:
Posts: 356 | Thanked: 123 times | Joined on Dec 2008
#8
Originally Posted by uvatbc View Post
The python libraries _do_ exist in the deb. I'm guessing they aren't sitting in the right locations.
I'll look at this on Monday worst case.
I think the library I need is in /opt/maemo/usr/lib/python2.3/site-packages. If I copy that file to the directory I am working in, it starts to work fine, but fails with:

Code:
NameError: name 'c_bool' is not defined
 
Posts: 1,048 | Thanked: 974 times | Joined on Mar 2008 @ SF Bay Area
#9
Originally Posted by xur17 View Post
I think the library I need is in /opt/maemo/usr/lib/python2.3/site-packages. If I copy that file to the directory I am working in, it starts to work fine, but fails with:

Code:
NameError: name 'c_bool' is not defined
Hm. It seems the Maemo c_types python library is broken - it doesn't define "c_bool", whereas my Ubuntu box does.
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.
 

The Following User Says Thank You to uvatbc For This Useful Post:
Posts: 356 | Thanked: 123 times | Joined on Dec 2008
#10
Originally Posted by uvatbc View Post
Hm. It seems the Maemo c_types python library is broken - it doesn't define "c_bool", whereas my Ubuntu box does.
Do you have any clue how to fix the Maemo c_types python library (or who to talk to)?

I am really interested in writing a mosquitto client for TOR, but this is preventing me from doing that.
 

The Following User Says Thank You to xur17 For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 16:21.