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.

K.I.S.S. Pi Sprinkler – Just Keep the Plants Alive

A good first step in a project is knowing what you want to do. [Ben Fino] made it clear that his Raspberry Pi Sprinkler control system for his wife’s garden had one goal: keep the plants alive. The resulting project is doing just that and no more.

The circuitry, and plumbing, is straightforward and explained well in the Instructable. All the electronics consists of is the Pi and a MOSFET to take the 3.3v GPIO to 5v to control a relay. The valve controlling the water requires 28v AC which necessitated the relay to control it. There are also three LEDs: one is for power, one to indicate when the valve is opened, and one is an extra for some future purpose.

The intriguing part is the use of weather data from the web to determine if it’s rained recently. Python scripts provided by [Ben’s] friend [Mark Veillette] use a weather site API to get the rainfall data. The main script is set to run once every 24 hours. [Ben] set his system to water unless the previous day had sufficient rain. How much rain and the number of look-back days is programmable.

What a great application of the KISS principle: keep it simple, stupid – except for that third LED without a purpose.

The Long and Bumpy Road to Internet in Serbia

Internet is taken for granted. These days you assume there is Internet and only wonder if there is free WiFi to get onto it. But in the early days, connecting to a network could be tough and this was particularly true in Serbia. The country’s Internet revolution was complicated by both technology and politics, but the vibrance of the tech community always found a way.

The story is a fascinating one shared by Dejan Ristanovic at the Hackaday | Belgrade conference. He is now the Editor-in-Chief of PC Press computer magazine and played an integral part in providing global email access to Serbia. Enjoy the video of his talk below and join me after the break for a few highlights.

Continue reading “The Long and Bumpy Road to Internet in Serbia”

Death, Taxes, and Laundry

There’s an old saying that the only two things that are certain are death and taxes. However, unless you live in a nudist colony, there’s probably also laundry. [Darpan Bajaj] and some friends were at a hackathon and decided to put their washing machine on the Internet.

Most of us here at Hackaday — and many Hackaday readers, judging by the comments — are a little suspicious about how much we really need everything attached to the Internet. However, a washing machine is probably not a bad idea: you use it often, you need to know when it is done, and you probably don’t want to just sit and watch it spin. Besides, the intended installation is in a hostel where there are multiple machines and many potential users.

Continue reading “Death, Taxes, and Laundry”

Presenting the Internet of Trash Cans !

This was gonna happen – sooner or later. [matthewhallberg] built a “Smart” trash can that is connected to the Internet and can be controlled by its own Android App. We’re not sure if the world needs it, but he wanted one and so built it. He started it out on a serious note, but quickly realized the fun part of this build – check out his funny Infomercial style video after the break.

trash_can_02The build itself is uncomplicated and can be replicated with ease. A servo motor helps flip the lid open and close. This is triggered by an ultrasonic ping sensor, which responds when someone waves a hand in front of the trash can. A second ping sensor helps inform the user when it is full and needs to be emptied. A Leonardo with the Idunio Yun shield helps connect the trash can to the internet. An mp3 shield connected to a set of powered computer speakers adds voice capability to the trash can, allowing it to play back pre-recorded sound clips. Finally, a Bluetooth module lets him connect it to an Android phone and the companion app controls the trash can remotely.

For the IoT side of things, [matthewhallberg] uses a Temboo account to send an email to the user when the trash can is full. The Arduino sketch, a header file to configure the Temboo account, and the Android application can all be downloaded from his blog. If this project inspires you, try building this awesome Robotic trash can which catches anything that you throw near it  or read the barcodes off the trash being thrown out and update the grocery list.

Continue reading “Presenting the Internet of Trash Cans !”

Let Alexa Control Your Life; Guide to Voice-Enable Everything

Let’s face it, automation doesn’t feel quite as futuristic unless you can just say what you want out loud and have the machines flawlessly obey. That is totally possible now — and on the cheap. Well, cheap as far as money goes. It can be an expensive learning curve to get it all working. This will help. [Lindo St. Angel] has put together a guide to navigate voice control of hardware using Amazon’s Alexa SDK.

We previously reported that Amazon’s AI had escaped its hardware prison in the form of the Alexa Skills Kit. Yes, calling it the Alexa SDK above is wrong it’s actually the ASK but nobody knows what that acronym is while most recognize the gist of an SDK. It gives you the hooks and the documentation necessary to leverage the functionality in your own applications. The core functionality of Alexa is voice recognition. Even so, it’s still a tall hill to climb.

[Lindo] has broken down the problem into a very manageable example. The Amazon Voice Service (part of ASK) is used for voice recognition and control. Amazon’s Lambda service connects the ASK to your piece of hardware; in this case he’s using a Raspberry Pi as the server. The final step is to connect your hardware to the Pi. [Lindo] is interfacing a keypad-based home automation system with the Pi but the sky’s the limit at this point.

With all the authentication and connectivity laid bare, this is a lot more approachable. The question is no longer can you connect everything to voice control. The question becomes should you give control of everything over to one single online service?

Quick Network Bridge Gets Off-grid Home Back Online

Off-grid living isn’t for everyone, but it has gotten easier in recent years. Cheap solar panels and wind turbines let you generate your own power, and there are plenty of strategies to deal with fuel, water and sanitation. But the one thing many folks find hard to do without – high-speed internet access – has few options for the really remote homestead. [tlankford01] wants to fix that and is working on an open-source mesh network to provide high-speed internet access to off-grid communities.

But first he had to deal with a major problem. With high-speed access provided by a Clearwire wireless network, streaming content to his two flat-screen TVs wasn’t a problem. At least until Sprint bought Clearwire and shut down the service in early November. Another ISP covered his area, but his house lies in a depression out of line of sight of their tower. So he rigged up a bridge between the WiMAX network and his lab. The bridge sits on a hill in sight of the ISP’s tower 3.5 miles away. Solar panels, a charge controller and deep-cycle batteries power everything, and a wireless link down the hill rounds out the build.

This is obviously a temporary solution, and probably wouldn’t last long in winter weather. But it’s working for now, and more importantly it’s acting as proof of concept for a larger mesh system [tlankford01] has in mind. There are plenty of details on what that would look like on his project page (linked above), and it’s worth a look too if you’re interested in off-grid connectivity.