element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • 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
Forget Me Not Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Forget Me Not Design Challenge
  • More
  • Cancel
Forget Me Not Design Challenge
Blog IP Post 3: EnOcean Pi, Sensors and FHEM and the lost hours of sleep
  • Blog
  • Forum
  • Documents
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ipv1
  • Date Created: 5 Aug 2014 8:34 AM Date Created
  • Views 345 views
  • Likes 2 likes
  • Comments 17 comments
  • forget_me_not
  • forget_what
  • internet_of_things
  • enocean
Related
Recommended

IP Post 3: EnOcean Pi, Sensors and FHEM and the lost hours of sleep

ipv1
ipv1
5 Aug 2014

I received EnOcean Pi and the Sensors kit yesterday.  My first activity was to find out what pins the EnOcean Pi was using up. With a multimeter, I set out to do just that. My investigation ended at the obvious that the EnOcean Pi is connected to 4 pins

  1. Vcc (3.3V
  2. GND
  3. Uart_TX
  4. Uart_RX

 

The reset and anything else does not seem to be connected.This means I can solder on wires and leave the connector for my PiFace CAD. Before I heat my soldering Iron I need to verify if things are working before I start hacking at it. My first instinct was to startup OpenHAB and see how I can interface. Turns out in the bindings, you need a device ID. Actually you need an eep or equipment profile and an id. The equipment id can be found either in the bindings documentation at https://github.com/openhab/openhab/wiki/EnOcean-Binding or in the user manual like

The documentation said that the device id is on the packaging. Well it was not! #fail. So I ended up installing fhem which is a perl based home automation software. The details of how to install are given at fhem.org. Now I spent about an hour just trying to figure out why it did not display the enoceans link like it is supposed to. I forgot it's a serial device and our code does not yet know which serial port it is connected to. (Face-Palm moment) You have to activate one sensor like the rocker and viola! It shows up. It now knows where the EnOcean Pi is connected to. So my rocker shows up. What about the rest? The contact can be triggered by bringing the magnet near the reed switch. It pops up too. Now you can read the device IDs and the temperature sensors as it says on the FHEM console or read the log file. The temperature sensor can work be worked the same way.

 

The next step is adding the bindings to OpenHAB. I followed instructions which included disabling the RPi serial console which obviously I had done already. Then I proceeded to adding the bindings as per Wiki... guess what... No go! A few minutes on google and I found this in the wiki. https://github.com/openhab/openhab/wiki/Samples-Tricks

It says to add a parameter to the openhab start.sh file. So I did and I could now see the rocker working happily. I did have to modify the examples a bit.

The items part looks like this

Switch Rocker      "Rocker" <switch> (All) {enocean="{id=00:17:E5:7C, eep=F6:02:01, channel=B}"}
Number TempSens    "Temperature [%.1f °C]" <temperature> (All) { enocean="{id=00:82:FB:8E, eep=A5:02:05, parameter=TEMPERATURE}" }
Contact Contact1 "Contact [is now %s]" <contact> (All) { enocean="{id=00:83:4F:03, eep=D5:00:01, parameter=CONTACT_STATE}" }

 

Now I could not get the parameter=I to work as per documentation, I think they have changed it. Same for the Contact.

At this point I was getting nothing at the temperature and nothing for the contact. The rocker works happily.

 

According to the documentation for the temperature sensor, there is a WAKE0 pin which has a jumper connecting it to a pull-up voltage. You can manually wake it up by connecting to a ground pin. Now theses pins are really small but I managed to trigger it by carefully connecting it once. It transmits the temperature and the console screen shot is as follows.

Now at this point I have come to a few conclusions and they are:

  1. The OpenHAB documentation is a little out dated.
  2. The EnOceans sensors cannot really chuck out data all the time. Due to their power source, they are limited to refresh speeds.
  3. To program a sensor according to requirement, there is a need for a license as well as the EDK. We do not have access to the Protocol Library and IDE hence doing a recode and then rebind will be too time consuming to do without the API and tools.
  4. The rocker switch rocks!

 

I am also considering the possibility that there is something wrong with the sensor power storage as I don't see the LED flash every time I remove or place the magnet. It might be that the power store cell is not charged or damaged over time. I am not sure right now. So I will leave it alone for now.

 

So this is where I am going to modify my design. I initially though I could use an enocean sensor to rapidly update a status but I see now I have to find an alternative. Additionally I am also not going to try to program the sensors right now. IF I get the EDK THEN I will definitely code and document the modifications on the sensors themselves. So for right now I am going to make the best use of the current sensors and will start designing some of my own. This will be fun!

 

EDIT1: Now I started using these sensors out of the box and they did not work as expected. LOADS of people told me to put em in the sun so they can recharge. I am doing just that and it seems like you need to occasionally put em out to charge. They are working but I will do a post on how long they can work out of the dark.

 

 

<< Previous Post | Table Of Contents | Next Post >>

Anonymous
  • ipv1
    ipv1 over 7 years ago in reply to Former Member

    Thanks Mr.Kreitmair for the input. I hope the products grow and I will try to contribute by documenting my experiences. I understand that FHEM is a good product but my target is the use of OpenHAB. Additionally, I wanted to modify certain aspects of the enocean sensors myself but it seems like that is what the edk and dolphin suite will be for and hence it will have to wait.

    All in all I think I'm getting the hang of these sensors. Will post as I go along.

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • Former Member
    Former Member over 7 years ago

    Some background information to understand the status of EnOcean & openHAB:

    - OpenHAB has a basic support of EnOcean devices (e.g. PTM Switch, STM 330 temperature sensor and STM 320 magnet contact),
      this are very popular products but there are more than 1.200, see http://www.enocean-alliance.org/en/products/
      I'm sure this will get better since the project is growing well.
      Some documentation is wrong e.g. every EnOcean products has a printed ID. This is only correct for some products e.g. PTM 210.
      Printed ID depends on final product of OEM customers. In most cases it is not necessary because there is a LEARN button
      to pair the device with the receiver. For details have a look at the user manuals or at FHEM autocreate feature.

     

    - At this time FHEM is the better choice because it supports EnOcean basicconcepts and more  than 100 products.

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • Former Member
    Former Member over 7 years ago

    You can change the transmission times of the temperature sensor via jumpers, please see the STM332 manual.

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • fvan
    fvan over 7 years ago in reply to ipv1

    Sounds like valuable input, looking forward to your desoldering adventures

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • ipv1
    ipv1 over 7 years ago in reply to fvan

    Thanks for the input.

     

    Ok the resistors and Caps are usually for the Antenna section. The RF out is going to require a filter, impedance matching to the antenna , either or both. Additionally there are supposed to be resistors for the Reset signal and pull ups if any. I would not worry about em. The first chance I get my Hot-Air Station out, I am going to de-solder the connector off anyways and so that will clarify things a bit more.

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
>
Element14

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 © 2022 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

  • Facebook
  • Twitter
  • linkedin
  • YouTube