Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andypiper/mqtt-chat
Simple MQTT-based chat room client written in Ruby
https://github.com/andypiper/mqtt-chat
mqtt ruby
Last synced: 14 days ago
JSON representation
Simple MQTT-based chat room client written in Ruby
- Host: GitHub
- URL: https://github.com/andypiper/mqtt-chat
- Owner: andypiper
- Created: 2013-01-14T16:16:59.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-01-14T22:24:44.000Z (almost 12 years ago)
- Last Synced: 2024-10-04T15:51:27.096Z (about 1 month ago)
- Topics: mqtt, ruby
- Language: Ruby
- Homepage:
- Size: 104 KB
- Stars: 14
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Simple MQTT-based chat room client written in Ruby
## Install
1. Install and run an MQTT broker. [mosquitto](http://mosquitto.org) is one choice, this also works with [RabbitMQ](http://rabbitmq.com) version 3 which includes MQTT support, and with [many other MQTT servers](http://mqtt.org/software#brokers).
2. Install the [mqtt](http://github.com/njh/ruby-mqtt) and ncurses-ruby gems
(NB the plain ncurses gem is harder to natively compile)```sudo gem install mqtt ncurses-ruby```
## Run
1. Run the client
```ruby ./mqtt-chat.rb ```
2. If you want to configure the app to run against an alternative MQTT broker running on a different host/post. Modify this line:
```ruby
mqtt = MQTT::Client.new('localhost')
```
replacing 'localhost' with the hostname or IP address of your chosen broker, optionally with a port number, e.g.```ruby
mqtt = MQTT::Client.new('m2m.eclipse.org', 1883)
```
## BackgroundModified from simple AMQP-based and MQTT-based chat servers originally published as Gists by [glejeune](https://gist.github.com/glejeune)
#### Changes from original
* added exit handler for cleaner end
* updated for newer ruby-mqtt gem
* fixed help text
* updated README