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
Forget Me Not Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Forget Me Not Design Challenge
  • More
  • Cancel
Forget Me Not Design Challenge
Blog Automatic arm/disarm of the security system - openHAB and bluetooth
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: tekmeister
  • Date Created: 23 Oct 2014 11:23 AM Date Created
  • Views 586 views
  • Likes 1 like
  • Comments 1 comment
  • forget_me_not_2014
  • iot_modern_security
Related
Recommended

Automatic arm/disarm of the security system - openHAB and bluetooth

tekmeister
tekmeister
23 Oct 2014

Most alarm systems these days use a keypad on the wall. Before you leave the house, you punch in your 4-digit code to arm the system. When you return, you enter the code again to disarm the system. This approach is limited in a number of ways.

 

The keypad needs to be wired into the system and placed by the entrance. If you have multiple entrances, you will often require multiple keypads (one at each exit). It's also difficult to track who is arming/disarming the system. Sure, you can issue each person a unique code (as happens with businesses), but alarm systems generally aren't designed to be programmed by an end-user. It's also easy for people to forget to arm the system before they leave, which can result in protracted periods where your assets are unprotected.

 

For my openHAB project, my solution was to use Bluetooth. The idea was to set up a list of "trusted" Bluetooth devices and then to automatically enable the security system (along with alerts) if no devices were in range. Well, that was the idea at least. There are a few gotchas that caught me out when I was setting it up. Hopefully this post will save you in time and frustration when you have similar issues.

 

 

Getting started was easy. I bought a cheap USB Bluetooth dongle and plugged it into the RaspberryPi. I installed bluez (sudo apt-get install bluez). Then I checked that I was able to detect my Bluetooth devices:

hcitool scan

 

 

Be aware that not all phones advertise Bluetooth continuously. My Nokia Windows Phone unhelpfully only advertises Bluetooth when on the Bluetooth settings page, so is not suitable for this application.

 

To integrate with openHAB, use the page https://code.google.com/p/openhab-samples/wiki/Tricks#Use_cheap_bluetooth_dongles_on_remote_PCs_to_detect_your_phone/w as a reference.

 

I also have yet to have success getting this working with my Fitbit Flex wristband. It uses Bluetooth Low Energy (BLE), so you need to use a different command to scan for the devices:

 

sudo hcitool lescan

 

I was able to see the Flex but not connect. According to RPi Bluetooth LE - eLinux.org, it might be related to the older 4.99 version of bluez provided from the Raspbian packages. My next step is to test with version 5.4 and then I'll report back.

 

This concept could be expanded in the future to provide selective arming of parts of the house. For example, a Bluetooth receiver in each room would allow you to detect whether any "trusted" devices were in range, and modify the sensitivity of other sensors as a result.

  • Sign in to reply
  • ravi_butani
    ravi_butani over 10 years ago

    Yup... The entire challenge is around answer home auto related queation when u are away from ur hom .... I hv seen first post which says u r away from home or not..... .

    • 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