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
Forum Help : How to interface EnOcean Reed switch and temperature sensor
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 3 replies
  • Subscribers 3 subscribers
  • Views 986 views
  • Users 0 members are here
  • forget_me_not
  • openhab
  • enocean
  • iot_home_intelligent
  • forget_me_not_challenge_2014
Related

Help : How to interface EnOcean Reed switch and temperature sensor

vish
vish over 11 years ago

Hello all,

 

I'm a bit struggling to find out how to interface temperature sensor and reed switch to openHAB.

 

These are the hexdumps of enocean transmission at my serial port :

// Reed Switch
55 00 07 07 01 7A D5 09 00 83 35 06 00 01 FF FF FF FF 31 00 A0    // CLOSED
55 00 07 07 01 7A D5 08 00 83 35 06 00 01 FF FF FF FF 31 00 34    // OPEN
55 00 07 07 01 7A D5 09 00 83 35 06 00 01 FF FF FF FF 2E 00 34    // CLOSED
55 00 07 07 01 7A D5 08 00 83 35 06 00 01 FF FF FF FF 2C 00 8A    // OPEN

// Temperature sensor
55 00 0A 07 01 EB A5 00 00 32 00 00 83 02 E5 00 01 FF FF FF FF 48 00 02
55 00 0A 07 01 EB A5 00 00 2E 08 00 83 02 E5 00 01 FF FF FF FF 48 00 64
55 00 0A 07 01 EB A5 00 00 2D 08 00 83 02 E5 00 01 FF FF FF FF 4C 00 18
55 00 0A 07 01 EB A5 00 00 3D 08 00 83 02 E5 00 01 FF FF FF FF 44 00 CA

 

From the above hexdumps, I decoded my sensor ids( based on ESP3 and EEP documents )

Reed Swicth - 00:83:35:06
Temp Sensor - 00:83:02:E5

 

And then I wrote my openHAB configs as

// listing for 'model0.items'
Group All
Group model0_Weather    (All)

// EnOcean devices
Switch Rocker0 (All) {enocean="{id=00:1A:34:82, eep=F6:02:01, channel=B}"}   
Switch Rocker1 (All) {enocean="{id=00:1A:34:82, eep=F6:02:01, channel=A}"}
Number TempEnocean "Temperature [%.1f C]" <temperature> (All) {enocean="{id=00:83:02:E5, eep=A5:02:05, parameter=TEMPERATURE}"}
Contact myWindow "Window [MAP(en.map):%s]" (All) {enocean="id=00:83:35:06, eep=D5:00:01, parameter=CONTACT_STATE:closed"}

Group model0_Weather_Chart                                                    (model0_Weather)
Number model0_Weather_Temperature         "Outside Temperature [%.1f °C]"    <temperature> (model0_Weather_Chart) { http="<[http://weather.yahooapis.com/forecastrss?w=2295424&u=c:60000:XSLT(yahoo_weather_temperature.xsl)]" }
Number model0_Weather_Temp_Max         "Todays Maximum [%.1f °C]"    <temperature> (model0_Weather_Chart)
Number model0_Weather_Temp_Min         "Todays Minimum [%.1f °C]"    <temperature> (model0_Weather_Chart)
Number model0_Weather_Chart_Period        "Chart Period"
DateTime model0_Weather_LastUpdate        "Last Update [%1$ta %1$tR]"    <clock>

and

// listing for 'model0.sitemap'
sitemap model0 label="Main Menu" {
    Frame label="Enocean Devices" {
        Switch item=Rocker0 label="Rocker 0 Channel B"
        Switch item=Rocker1 label="Rocker 1 Channel A"
        Text   item=TempEnocean valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
        Text item=myWindow
    }
}

 

Now the problems are

1. While loading the site, temperature is not displayed. After some time( after next transmission, I guess ) temperature is updated to UI. But if I again reloads the page, it disappears.

imageimage

2. Even if I'm closing and opening my reed switch with the magnet provided, this is not updated to the UI. UI always stays blank for my reed switch. Additionally, if I'm trying to reload the page, I'm getting this WARNING in openHAB runtime terminal

15:40:34.517 WARN  o.o.c.t.i.s.MapTransformationService[:70] - Could not find a mapping for '-' in the file 'en.map'

I'm using the same 'en.map' file provided with sample demo of openHAB.

 

 

Please help,

vish

  • Sign in to reply
  • Cancel
Parents
  • fvan
    0 fvan over 11 years ago

    Hi,

     

    comparing your items for the temp and contact sensor, there's not much difference.

     

    Contact EnOcean_sensor_0180878B "Veranda door [MAP(en.map):%s]" <contact> (enocean) {enocean="{id=01:80:87:8B, eep=D5:00:01, parameter=CONTACT_STATE}" }
    Number EnOcean_sensor_0181A67A "Veranda [%.1f °C]" <temperature> (Temperature_Chart) {enocean="{id=01:81:A6:7A, eep=A5:02:05, parameter=TEMPERATURE}"}

     

    In fact, the only difference I see for the contact sensor is that my parameter is:

    parameter=CONTACT_STATE

     

    while yours is:

    parameter=CONTACT_STATE:closed

     

    As for the warning, this is normal. When the contact sensor is uninitialised, the value is "-" and there is no mapping for this.

    I solved this by modifying the en.map file to include:

     

    -=-

    parameter=CONTACT_STAT

    Which basically translates "-" to "-" ...

     

    Finally, one thing I noticed, is that the EnOcean sensors value disappear and return back to "-" when editing items or sitemaps via the openHAB designer.

    However, after restarting openHAB and not editing any items or sitemaps, the values remain correct.

     

    Hope any of this helps.

     

    Frederick

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
Reply
  • fvan
    0 fvan over 11 years ago

    Hi,

     

    comparing your items for the temp and contact sensor, there's not much difference.

     

    Contact EnOcean_sensor_0180878B "Veranda door [MAP(en.map):%s]" <contact> (enocean) {enocean="{id=01:80:87:8B, eep=D5:00:01, parameter=CONTACT_STATE}" }
    Number EnOcean_sensor_0181A67A "Veranda [%.1f °C]" <temperature> (Temperature_Chart) {enocean="{id=01:81:A6:7A, eep=A5:02:05, parameter=TEMPERATURE}"}

     

    In fact, the only difference I see for the contact sensor is that my parameter is:

    parameter=CONTACT_STATE

     

    while yours is:

    parameter=CONTACT_STATE:closed

     

    As for the warning, this is normal. When the contact sensor is uninitialised, the value is "-" and there is no mapping for this.

    I solved this by modifying the en.map file to include:

     

    -=-

    parameter=CONTACT_STAT

    Which basically translates "-" to "-" ...

     

    Finally, one thing I noticed, is that the EnOcean sensors value disappear and return back to "-" when editing items or sitemaps via the openHAB designer.

    However, after restarting openHAB and not editing any items or sitemaps, the values remain correct.

     

    Hope any of this helps.

     

    Frederick

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
Children
No Data
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