SmarterHome [Personal Project]

##What is SmarterHome?

SmarterHome has been developed by myself over the last 6 months as a learning exercise, with the intention of making my home automation as easy, re-usable, stable and dynamic as possible and I am sharing with you as you may find this useful!

My main issue was that there are a lot of good apps out there that do specific activities, but passing data between them required virtual switches and bodges and some things were just not possible and at the start CoRE did not exist, and since it’s clear that CoRE can do some of the stuff that this app does, often it’s complicated to setup for beginners, however my intention is that this will work with CoRE and other apps to allow much more complicated and personalised scenarios.

Disclaimer: This SmartApp has been developed for my own personal use and is under constant development and functionality may change without notice, and may even require you to remove and re-install and there is no formal support provided for this SmartApp… I have however informally released this app as I expect others will find it useful and I will provide support where I can (as I already do for other apps I have released). Feature requests are welcome, providing I can test the changes and they fit within the intention of the app.

##FEATURES

1. General

  • General

  • Repeat last notification (Via SmartApp screen, remote and external interface)

  • Remote Control

  • Trigger selected Scenes or Notifications easily

  • Make the Remote default when loading the SmartApp for easy access

  • Modes / Time Modes (Under Settings)

  • You can use the ST mode to control and restrict actions such as lighting levels

  • You can alternatively set “Time Modes” which are managed internally to SmarterHome, and change depending on the time of day.

  • Time Modes can be kept independent of the ST mode, or can be optionally pushed to update the ST mode (currently every 15 minutes)

2. Modules

These are the building blocks of your automated home, each Module Type has a different function and each block can be re-used and some can even pass data between them, for things like customised notifications.

  • MultiMedia

  • Interface to external multimedia device types to trigger scenes and notifications

  • Designed specifically with Plex Plus in mind for advanced functionality, however should work with Plex Manager and any other media or audio device types

  • Notification

  • Customisable notifications via lighting, sirens, audio devices, SMS and push events

  • Notification Queuing:

    • Queue – Wait until completion of previous notification
    • Drop – If notification in progress, drop the new notification (don’t add to queue)
    • Force – Play regardless of any other notification (push to front of queue)
    • Bypass – Similar to “Force” however it is invisible to other notifications (Bypasses the queue entirely)
  • Notification Rules:

    • Delay after event triggered
    • Trigger only after sensor triggers, such as door opening
    • Cancel if not triggered after X seconds
  • Notification via:

    • In App Push
    • SMS
    • Audio – Play MP3/WAV
    • Text to Speech
    • Flashing Lights
  • Push / SMS / Audio message types

    • Custom message (static text specified by you)
    • Dynamic message (build your own dynamic message consisting of different selectable variables, such as “Hello [name]”,“Doors and windows open”,”People home”
  • Lighting Notification Types

    • Flash On/Off x times
    • Flash color (and return to original setting)
    • Custom Flash color (and return to original setting) – you can build a color sequence of up to 20 seconds (ST limited), using custom timing and colors.
  • Alarms (untested)

    • Flash / Siren
  • People

  • Used to integrate the person in to your smart home.

  • Tracks presence (Arrival / Leaving the home)

    • Links to alarm arming and disarming (if configured)
    • You can configure different scenes /notifications per person (Notifications can then include the person’s Name)
    • Security (Future functionality) – user based PIN arming / disarming of different security modes.
    • Optionally turn off tracking
  • Scenes

  • A single scene can trigger different actions based on time of day or light level

  • Bulbs (Level, Color, Color Temperature, Optionally: Only if already on)

  • Switches

  • Trigger additional scenes / notifications

  • Trigger events in other apps (via appLink)

  • Security (Use at your own risk)

  • Create custom security profiles – not limited to Armed Away & Armed Home

  • Trigger routine (to arm SHM if required)

  • Trigger scenes and notifications

    • Immediately when sensors are triggered
    • After a specified delay
  • Disable security mode if X sensor is triggered (for example if movement on the stairs then disable “Night Mode”)

  • Enable vacation mode (Make it look like you are home)

  • Zone

  • Zones are pre-defined areas for actions to take place

  • Trigger scenes / notifications based on occupancy

    • If movement then set a scene
    • If no movement after X seconds then set another scene
    • Unless a specified switch is on or Power meter above X watts (e.g. TV is on – can also be used with Host Pinger)
  • Climate (not yet implemented)

3. Security

  • Automatic arming /disarming of security
    • When everyone leaves the house or someone arrives
  • Door / Window left open
  • Trigger notification or scene when someone has left a door or window open for a set amount of time
  • Vacation mode
  • Set scenes/notifications to trigger during certain modes
  • Set other scenes/notifications to trigger randomly.

Some Examples Of How This App Can Be Used

These are just some examples of how you can use SmarterHome:

  • I’m Home - You arrive home, your alarm automatically disable, and your speaker says:
    “Hello [Your Name], Alarm is off.”
  • I’m Home #2 - You arrive home, and your speaker says
    "Hello [Your Name], Alarm is off, Katie is home."
  • Door Open - You accidentally leave the front door wide open, after X minutes you get a message:
    “The Front Door is open”
  • Movie Mode - When your media centre device starts playing (i.e. Plex), the main lights dim to off and the lamps come on low.
  • The Lover - You press a button and the lights dim to a warm yellow glow, the fire place lights up and Barry White comes on the speakers.
  • At Christmas - Walk in to the living room and the lights come on along with the Christmas tree to the sound of sleigh bells
  • Kids come home - one of your children come home, you get the below SMS message:
    “Emma has arrived at home”
  • Time Based Lighting - You wake up in the middle of the night and walk out in to the hallway… lights only come on to 10% brightness

I’ll add more as I think of them… there are many other scenarios that you can build with the built in logic…

Additional Notes / Features

  • appLink is a method for developers to develop their own apps and trigger scenes and notifications in SmarterHome and SmarterHome to trigger external events, this has not been formally released yet but is working. I need to have some discussions with developers to progress this in the way I want to, if you are a developer and are interested then feel free to PM me to learn more.

  • Amazon Echo Integration It is possible to trigger Scenes and Notifications using the Amazon Echo through another app I have written, this is using the appLink functionality above… Again this is fully working, but not documented or formally released (yet)… if there is demand I will expedite the formal release of this, also in the future this is also likely to be supported by at least one of the main Alexa apps on SmartThings.

Source Code

Paste in to your IDE as you would any other app

8 Likes

Version Control

Changes will be tracked here:

  • V0.0.1 - 20/01/17 - Initial Peek (Informal Release)
  • V0.0.2 - 22/01/17 - Update to open doors messaging and handling

Interesting. Congratulations on getting it all together.

Question - what type of lag is there for opening the smartapp / making any modifications?

1 Like

Cheers! Occasionally very slight lag when saving, but nothing major, give it a go it’s only copy pasting the code in no major initial setup or anything…

1 Like

Updated original post with the below to make potential benefits of the system clearer…

Some Examples Of How This App Can Be Used

These are just some examples of how you can use SmarterHome:

  • I’m Home - You arrive home, your alarm automatically disable, and your speaker says:
    “Hello [Your Name], Alarm is off.”
  • I’m Home #2 - You arrive home, and your speaker says
    "Hello [Your Name], Alarm is off, Katie is home."
  • Door Open - You accidentally leave the front door wide open, after X minutes you get a message:
    “The Front Door is open”
  • Movie Mode - When your media centre device starts playing (i.e. Plex), the main lights dim to off and the lamps come on low.
  • The Lover - You press a button and the lights dim to a warm yellow glow, the fire place lights up and Barry White comes on the speakers.
  • At Christmas - Walk in to the living room and the lights come on along with the Christmas tree to the sound of sleigh bells
  • Kids come home - one of your children come home, you get the below SMS message:
    “Emma has arrived at home”
  • Time Based Lighting - You wake up in the middle of the night and walk out in to the hallway… lights only come on to 10% brightness

I’ll add more as I think of them… there are many other scenarios that you can build with the built in logic…

1 Like