Posted on 4 Comments

SuperHouse Vlog #50: The future of SuperHouse

I have a lot of fun making SuperHouse videos, but recently I’ve been thinking about ways that I can make them better. I have many ideas for different types of videos and a list of about 50 episodes I want to make in the future. Please have your say in the future of SuperHouse!

The Patreon page is at www.patreon.com/superhouse

Below is the original episode plan from the early concept for SuperHouse as a high-tech home renovation TV show. There were still some holes in it, but it gave us a rough outline for what we thought could be structured as a show something like a high-tech version of “This Old House”.

Season 1

#1: Welcome to the SuperHouse

  • SuperHouse introduction
  • Montage of future topics
  • Demo of RFID door
  • Demo of mobile phone control of blinds
  • Field trip: Clipsal training house, Clifton Hill
  • SMS letterbox notification project
  • Tour of the website highlighting detailed instructions for letterbox hack

#2: Wiring Your World

  • Introduction to smart wiring: X10/A10, CeBUS, Dynalite
  • Internet access options: DSL, cable, 3G, wireless
  • Setting up a router / firewall
  • Field trip: Tasmanian house fitted with CeBUS cabling
  • Building a stud wall
  • Installing a LAN/WLAN
  • Community wireless

#3: The Ultimate Garage

  • Building a steel-frame garage
  • Driveway detectors: magnetic and infra-red
  • Painting interior walls and trim
  • Field trip: Dad’s place to talk about building envelope etc
  • Recharge station for EV
  • Extraction fan for exhaust (auto-start car)
  • Hanging plasterboard
  • Wall insulation
  • Low power / efficient lighting options

#4: Front Door and Access Control

  • Hanging a front door
  • Fitting electric striker plates
  • RFID access control
  • Keypad access control
  • Fingerprint scanner access control
  • Facial recognition access control
  • Field trip: Brisbane airport access control system?
  • Doorbell notification / video surveillance

#5: Pets, Sensors, and Storage

  • Building a built-in cupboard
  • Installing an intelligent cat/dog door
  • Field trip: R&D: robotic fish, other robot pets?
  • Using temperature, humidity, smoke, CO, and gas sensors
  • Humidity-controlled bathroom and fans

#6: Walls (this ep is very weak, need to find more)

  • Plasterboard: hanging, finishing, painting
  • Cornices, corners, architraves, skirting boards
  • Field trip: South Korea: grass house and Ubiquitous Dream Hall
  • Introduction to Arduino

#7: The Ultimate Home Office

  • Door, desk, drawers, storage
  • Connecting up your computer and printer
  • Field trip: multi-location, maybe Jason Smith’s home office + another
  • Sharing peripherals (printer, scanner, etc)
  • Multi-line phone, VoIP
  • Video conferencing
  • Home server
  • Online apps: Google docs, etc
  • Mobile devices: smartphones and synchronization

#8: Roofs, Water, and Solar

  • Replacing a tile roof with steel
  • Installing a water tank
  • Connecting tank depth sensors to the HA system
  • Connecting hot water system to the HA system
  • Field trip: R&D: solar cells
  • Installing solar panels and a reverse-reading meter
  • Installing solar hot water boosting
  • Roof insulation options

Season 2

#1: Floors

  • Floor and wall tiling
  • Fixing a squeeky floor
  • Floor polishing
  • ?
  • ?

#2: Fencing

  • Building a picket fence
  • ?
  • ?
  • ?

#3: Saving Water

  • Installing a water tank and rainwater collection system
  • Connecting depth sensors and pumps to the computer
  • Greywater: collection, purification, storage, use (legislation)

#4: Garden irrigation and lighting

  • Computer controlled sprinkler system
  • Installing garden lighting

#5: Video from everywhere

  • CCTV systems
  • Building a deck or verandah
  • Doorbell notification

#6: High-tech driveway

  • Installing electric driveway gates
  • Fitting a car sensor
  • CCTV feed to your car

#7: External walls

  • Replacing weatherboards
  • Rendering a brick wall
  • Exterior painting

#8: Heating and cooling

  • Installing central evaporative cooling
  • Installing central heating
  • Smart thermostat

Season 3

#1: Fireplace

  • Installing a gas fireplace
  • Connecting a gas fireplace to the computer

#2: Security

  • Using the house computer as a security system
  • Installing external security lighting
  • SMS notification
  • Dialler
  • Connecting motion detectors
  • Connecting smoke detectors

#3: Home entertainment

  • Installing a wall-mount flat-screen TV
  • Building a home media PC with MythTV
  • CCTV feeds to MythTV

#4: Control from anywhere

  • Building a house-wide audio system
  • Setting up a web interface for the house computer
  • Using a phone / iPod as a house controller
  • Connecting your house to virtual reality (Second Life?)

#5: Phones

  • Setting up a VoIP phone system with Asterisk
  • Connecting Asterisk to MythTV

#6: Curtains and blinds

  • Installing electric curtains and blinds
  • Linking curtains / blinds to the computer

#7: (Topic to be determined)

  • Linking an endless hot water system to the computer
  • Computer controlled water feature
  • The ultimate cubby house: VoIP
  • Voice control
  • Swimming pool management

#8: Grand Finale

  • “Live” show from the SuperHouse
  • House tour showing everything in place
  • Giveaway / prize draw for the crowd
  • Auction the house live on TV? Mmm, tempting!
Posted on 163 Comments

#21: Six Sonoff Secrets

Customise your Sonoff home automation controllers with a memory upgrade, weatherproof housing, control switches, sensors, and custom firmware.

ITEAD keep releasing new Sonoff models so this isn’t a complete list, but some of the models mentioned in the video include:

Storage

winbond-25q32fvThe flash memory chip in Sonoffs is 8Mbit, which is only 1MByte. Then if you want to do OTA (Over The Air) updates you need to limit your program size to less than half the available memory so that a new program can be uploaded alongside the old one. And if you use a SPIFFS (SPI Flash File System) to store non-volatile data outside your program, you lose even more memory.

You can replace the flash memory chip with a Winbond 25Q32FV in SOP-8 package, which is a 32Mbit (4MByte) chip. You can buy them on eBay for about US$3 for a pack of 10.

The original flash memory on the Sonoff is a Winbond 25Q08FV, which is the 8MBit (1MByte) version of the same chip.

Thanks to Pete Scargill for this idea! You can see more on his original blog post: “32Mb ESP01 and Sonoff

Safety

Sure, you can just cut a power lead and screw it into a Sonoff, but it’s probably a bad idea. You need to consider how your Sonoff will be used, including physical protection (stop little fingers reaching the terminals!) and liquid protection from spills. You also need to make sure there is strain relief on the cables to prevent them being pulled out, and possibly exposing live mains connections. You can do it cheaply using a plastic project box, and with some cable ties around the cables just inside the box so they can’t be pulled out. The result can be a very neat setup that won’t look like a dodgy DIY cable, and should be safe for general use.

sonoff-powerboard

You can go even further and use an IP-rated (Ingress Protection) case and cable glands, to make your Sonoff waterproof and physically very strong.

sonoff-ip56-case

In this video I gave a very simple explanation of the two-digit IP codes. There are also extensions to the code for other attributes. You can find more information and tables showing the specific meaning of the numbers at en.wikipedia.org/wiki/IP_Code.

Switches

Internet control is fun, but usually you also want some way to manually turn the output on or off without using your phone. You can modify a Sonoff to connect an external button across the pins of the built-in button, allowing you to toggle the output by pressing the button manually. The built-in button is connected to GPIO0, so when the button is pressed it pulls GPIO0 to GND. This is used during power-up to put the Sonoff into bootloader mode, and can also be used to toggle the output or do other actions.

sonoff-gpio0-terminals

Alternatively, you can connect an external button between GND and GPIO14 so that your software running on the Sonoff can detect when it has been pressed. Some firmware, including Theo Arends’s TASMOTA, supports this out of the box.

GPIO14 is exposed on the internal header used to upgrade the software on a standard Sonoff. There is already a pull-up resistor on GPIO14, so you don’t need any other parts. Just connect a button across the GPIO14 and GND pins, and you’re done!

sonoff-header

Even better, TASMOTA has an option to support an external switch instead of an external button. The difference is that with a button, you want the output to change state each time you press and release the button. This means the firmware needs to treat both the button press and release (cycling from HIGH to LOW to HIGH) as a single event. But a switch just changes state (goes from HIGH to LOW, or goes from LOW to HIGH) and stays there because it latches in place. So your software needs to treat each level change as a separate event, and toggle the output. Once again, TASMOTA supports this out of the box.

Sensors

As explained in the section about switches, the regular Sonoff exposes GPIO14 on the internal header that is used for flashing new firmware. The same header also provides GND and 3.3V connections, and the GPIO14 pin is provided with a pull-up resistor. This makes it super easy to connect anything that needs a single digital pin, such as an external switch / button or a one-wire sensor.

sonoff-th-sensor-pinoutTo make it even easier, the Sonoff TH10A and TH16A both feature a 2.5mm 4-way (TRRS) socket that is intended for connecting external sensors. The socket provides 3.3V, GND, and GPIO14: the same I/O pin exposed on the internal header of a normal Sonoff. That means you don’t even need to modify the board, you can simply plug in your sensor or switch externally.

sonoff-th-with-cable-800

The 2.5mm socket also has a 4th connection, but there are parts missing inside the Sonoff so it’s left unused. You can fix this easily by putting a solder blob across two pads on the Sonoff PCB, and optionally installing a pull-up resistor.

In the video I said that there is a 10k pull-up from GPIO14 to 3.3V. However, I didn’t notice that there are actually 2 pull-ups in parallel, so the effective pull-up on GPIO14 is 5k! You can still use a 10k pull-up on GPIO4 if you like, or you can use a 4.7k resistor if you want them to be about the same. 4.7k is common for I2C, but 10k is generally fine too.

sonoff-th-bottom-breakouts

Software

There are many alternative firmware projects for the Sonoff. Personally I love Theo Arends’s firmware, but there are many others that may suit you better.

To learn about how to install new firmware, see SuperHouseTV Episode #17: Home automation control with Sonoff, Arduino, MQTT, and OpenHAB.

If you have any other suggestions please let me know in the comments below, and I’ll update this list.

Sites

Because the Sonoff uses an ESP8266 microcontroller, there are a huge number of sites with information that’s relevant to the Sonoff. These include:

Posted on Leave a comment

SuperHouse Vlog #47: Husqvarna Automower power failure behaviour

The Husqvarna Automower relies on a boundary wire to tell the mower when it needs to stop and turn around. This is *really* important if you have a drop-off in your garden, like I do at the moment! If the mower can’t detect the boundary, it could drive itself right over a tiny cliff, or into a pond, or something dangerous like that. So what happens if the power fails while the mower is operating, and the boundary wire stops working? Let’s try it and see what happens!

Posted on 3 Comments

#20: The $6 universal home automation button

The “Flic” Bluetooth button inspired me to create something similar for my home automation system. But instead of using BLE, I just connected a $6 remote control and matching receiver module to an Arduino-compatible board, so that whenever I press the button it publishes to MQTT.

That’s incredibly handy, because it means you can just stick a button anywhere you like and have it trigger arbitrary events in your home automation system. Make it turn off every light in the house, or order you a pizza, or whatever you like.

In this project, I combined it with the ambient tile display that I showed back in Episode #14 so that I would never forget to take out the rubbish bins.

Each week, the home automation system turns on one of the LEDs so that it reminds me to take out one of the bins. A red LED says it’s time to take out the bin with the red lid, and a blue LED means the bin with the blue lid.

Then, when I take out the bin, I just push the button attached to the bin and it tells the home automation system that I’ve done my job. The notification is cleared until next week, when it comes on again.

Posted on 1 Comment

#19: Husqvarna Automower basics

Why mow the lawn yourself, when you can have a robot do it for you?

Husqvarna have very kindly supplied me with an Automower 320, which is a mid-range robot lawnmower that’s suitable to mid to large size suburban gardens.

Normally I like to focus on low-cost, DIY home automation projects, but this is just too good to pass up! In this episode I explain how the Automower works, how it’s different to a traditional manual mower, and (most importantly!) how my pets react to it.

In future episodes I’m going to try some creative things with the Automower. I can’t go totally crazy because the mower is supplied by Husqvarna as part of a pilot program and I’m not allowed to open it or modify it (yet!) but there are still some fun things we can do without voiding the warranty or having it repossessed.

The Automower range is listed on the Australian Husqvarna site: www.husqvarna.com/au/products/robotic-lawn-mowers

Disclosure: Husqvarna provided me with this mower as part of the Test Pilot program. www.automowertestpilots.com.au

Posted on 2 Comments

#18: Installing the ANNKE 4-channel CCTV system

Over the years I’ve slowly added individual IP cameras, both inside and outside the house. However, I’ve run into limitations such as how to store footage from the cameras for security purposes, and how to display multiple cameras simultaneously. I’ve used workarounds for these problems but it’s time to try out a proper camera system, rather than a collection of separate cameras.

I installed an ANNKE system a DVR and cameras to replace 4 of my existing IP cameras, to test how well it works. I also installed long video cables and a wireless mouse so I could mount the DVR inside my ceiling and display the camera feed on a couple of LCD TVs, and tested BNC-to-UTP adapters to run Cat-5 cable to a distant camera.

Unfortunately I discovered that the DVR requires Windows for network access, because it relies on a plug-in that doesn’t work on Mac or Linux. That means I had to run long video cables to the TVs that I use to display the live feed from the cameras. The end result is great, but it’s not how I intended to set it up.

This is the particular ANNKE 4-camera system that I installed, which is the Australian version: www.annkestore.com/annke-8ch-1080p-hd-cvi-security-camera-system-with-4-x-2mp-bullet-cameras-c51bp.html

This is the US version of the system: www.annkestore.com/annke-4ch-1080p-hd-tvi-security-camera-system-with-4-x-bullet-cameras-1tb-hdd.html

There are a bunch of other packages as well. The AUD price seems to vary: I think it’s generated by converting from USD at whatever the daily exchange rate is, so it’s different now to when I got mine.

Posted on 72 Comments

#17: Home automation control with Sonoff, Arduino, OpenHAB, and MQTT

The Sonoff from Itead Studio is a fantastic little mains-switching module with a built-in ESP8266 and WiFi. If you want an easy way to control mains devices such as lamps and fans, this could be it!

Sonoff modules are preloaded with firmware that allows them to be controlled by a phone app, so they’re very easy to get started. But that’s just the beginning: using a USB-serial converter and the Arduino IDE, you can load your own software on the Sonoff and make it do your bidding. I used the Arduino IDE to load a sketch with MQTT support and OTA (over the air) updates, allowing it to be controlled by OpenHAB.

Sonoff models mentioned in this video:

Start by adding ESP8266 support to the Arduino IDE by following the instructions at github.com/esp8266/Arduino. I used the simple “Boards Manager” method.

For OTA (over the air) update support you’ll also need to install Python 2.7.

You’ll also need a USB-serial converter with support for 3.3V I/O. I used the Freetronics USB-Serial Converter (of course!), which has a switch that lets you select 3.3V or 5V mode.

The “BasicOTABlink” example shown in the video can be found at github.com/superhouse/BasicOTABlink.

The “BasicOTARelay” example shown in the video can be found at github.com/superhouse/BasicOTARelay.

For more information, a fantastic resource is Pete Scargill’s blog post about Slampher and Sonoff.

If you want to upgrade the FLASH memory on your Sonoff, check out Pete Scargill’s blog post about upgrading ESP8266 memory.

Update 24 Sep 2016: fixed the example links.