A couple of weeks ago a friend introduced me to a dirt cheap wifi enabled mains switch. I’ve been creating my own wifi switches for a few years now but at $5 it is not worth it anymore for me to spend time adding electronic modules to make one.

The original device comes loaded with a firmware that can be used with a specific piece of software.  Now  I don’t know about you, but I rather run my own stack of software on it because I do have some trust issues, specially when I have no idea who’s behind the software development.


Fortunately there are several tutorials that you can explain everything you need to know to upload a custom firmware. This was the one that I used. TL;DR: solder a 5 pin 0.1in header to access the UART port and use one of those usb->uart converters.



My requirements were pretty simple: A tiny webserver should be up and running  ( connecting to my home network ) exposing two or three endpoints ( enable, disable, status ). This is the result:



#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
const char* ssid = ".....";
const char* password = ".....";
ESP8266WebServer server(80);
const int led = 13;
bool relayOn = false;
void handleRoot() {
  digitalWrite(led, 1);
  server.send(200, "text/plain", "hello from Sonoff\nRelay status:" + ( relayOn ? String("ON") : String("OFF") ) );
  digitalWrite(led, 0);
void handleNotFound() {
  digitalWrite(led, 1);
  String message = "File Not Found\n\n";
  message += "URI: ";
  message += server.uri();
  message += "\nMethod: ";
  message += (server.method() == HTTP_GET) ? "GET" : "POST";
  message += "\nArguments: ";
  message += server.args();
  message += "\n";
  for (uint8_t i = 0; i < server.args(); i++) {
    message += " " + server.argName(i) + ": " + server.arg(i) + "\n";
  server.send(404, "text/plain", message);
  digitalWrite(led, 0);
void setup(void) {
  pinMode(led, OUTPUT);
  pinMode(12, OUTPUT);
  digitalWrite(led, 0);
  WiFi.begin(ssid, password);
  // Wait for connection
  while (WiFi.status() != WL_CONNECTED) {
  Serial.print("Connected to ");
  Serial.print("IP address: ");
  if (MDNS.begin("esp8266")) {
    Serial.println("MDNS responder started");
  server.on("/", handleRoot);
  server.on("/enable", []() {
    server.send(200, "text/plain", "Relay enabled");
  server.on("/disable", []() {
    server.send(200, "text/plain", "Relay disabled");
  server.on("/toggle", []() {
    if ( relayOn )
      server.send(200, "text/plain", "Relay enabled");
      server.send(200, "text/plain", "Relay disabled");
  Serial.println("HTTP server started");
void loop(void) {
void turnOn() {
  digitalWrite(12, HIGH);
  relayOn = true;
void turnOff() {
  digitalWrite(12, LOW);
  relayOn = false;
void toggleRelay() {
  if ( relayOn ) {
    digitalWrite(12, LOW);
    relayOn = false;
  }  else {
    digitalWrite(12, HIGH);
    relayOn = true;



There’s a GPIO pin that you can use for things like 1wire protocol devices ( e.g. ds18b20 temperature sensor, or a DHT22/11 ). I’m planing to add that to this simple sketch. In the meantime feel free to check out the repository . All of the updated will be there.


PS: Yes, I know the code is ugly, but that was not the point. Feel free to change it and improve it!

Today I decided to buy a mechanical keyboard. I was looking for a minimalist TKL and the one I picked was an Ozone Strike Battle with brown cherry mx switches. What I wasn’t counting on is the crappy support provided by a vendor that could render useless a simple device just like a keyboard.


The first time I plugged the keyboard in my macbook, the keys were completely messed up. And I’m not talking about the symbols or special keys. Several keys were bound to the same value and some others didn’t even have a valued assigned.  After spending a few minutes googling, I found a thread that gave me the first hint about what was happening. Unfortunately this didn’t work for me and it took me some time to understand why. It seems that newer keyboards have different ids which are not configured. The solution was to clone the repository found in the previous link, use their tool to detect the bcdDevice, add it to the config and compile the kernel extension.


I’m not an expert and it took me a couple of hours to do so because I couldn’t find the right sources for one of the dependencies that are required – IOKit – but once I did it, everything worked as expected and right now I’m writing this post using my new mechanical keyboard 🙂


good meme


Step by Step: How to make it work for you?

  • Navigate to the link mentioned above and download the kernel extension mentioned there ( or use this direct link )
  • Try to installed it. If you’re using El Capitan, you’ll have to disable System Integrity protection to load the kernel extension. Try the following:
    1. Reboot your computer and press cmd + R during boot to enter recovery mode.
    2. Open a console and type csrutil disable; rebootThis will allow you to use kernel extensions that were not signed by Apple.
  • If you are running a previous version of OSX, then you can just do sudo nvram boot-args=kext-dev-mode=1
  • Load the extension: kextutil -v /System/Library/Extensions/IOUSBHIDDriverDescriptorOverride.kext
  • Plug in the keyboard. If your keyboard is now responding correctly then everything is OK. If not, you might have one of the new versions that have a different bcdDevice.  You can download this custom version  of the kernel extension that I compiled and see if it works for you: http://davidgouveia.net/goodies/IOUSBHIDDriverDescriptorOverride.kext.tar.gz

If you want to compile it by yourself, make sure you have xcode installed and ruby 2.2.0.

brew install libusb
bundle install --without ""

rake scan
  • Check the idVendor, idProduct, and bcdDevice. Open the Info.plist file, locate the blocks of code related to the strike battle keyboard ( just search for “strike” ). Change those blocks of code to match the idVendor, idProduct, and bcdDevice values that you found using the previous command.

Screen Shot 2016-03-27 at 12.52.16

  • Compile the code using the instructions that you can find on the repository’s README.md:
# dependencies
gem install bundler
bundle install --without scan

# build
sudo cp -r build/Release/IOUSBHIDDriverDescriptorOverride.kext \
sudo kextutil \

This is it, you should now have a working kernel extension that suits your needs. Enjoy your new keyboard 🙂

Have you ever tried to enter the world of hydroponics but never did it because you thought that it would be very expensive?


Now you don’t have an excuse! I’ve prepared a howto using (almost) the cheapest parts that I could get. This was not meant to grow large plants but small ones will do just fine. In my case I intend  to grow chilli peppers so this kit is great!

And this is what you need:

  • Small flower box including the water plate. It is important that the water plate fits perfectly on top of the flower box (just like a lid).
  • Some plastic cups
  • Air pump
  • Plastic tubing
  • Air Stone diffuser
  • Tools ( Electric driller, hole saw, duct tape, sharp knife, etc)
  • Perlite & Vermiculite (you can use rock wool or any other substrate)

Try to buy a hole saw with the same diameter as the plastic cups that you are going to use (or vice versa). This will make things easier, trust me!

Continue reading

If you like Thunderbird then this is the chance for you to grab yourself a new domain for FREE!

This is what you have to do:


  • Download and install the popular e-mail client Thunderbird.
  • Start the client. On the first screen type in the domain you want to register and select only Gandi.net. Click “Search”:

  • From that list, click on the corresponding button showing 0.00 Eur a year.
  • Follow the instructions to register an account. YOU HAVE TO USE AN AMERICAN ADDRESS OTHERWISE IT WONT BE FREE.
  • Profit! Enjoy your brand new domain. You can now access the control panel and point it to your favourite server.

Hello ,

Recently I bought a tablet from Volumerates.com.
I found the product I was looking for, contacted their support and they confirmed that it was the real product.
I then ordered the item, but unfortunately when it arrived there were several mistakes:

  • It wasn’t the same product. They have sent me a different product with a worse performance. The CPU is a low end one. Same with the GPU.
  •  Not only it wasn’t what I ordered, but it was also faulty. Some times it would boot up and some times it wouldn’t (the screen would go crazy like a scrambled TV channel). In addition to that the touchscreen was not completely secure to the tablet (in one edge of the screen we could almost see the insides of the tablet).
  • In addition to be faulty, I was a USED product! One of the times it did boot to Android OS it was possible to see that there were several games installed and their scoreboards were filled!

Touchscreen lifted
I have contacted Volumerates, they apologized and asked me to return the tablet to them using registered mail. I did as they told me to do and send them the invoice of the shipping costs, but they refused to give me a refund for the shipping costs I had to pay to return the tablet to them.

I told them that at least they could offer me the shipping costs (around $20USD) in credit so I could buy other things from them and still they refuse to give me any money as either credit or a direct refund. I have threatened them with a PayPal dispute and they agreed to give me 10€ in credit and asked me to drop the PayPal dispute.

In the meantime, one and a half months passed since the original order and I’ve been trying to check on the status of the tablet to try to know when I was going to have the right tablet and they kept delaying responses and avoiding talking about the tablet. The only thing they kept saying was “could you please drop de PayPal dispute?”. After a few days, I told them that if they could not get me the right tablet, they I would like a refund so I could buy it from another place, and after that they started not responding.

Last week and since they were not responding I decided to escalate the dispute to a claim and let them handle this issue and today I was surprised with an offer from VolumeRates to refund me $35USD.

So, I have spent more than $157USD and all they offer me is $35USD. Don’t you think this is a joke?

To summarize, this is what happened:

  •  O ordered a specific model of tablet. Ainol Novo7 Advanced. I have asked them to CONFIRM that it was the real model BEFORE they ship it to me. They CONFIRMED IT.
  •   I have received a tablet and it was the WRONG MODEL. It was an Ainol Novo7 BASIC.
  • Not only it was the WRONG MODEL, it was also FAULTY. Some times it would turn on and others it wouldn’t, giving me a fuzzy image (like a scrambled TV Channel). Some edges of the screen were lifted and I could see the internal parts of the screen.
  • It was a USED PRODUCT! One of the times that it turned on I could see that it was used because there were no “Welcome Screen” to configure  settings of the Android OS (Everybody who has an Android device knows what I’m talking about) and there were games installed already! And not only they were installed, but there were also some hiscores!
  • I shipped the tablet back to them using registered email. They received it but started avoiding talking about it. They didn’t want to give me a refund for the shipping costs but after I threatened them with a paypal dispute they agreed at least in giving me 10€ as credit.
  • After a while avoiding talking about the tablet they told me that they COULDN’T GET ME the ORDERED MODEL. I asked for a refund so I could buy from another place and since they stopped responding again I have escalated the PayPal dispute to a PayPal claim.
  • Today I have received a message from PayPal Resolution Center offering me a partial refund of $35USD!

Is this a joke or what?


Just check it out the PayPal Email:

Dear David Gouveia,

We are in the process of investigating the following claim:

Seller’s Name: Hanas tech
Seller’s Email: [email protected]
Seller’s Transaction ID: xxxxxxxxxxxxxxxxx

Transaction Date: Dec 29, 2011
Transaction Amount: -$137.22 USD
Invoice ID: xxxxxxxxxxxxxx
Your Transaction ID: xxxxxxxxxxxxxxxxxx
Case Number: PPxxxxxxxxxxxxxx

Buyer’s Transaction ID: xxxxxxxxxx

The seller has offered a partial refund in the amount of $35.00 USD.

Please log in to the Resolution Center and accept or deny this offer within
10 calendar days.


We encourage you to consider the partial refund offer thoroughly. By
accepting the seller’s offer you will be closing this case amicably. If you
deny the seller’s offer, the investigation will continue. If the case is
decided in the seller’s favor, however, you may not receive a refund at all.

Your cooperation is essential to the claims process and failure to respond
will result in automatic cancellation of your claim. Once a claim is
automatically cancelled, you forfeit the possibility of a refund.

Yours sincerely,

Help Center:
Security Center:

Please do not reply to this email because we are not monitoring this inbox.
To get in touch with us, log in to your account and click “Contact Us” at
the bottom of any page.

Copyright © 2012 PayPal. All rights reserved.

PayPal (Europe) S.à r.l.et Cie, S.C.A.
Société en Commandite par Actions
Registered office: 22-24 Boulevard Royal, L-2449 Luxemburg
RCS Luxemburg B 118 349

PayPal Email ID  xxxxxxx


Are they kidding me or what? Is PayPal encouraging me to let go more than $100USD for something that was not my fault? Shouldn’t they protect the ones on the right side of the reason?


What could possibly be the reason for them to protect VolumeRates other than the money they earn in commissions from payments?



EDIT: Today I received another email from PayPal stating that they could not confirm delivery even though I have PROVIDED the TRACKING CODE:



Hello David Gouveia,

We have concluded our investigation into the following claim:

Seller’s Name: Hanas tech
Seller’s Email: [email protected]
Seller’s Transaction ID: 9HT97100FC7330801

Transaction Date: Dec 29, 2011
Transaction Amount: -$137.22 USD
Invoice ID: 111229GE2GI8VRS
Your Transaction ID: 5HK1958606992362T
Case Number: PP-001-646-077-481

Buyer’s Transaction ID: 5HK1958606992362T

The tracking information you provided was invalid and we were unable to
confirm delivery of the item associated with this claim. As a result, the
case is now considered closed and we are unable to process a refund.

We encourage you to work directly with the seller to find a resolution.

Thank you for your cooperation.


Protection Services Department

PayPal does not tolerate fraud or illegal activities. Your complaint has
been noted in the record of the PayPal user you reported. If we find this
user has violated our policies, we will investigate and take appropriate
action. If this occurs, you may be contacted in the future about the status
of this complaint.

To make sure future transactions proceed smoothly, we suggest you visit the
PayPal site and click the Security Center link located at the top of any
page. There you will find tips on how to avoid fraudulent sellers in the
“Fraud Prevention Tips for Buyers” section.

Please do not reply to this email. This mailbox is not monitored and you
will not receive a response. For assistance, log in to your PayPal account
and click the Help link in the top right corner of any PayPal page.

Copyright © 1999-2012 PayPal. All rights reserved.

PayPal (Europe) S.à r.l. & Cie, S.C.A.
Société en Commandite par Actions
Registered Office: 5th Floor 22-24 Boulevard Royal L-2449, Luxembourg
RCS Luxembourg B 118 349


Now please tell me, how is it possible that they could not confirm the tracking code:

I even gave PayPal the opportunity to use my login/password to access the support system of VolumeRates and confirm all our exchanged messages but they prefer to look the other way and help crooks like VolumeRates.

I already contacted Mastercard and filed a fraud claim. Lets see what will happen but I’ve learn a valuable lesson:

PayPal? NEVER AGAIN. If you need any help they will only protect sellers to protect their income.


VolumeRates? Scammers, Crooks, Thieves of the worst kind! They will simply ignore your messages and will try to make you delay the opening of a claim until there is nothing you can do! Stick with other low cost websites like DealExtreme!


Edit #2 Mar, 06 2012

Today I went to my Bank and a fraud claim was filed against PayPal and VolumeRates:

They told me at the bank that it would take a week to investigate this issue. I hope this brings me good news!