Distributed, Open Source Chat With Vector And Matrix

When it comes to chat, you have many choices. Facebook Messenger, Google Talk, Whatsapp, Kik, and Slack are all viable options. However, all of these choices are proprietary, and require you to use servers that you can’t run yourself. They’re highly centralized, closed source tools.

In the open source world, IRC has been the go to solution for chat for many years, and for good reason. Anyone can run a server, there’s many clients, and it’s built on open standards. But IRC comes from a pre-mobile world, and relies on clients to maintain persistent connections to the server. It’s not the best experience on a phone.

Matrix.org and Vector.im aim to be a modern solution to chat. Matrix is a standard for passing messages around, and Vector is a chat solution built on top, with support for iOS, Android, and your browser.

What makes this solution different is the concept of Homeservers. A Homeserver manages messages for users, recording them when they are received and providing them to users when they connect. Homeservers also “federate” to communicate amongst each other. This means anyone can run a Homeserver and connect it to the greater network of Matrix, providing a distributed approach to building a chat network.

Under the hood, Matrix is just HTTP. You send messages into the network with POST requests, and receive new messages by polling with GET requests. This means no persistent connections are required, which is perfect for mobile and low power devices.

On the topic of devices, Matrix is designed for general purpose messaging, not just chat. It should be pretty simple to connect hardware up to Matrix, which would provide a simple way to get data in and out of connected devices. Since it’s all HTTP, a device based on the ESP8266 could hop into your chat room with relative ease.

Matrix and Vector are very much in beta, but are definitely usable and worth a try. To get started, you can create an account on Vector.im and start chatting. We’re awaiting some of the features in the works, including end-to-end encryption, and hope to see some future hacks talking to the Matrix infrastructure.

Pokáde: Twitch Plays Pokemon, Reborn On Vintage Hardware

poke Early this year, Twitch Plays Pokemon, a webstream of tens of thousands of people playing the same game of Pokemon via web chat. It was certainly an interesting sociological phenomenon, but as in any system where thousands of people try to do a single thing, progress was exceedingly slow at points. This was compounded by the fact the Twitch stream delayed the chat by about 30 seconds.

At the time, there was some talk about setting up an alternative to the emulator-based Twitch stream. Ideas were floated, but until now, no one has yet come up with a workable solution. Now we have Pokáde: real Pokemon games (Red and Blue) running on real hardware (two Super Game Boys, two super Nintendos, and two Game Genies), streamed live to the Internet with an IRC-like chat function.

Simply for the ease of capturing the video of the stream, [Johannes], the guy behind all of this, is using a pair of Super Nintendos and Super Game Boys connected to USB video capture dongles. The Super Game Boys are modded to enable trading between the Red and Blue versions of the game, and controls are handled with a USB connection to the PC running the server.

Anyone can play the game, simply by going to the Pokáde Chat, entering the chat, and clicking on random buttons on the brick Game Boy GUI. The game ROMs have been slightly modified to disable the option of starting a new game, but this is still the classic Twitch Plays Pokemon experience: people all around the globe mashing buttons and creating a religion around a fossil pokemon.

Fubarino Contest Example: A Sneaky IRC Bot

adam-fubar

You may have heard about Hackaday’s contest to win one of 20 Fubarino boards. We included an example entry from [Mike]. Here’s my example entry for the contest: An IRC search Bot powered by a Wicked Device WildFire board. We’ve all seen IRC bot’s before, but how many have you seen that can turn on an LED while running off a cell phone battery?

The IRC bot’s operation is fairly straightforward. It enters a channel and can be commanded to search.  The first two searches will return links to Google searches for the strings given.  Every third search however, will return a link to Hackaday’s search page. In the example below, “SedAwk” is an unsuspecting user, and “SearchRobot” is our bot.

SedAwk: SearchRobot: SEARCH Unicorns
SearchRobot: Search Complete! https://www.google.com/#q=Unicorns
SedAwk: SearchRobot: SEARCH Rainbows
SearchRobot: Search Complete! https://www.google.com/#q=Rainbows
SedAwk: SearchRobot: SEARCH Quadcopters
SearchRobot: Search Complete! http://hackaday.com/?s=Quadcopters
SedAwk: What the heck?

Follow along after the break to see what other tricks the bot has up its sleeve…

Continue reading “Fubarino Contest Example: A Sneaky IRC Bot”

Pranking A Hackerspace IRC For April Fool’s Day

face

Like most hackerspaces, when the folks at DIYode, the Guelph, Ontario hackerspace, aren’t in the workshop, they’re on IRC. It’s a great way to build a community, complete with a bot that collects and catalogues to-do items, meeting topics, posts events to IRC, and even does a bit of text-to-speech so members currently at the DIYode can listen in on the IRC room. There’s also a webcam for the DIYode space that members check constantly. [Simon] thought it would be a great prank to freak out those members that constantly check the webcam, and we’ll say he succeeded with a little help from the Alabama Face Guy.

The build listens for a specific phrase in the IRC room – “Hey, someone just entered the shop without the doorbot noticing” – and sends a command via Python to an Arduino to raise and lower a cardboard cutout of a sneering face in front of the web cam. For an April Fool’s build, this is probably one of the most creative and creepy we’ve seen this year.

Air Freshener Hacking

In an effort to improve his marital standing [Tech B] hacked an air freshener to make it Internet controllable. The main component here is a Glade Sense and Spray. It cost him $7 and is meant to spray out some sweet smells when it senses motion in the room. The unit also has a manual spray button which he patched into with the help of a relay. From there some Arduino code and an IRC bot take over, letting him unleash freshness from anywhere he has IRC access.

When reading about this we were also thinking: “motion sensing circuitry available at local stores for just $7?”. We may have to conduct an investigation into the alternative usefulness of that package.

If you have another brand of automatic freshener around it should be just as easy to hack as this one was.

PropIRC: Propeller Based IRC Client

propeller

Many people don’t want to miss anything in their IRC room, so they “idle” or just leave the client open to capture all the conversations. It can be annoying to have it going in the background on your computer though. To remedy this, [Harrison] built a simple computer from a propeller microcontroller that’s only purpose is to connect to IRC servers. It can take a regular PS2 keyboard and works with a standard monitor at 1024×768. It’s compact size and low power requirements make it quite a useful tool to have around if you are always on IRC. you can download the source code and schematics on the site.

[Thanks Scott]

Twitter IRC Server, Tircd

tircd

tircd is an ircd proxy for talking to the Twitter API. It should work with any standard IRC client. After running the Perl script, you authenticate to the IRC server using your Twitter username as your /nick. Join the room #twitter and the /topic will be set to your last update. Any message you type will update Twitter and the room’s topic. All of the people you are following show up in the room as users and post messages as they tweet. If you private message one of them, it will become a direct message on Twitter. Other commands work too: /whois to get a person’s bio, /invite to start following, and /kick to unfollow. The project is brand new and will be added new features in the future like Search API support. Follow @tircd for updates.