cosmic realms

a coder blog

WiFi Temperature Sensors

I wanted to know the temperature and humidty of several different rooms and compare that to outside readings.


  • Accurate Temperature and Humidty readings
  • Communicate over WiFi network
  • Rechargable LiPo battery should last 6+ months on one charge
  • Easy to charge each sensor unit without removing battery
  • Central eInk/ePaper display of all temperatures
  • Wall mounted case that detaches easily

Component lists, links and code located at the bottom of this post.

Let's start out with pictures:

Initial breadboard layout

Sensor Board: Wires/Resistors Only

Final Sensor

All Sensors Charging

Indoors 3D Printed Case

Sensor Case With Sensor

Sensor Case With Lid

Sensor Case in Translucent Red

Central eInk/ePaper Display

Outside 3D Printed Case

Outside 3D Printed Case Closed

I ended up choosing the following components:

The temp sensor I chose was vast overkill. If I had to do the project over again, I would choose the Adafruit DHT22 Temp+Humidity Sensor instead as it is far cheaper but still pretty accurate

All sensors send a temp+humidity+battery level every 10 minutes over wifi to a linux server running at home.

The first sensor I put outside died within a few hours, probably due to it being 90% humidity and raining. So I decided to get some RTV Silicone sealant and seal up the other outside one. Haven't had an issue with it since sealing.

The code for the microcontroller, server and display updater and display SVG are located here on github.

It also turns out that the ESP8266 microcontroller has an internal method available to read battery voltage (ADC_MODE(ADC_VCC); ESP.getVcc();) so I actually don't need those resistors anymore. NOTE: I've been informed that using this method to measure battery life isn't reliable. The resistor method I used seems to be the best approach.

The inside case I designed I have made available here on thingiverse. I made it with OpenSCAD which is the perfect tool for programmers who need to 3D model something.

The outside case I used is the MySensors Mini Weather Station on thingiverse.

These two links were invaluable for learning how to root the kobo and use it as the display device:

Resistor Test Tube Rack

I needed a way to store resistors for my electronics work.


  • Space for 75+ different resistor values
  • Space for 375+ total resistors
  • Quick and easy access
  • Out of the way
  • Cool looking

In researching a solution I found some folks who used test tubes. I loved the idea, but 75+ test tubes would take a lot of desk space.

So I decided I would design a custom rack solution to mount on the wall.


Final Results

(Click on the images for the full size versions)

Benchmark of node.js JSON Validation Modules Part 3

Below are benchmark results for several node.js JSON validation modules.

This is an update to a post I made 6 months ago.

Dec 2014 Update: Added 'revalidator' and updated module versions.

The following modules are benchmarked:

All modules validate with the JSON schema described here:

I used the latest schema version supported by each module. This is noted as (v2) (v3) or (v4).

20,000 valid and 20,000 invalid JSON objects were pre-generated with random data. Each validator module was tested against the same randomized objects.

Results - Valid Objects

Results - Invalid Objects


is-my-json-valid is the fastest validator for both valid and invalid objects.

It's so fast I had to make sure it was actually doing anything at all. Amazingly fast!

tv4 is still plenty fast validating valid objects but is a bit slow dealing with invalid ones.

Jayschema remains the slowest validator.

Lastly, a reminder, amanda only supports async validation and so that test includes some additional overhead in dealing with callbacks.

Source Code

Full source code for all the tests can be found here: