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 Forget_me_not : My Smart Home Post#4 Week-3 Pi, Enocean Sensors, openHAB, remote URL and email notification
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ravi_butani
  • Date Created: 21 Aug 2014 7:18 AM Date Created
  • Views 330 views
  • Likes 2 likes
  • Comments 0 comments
  • forget_me_not
  • eagle
  • openhab
  • tektronix
  • eclipse
  • internet_of_things
  • enocean
  • my_smart_home
  • raspberry_pi
  • raspberrypi
  • iot_homeauto
  • cadsoft
Related
Recommended

Forget_me_not : My Smart Home Post#4 Week-3 Pi, Enocean Sensors, openHAB, remote URL and email notification

ravi_butani
ravi_butani
21 Aug 2014

Table of Contents

 

In my previous post Forget_me_not : My Smart Home Post#3 Week-2 Enocean Sensors and openHAB I have shared working with enocean sensors and FHEM.

 

In this week I am very satisfied with my progress for my project "My Smart Home"


Major Progress of this week

 

* Working With OpenHAB and Enocean Sensors

* Setting Up Email notifications

* Setting Up remote URL (using IP address, not using domain name)

I have used this link https://github.com/openhab/openhab/wiki as great help for this work....

 

* Working with OpenHAB and Enocean Sensors and Setting-up email notifications :

My working OpenHAB URL on desktop....

image

working openHAB url and OpenHAB android application on my cell phone


imageimage

working script with email notification

image

notifications received on my email id

imageimage

Edited this line in start.sh so enocean pi is able to communicate with openhab

-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0

 

My Edited openhab.cfg file with these lines for configure email notification

######################## Mail Action configuration (ADDED) ############################
mail:hostname=smtp.gmail.com
mail:port=587
mail:username=yourusernamewithout_domain_name
mail:password=yourpassword
mail:from=your mail ID with domain Name
mail:tls=true

################ EnOcean Binding###############
#
# EnOcean USB adapter serial port
enocean:serialPort=/dev/ttyAMA0

 

My demo.rules file is here..

import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*
import org.openhab.binding.*
import org.openhab.action.*
import org.apache.commons.mail.*


/**
* This rule sends email to home owner when doorbell switch pressed with photo as attachment
* here execute command line is just for demo it actually takes photo from PI Camera and save this image in specified folder
* So far I am waiting for PI camera so its not implemented
*/
rule "send mail doorbell"
  when
  Item EnOcean_switch received update ON
  then
  sendMail("ravi_butani@yahoo.com", "My Smart Home (Doorbell)" , "You have a visitor...!!","http://localhost:8080/images/ondoor.png")
  executeCommandLine("/opt/openhab/a.out")
end


/**
* This rule sends email to home owner when new mail dropped in mail box
*/
rule "send mail update Mailbox "
  when
  Item EnOcean_contact received update CLOSED
  then
  sendMail("ravi_butani@yahoo.com", "My Smart Home (New Mail)" , "You have new mail in your mail box...!!")

end

 

My demo.sitemap file is here

sitemap demo label="My Smart Home"
{
  Frame label="EnOcean" {
  Switch item=EnOcean_switch
  Text item=EnOcean_sensor valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
  Text item=EnOcean_contact

  }



  Frame label="Date" {
  Text item=Date
  }

  Frame label="Who is on Door... ?" {
  Image url="http://localhost:8080/images/ondoor.png" label="openHAB" 
  }
}

 

now I am able to see events on my openHAB url in Home network as well as remote network and email notifications too on my email address..

 

here is android application https://play.google.com/store/apps/details?id=at.bherbst.net&hl=en I am using for Portforwarding for setup remote URL As I have not wi-fi router available at Home to setup remote URL...

I have also Attached my configuration folder here..

 

And still I am waiting for Enocean programmer and TEK DSO to set up my electronics hardware Part, And Pi camera for taking photo of visitor on Door image...This delay will not cause any problem because I am very confident about my electronics hardware design and debug skills..image

 

Still there is long way to go..and I am learning a lot....every next step comes with lots of Fun and Excitement image...

 

<< Previous

Home

Next >>

Attachments:
configurations.rar
  • Sign in to reply
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