element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Enchanted Objects
  • Challenges & Projects
  • Design Challenges
  • Enchanted Objects
  • More
  • Cancel
Enchanted Objects
Blog Finalisation
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: crjeder
  • Date Created: 24 Jun 2015 7:27 PM Date Created
  • Views 1122 views
  • Likes 7 likes
  • Comments 5 comments
  • smart_key_hooks
  • enchanted_objects
Related
Recommended

Finalisation

crjeder
crjeder
24 Jun 2015

Time is up! And I am not done yet. So I have to pack my stuff and present what I have achieved in the past 16 weeks.

 

Smart Key Hooks

 

What are smart key hooks? Or what are key hooks anyway?

Basically they are a place to hang your keys like this:

image

But for me it is a little more. By looking at it I know who's at home and who not and it is used to exchange important messages between family members:

image

(The mess is just utensils you want to reach from the doorstep.)

As is it works perfectly, is accepted by the users, has a intuitive user interface and is highly robust to operating errors by the user. Why does it need to be enchanted then? For integration into a SmartHome system and to make it's functions available online. For the challenge I'v decided to concentrate on on the later.

 

Planed Features

In Smart Key Hooks - Prelude I proposed the following enchantments:

  1. No user interaction necessary besides hanging the keys
  2. RGB-LEDs to display status of the absent persons (i. E. "will come back soon", "away until next day", "at work" ...)
  3. RESTful / IFTTT / Tasker (android) interface

The first feature is needed for user acceptance where the others really add functionality. 3) Provides local, physical functionality to the network and 2) adds information from the "Cloud" back to the physical interface. These are very high-level descriptions of the enchantments which, of course had to be concretised during the challenge.

 

Optional Features

Since I had no clue how long It could me take to implement the basic features or if I can implement them at all I specified a part of the functionality I would like to have as optional, hoping that everything runs smooth and I will be able to implement them as well.

  1. leaving speech messages which get played when the person respective the key returns
  2. Detection of a specific key ring independent of the hook it was hanged on
  3. Placing "ToDo" lists (on paper) on the board and sending "accepted" messages to listeners when it was removed

Item 1) is a huge enchantment which does not only add a lot of hardware (microphone, speaker, button, memory,...) but also the infrastructure for handling audio and adding a new interface, etc. In 3) I would integrate the second function which the physical hooks serve into the smart version. Detecting the changes on the messages and link push notifications to them. Item 2) was optional because I did not know if there is a feasible solution for identifying the individual key rings. The presence of any key ring could always be detected by a simple switch leaving it to the user to select the correct hook.

 

Achievements

 

While testing various methods to detect and identify key rings which are placed on a hook (Identifying Keys) I found one solution which satisfies the optional feature 2).

image

By using 1-Wire EEPROM or ID devices inside a key tag I am able to identify individual key tags and thus key rings regardless on which hook they were placed as. In theory (but I haven't tested) this should work even when more than one key tag hangs on each hook since 1-Wire is a bus system. This is necessary for the clean and unchanged user interface of the Smart Key Hooks.

For the status LEDs I identified two options: use the provided Infineon RGB Shield and time division multiplex the output to multiple LEDs (preferred) or to use WS2812B LEDs on the SAMA5D4. In Using the RGB LED Lighting Shield on SAMA5D4 Xplained I found out that Linux does not support 10-bit I2C addresses and therefore abandoned this option as to time intensive.

image

Then I turned my attention to the second option which turned out to be a learning experience and not less time consuming. Since there was no library available which allowed interfacing with the WS2812 form Linux or the SAMA5D4 I had to find a solution: using PWM hardware to bit bang the required signal (Generating a Mysterious Signal, Use WS2812B on the SAMA5D4 Xplained and More Datasheet Studying). The code compiles but segfaults when I run it on the board. Unfortunately there is no time left to debug it.

The tasker interface was presented in Smart Key Hooks Client. By replacing the client libraries it should be relatively easy to interface to any HomeAutomation system. Combined with home automation Smart Key Hooks would unfold their full power. Possible application would be to check if doors (e. g. the shed door) are locked when the key is returned or if all windows are closed when the last person leaves. That was my idea when I proposed Smart Key Hooks as my entry in the design completion.


To Help the jury to rate this project I will summarize the all achievements:

Proposed Features:

 

FeatureImplemented?

No user interaction necessary besides hanging the keys

image
RGB-LEDs to display statusimage

RESTful / IFTTT / Tasker (android) interface

image

Optional Features:

 

FeatureImplemented?
Leaving speech messages which get played when the person respective the key returnsimage

Detection of a specific key ring independent of the hook it was hanged on

image
Detecting "ToDo" lists (on paper) on the boardimage

Bonus:

 

AchievementImplemented?
WS2812B using PWM hardwareimage
explanation how to use advanced PWM features on SAMA5D4image
101 on logic analyser and debugging hardwareimage
sending encrypted push notifications with pushbullet (or any other push service)image
explained basics of 1-wire communicationimage
experiments with "das U-Boot" on SAMA5D4image
changing the Infineon RGB Shields firmware to accept 7-bit I2C addressesimage
identified signal lines which I could used as GPIOimage

 

Assessment

 

In Enchanted Objects Design Challenge - Detailed Information element14 asked to give an assessment of the enchanted object which I will give in the following paragraph.

 

Durability

It is hard to imagine that normal use could destroy the Smart Key Hooks. Wear-out is not an issue here since no moving parts implement any of the enchantments. The most vulnerable part are the key tags. The prototypes easily can break or lose contact. But they can be easily made more resilient by a steel case and embedding the PCB in resin. A production key tag could look like this:

image

Since contacts of the 1-Wire bus are exposed (hook and back plane) they are exposed to electrostatic discharge (ESD). The devices I used are all protected to 8 kV (IEC 1000-4-2 Level 4) which is enough under normal circumstances. If you have a nylon carpet then you should think about extra protection (for up to 27 kV).

Therefore I can not see any parts which should need to be replaced due to failure for a very long time.


Cost

Cost for the whole solution is quite moderate:

PartApproximate Cost in € (per key tag)
Silicon ID (for key tag)1,00
PCB, Passive Components, Resin0,50
Key Tag Case1,00

 

That's 2,50 € per key ring where 5 to 10 should be enough for a normal household. Cost for the key rings are between 12,50 and 25 €

The real power of the SAMA5D4 Xpalined is not used therefore the cost for the central component can be significantly reduced by using e. g. the Raspberry PI model B which at the moment sells at around 30 €. Further reduction and WIFI connection (which most people prefer over wired LAN) can be archived by using a ESP8266 module which sell at ebay for around 3 €

 

PartApproximate Cost in €

MCU / Computer / Base Board

(Raspberry PI B)

30,00
WS2812B or similar LEDs 10 pcs.5,00
Passive Components1,00

The system cost is 48,50 to 61 €. Using a ESP8266 it comes down to 21,50 to 34,00 € which is really not bad for a smart home component.

Convenience

The usage is almost exactly as a with the un-enchanted version. Simply hang the key ring on a hook. Only difference is that you have to hang the hole in key tag (like in the photo above). Tasker is not really easy to use but once configured it does its job perfectly. Over all Smart Key Hooks are an easy to use enchanted object.

 

Accuracy

The presence of key tags is tracked with a selectable time resolution - the interval in which the 1-Wire bus is probed for new nodes can be configured. Smart Key Hooks track the presence of keys, not people. While the a person and his / her key ring normally would correlate this is the window of opportunity for imposture. Like in the very good video Workshopshed posted as a comment to one of my blog posts. The while solution is absolutely accurate in detecting the presence of key tags it can be arbitrary wrong in detecting the presence of persons.

 

Security

Network security basics as hardening (uninstalling unwanted services, secure configuration for the rest, changing default passwords, etc) and placing a firewall in front of the networked Smart Key Hooks is common practice so that I did not blog about it. A very powerful security measure is reducing the attack surface. This is archived by the fact that the server does not offer anything to the Internet but instead subscribes to a Pushbullet channel. Therefore the firewall allows only connections to (and answers from) the Pushbullet server(s). A hacker would have to attack Pushbullet or inject packages into the communication in order to do any harm to the Smart Key Hooks server. Packet injection is made almost impossible by using https.

An other facet of security is privacy. I do not want Pushbullet or anybody who could listen to the data transfers to learn anything about me and my families presence in the house. To archive this the messages sent are AES encrypted. For a small number of clients a pre shared key is a feasible and easy to implement option. The secure channel to transfer the key for the first time is simply to enter it on the mobile device. This is inconvenient but has to be done only once for every device. Further key changes can be sent as a message to the clients (which, of course, is encrypted by the old key). This is not perfect forward secrecy (see https://en.wikipedia.org/wiki/Forward_secrecy) which means that when one key is compromised all future keys are also known to the enemy, but is IMHO good enough. If you suspect that a key is compromised you always can manually set a new key on every client an be safe again. This is feasible only if you have a small amount of clients to which you have a secure channel (i. e. physical access).

Security is covered in more detail in Smart Key Hooks – The Design.

Use of the Project's Results

 

As is I would use Smart Key Hooks (after ironing out the last problems) for the following:

  • Check if children meet their "curfew"
  • Send reminders based on "leafing" or "returning" conditions (e. g. "don't forget the milk)
  • Send push messages to all persons at home (like "Can anyone please check if I've turned of the electric iron")

 

In conjunction with smart home / home automation I'd have a lot of use cases:

  • Alerting family members when the leave that not all windows / doors are closed
  • Remind them to take a umbrella if it is going to rain within the next hours
  • Check if shed / garage is locked when they enter the house
  • Turn off outdoor lightning when they enter the house
  • Turn on / off security systems based on presence
  • Automatically operate blinds when nobody is at home
  • ...

Smart Key Hooks will be the first smart home piece in my home which definitely will get smarter over the next years.

 

The main project results for me are however the knowledge I gained and the nice people I've met. That alone was worth the effort and is the most valuable take away.

Thanks

 

Finally allow me to thank to element14 and the sponsors for hosting the competition. It has been a pleasure to take part. And thanks to all those who helped me or where just fun to talk to although some of them also compete in the same challenge (in no particular order):

Workshopshed, clem57, shabaz, mcb1, Jan Cumps, DAB, balearicdynamics

I hope to see you all again

  • Sign in to reply

Top Comments

  • mcb1
    mcb1 over 10 years ago in reply to crjeder +3
    It's the time to start reading your "forget me not" blog Thanks but you really need to read and if stuck ... contact fvan http://www.element14.com/community/community/design-challenges/forget-me-not…
  • mcb1
    mcb1 over 10 years ago +2
    As with many prototypes, the design and implementation can consume vast amounts of time. Your idea has potential for the very reasons you have indicated in the last paragraph. I wonder if you could integrate…
  • crjeder
    crjeder over 10 years ago in reply to mcb1 +2
    Thanks! After digging a bit into the matter I think it should be relatively easy using the http binding.
  • crjeder
    crjeder over 10 years ago in reply to mcb1

    Thanks!

    After digging a bit into the matter I think it should be relatively easy using the http binding.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 10 years ago in reply to crjeder

    It's the time to start reading your "forget me not" blog

    Thanks but you really need to read and if stuck ... contact fvan

    http://www.element14.com/community/community/design-challenges/forget-me-not/blog/2014/08/04/forget-me-not--index--fvan

     

     

    He helped me with one part that I spent FAAARRR too much time on.

     

     

    Mark

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • crjeder
    crjeder over 10 years ago in reply to mcb1

    mcb1 wrote:

     

    I wonder if you could integrate it with OpenHAB that we used in the Forget Me Not challenge.

     

    Is it doable? Definitely yes!

    How hard is it? I have no clue (yet).

    Will I do it? When I need it (not anytime soon, there are to many projects waiting already...)

     

    Basically there is one message and one command to implement in the protocol binding. I am not sure if an item provider is needed to keep the key and led states.

    It's the time to start reading your "forget me not" blog (which I wanted to do but postponed it until after the enchanted objects competition).

    If implementing the binding is only a finger exercise I'll let you know image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 10 years ago

    As with many prototypes, the design and implementation can consume vast amounts of time.

     

    Your idea has potential for the very reasons you have indicated in the last paragraph.

     

    I wonder if you could integrate it with OpenHAB that we used in the Forget Me Not challenge.

    This could provide some of the control features for you, along with an interface that can be manipulated manually.

     

    Well done for acknowledging what you could and couldn't achieve in the time frame.

    You have sucessfully implemented the system as you initially outlined. image

     

    Mark

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Workshopshed
    Workshopshed over 10 years ago

    Great achievements and great report

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube