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 Laundry Room OpenHAB setup with custom icons
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: electronichamsters
  • Date Created: 24 Sep 2014 6:18 AM Date Created
  • Views 767 views
  • Likes 0 likes
  • Comments 1 comment
  • forget_me_not
  • flexible_home
Related
Recommended

Laundry Room OpenHAB setup with custom icons

electronichamsters
electronichamsters
24 Sep 2014

I've been working on the laundry room portion of my home automation system.  I've worked out the OpenHAB automation portion.  I've changed the way I've been doing alarms and light indicators from my previous demos, so I thought others might be interested in seeing these parts.

 

Here's a graphic of what the screen looks like.

 

image

 

 

For custom icons, I found out how to do them from an OpenHAB forum member.  For the item definition, I'm defining a switch item for the alarm, but I'm overriding the default icon with my custom "myalarm" icon.

 

Item Definition:

Switch itm_laun_water_leak_alm_sta "Laundry Water Leak Status" <myalarm>

 

 

This is done by creating three .png files in the <OpenHAB15\webapps\images> folder.  For the water leak alarm icon, I have these:

 

  • myalarm.png
  • myalarm-off.png
  • myalarm-on.png

 

Easy way to create these is to copy one of the existing icons and, preserving the size (32x32 pixel), edit the image with your custom image.  OpenHAB automatically searches out the "xxxx-off" and "xxxx-on" version of the icon if you have a mapping defined.  Then, to clear alarms when the status is in "alarmed" state, I use the off button to reset.

 

Sitemap Definition

Switch item=itm_laun_water_leak_alm_sta mappings=[OFF="Reset"]

 

I'm doing similarly with the lights on/off indicator, but using a number type since these are simple indicators.  That's better than how I was doing it before.

 

Item Definition:

Number itm_laun_light_icon "Laundry Room Light" <mylight>

 

Sitemap:

Text item=itm_laun_light_icon

 

Then, in the image folder:  mylight.png, mylight-0.png, mylight-1.png

  • Sign in to reply
  • mcb1
    mcb1 over 11 years ago

    Well done Eric.

    I hadn't noted the relationship before on the icons.

     

     

    I found you can specify whatever.map for contacts, and as long as you use that, it will use that .map file to translate the received info to the text on the right side.

    I'm using move.map for my movement sensors

    OPEN=yes
    CLOSED=no
    -=not sure
    undefined=unknown

     

    and contact.map for my pantry Door

    Open=0
    Closed=1
    OPEN=open
    CLOSED=closed
    -=not sure
    undefined=unknown

     

    I found the default used lowercase and the binding was using UPPERcase, hence it wasn't working correctly.

     

    Mark

    • 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