Skip to content
This repository has been archived by the owner on Apr 23, 2022. It is now read-only.
/ ether_house Public archive

An Arduino-based device that lights up things when your friends or family are home

License

Notifications You must be signed in to change notification settings

solarkennedy/ether_house

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Etherhouse

Video:
ether_house youtube demo

Final Product:
ether_houses

Etherhouse a project of mine involving eight Christmas gifts. Each gift involved a display of some model houses made from folded paper, each representing the home of a friend or family member.

The houses light up, depending on whether that family member is home or not. Their presence is detected based on if their smartphone is on the same network the etherhouse is on.

Hardware

Etherhouse involves a few hardware components:

  • Arduino + ENC28J60 module
  • Self-flickering LEDs
  • Paper model houses
  • Picture frame base

See the schematic (TODO) for electrical stuff.

Arduino + Ethernet

The Arduino is a standard Arduino Nano.

The Arduino connects to a ENC28J60 module via SPI using the ethercard library. I use modules with a built-in 3-5v converter so I can plug the two in directly.

Building Models

One main component of the etherhouse project is the construction of the paper models. As much as possible I tried to mimic the actual house owned by the family member by using Bing/Google Maps arial photographs.

You can buy the same tea-light 3d model I used as a starting point if you want.

I used the standard Silhouette software with a Silhouette Portrait to design, and cut the models. In reality, any cutting or CNC machine can do this, depending on how handy you are.

See house_models/README.md for more instructions and pictures.

Leds

To minimize components, I used a self-flickering yellow LED, sourced from Ebay.

Two LEDs are wired in serial for each house.

Software

This repo contains the actual code that runs on the Arduino. This uses one external library and is in the native Arduino C++. This library is slightly modified in order to sniff packets from a selected MAC address.

The Arduino runs a limited TCP/IP stack and interacts with the http api.

The code is written with basic error detection and reboot capabilities, to ensure the client continues to run without interruption or interaction. No one should need to "turn it off and on again."

In summary:

  • Arduino firmware (client)
    • Queries the server for configuration (target mac address)
    • Listens for packets from the targets cell phone
    • Updates the server when the target comes home or leaves
    • Periodically polls the server for state updates
    • Saves state in EEPROM
  • ether_housed running on the internet (server)
    • In charge of house => mac_address mapping
    • Store global state of who is home or not
    • Does API key auth
    • Stores state of when each house last checked in

Howto

  • Make the hardware
  • Pick secrets (API keys + MAC addresses)
  • Program the arduino with a particular house_id and api key
  • Run the server with synchronized secrets

Syslog

The etherhouse client logs to broadcast syslog for debug purposes.

To listen for the messages, configure your syslog server. If you are using rsyslog:

# cat 20-etherhouse.conf 
$RepeatedMsgReduction off
#news.* /var/log/etherhouse.log
:source, startswith, "etherhouse" /var/log/etherhouse.log

$ touch /varlog/etherhouse.log
$ chown syslog /varlog/etherhouse.log
$ restart rsyslog
$ tail -f /varlog/etherhouse.log

About

An Arduino-based device that lights up things when your friends or family are home

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages