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 1 - EnOcean Sensors and Raspberry Pi Arrival
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: jpc
  • Date Created: 5 Aug 2014 7:57 PM Date Created
  • Views 705 views
  • Likes 2 likes
  • Comments 3 comments
  • forget_me_not
  • fhem
  • openhab
  • iot_laundry
  • internet_of_things
  • enocean
  • eep
Related
Recommended

1 - EnOcean Sensors and Raspberry Pi Arrival

jpc
jpc
5 Aug 2014

Last night, 8/4/14, a box arrived from Element 14, it contained the following items:

 

  • Raspberry Pi B+ (no microSD card)
  • EnOcean Pi
  • FTM210U Rocker Switch
  • STM332U Temperature Sensor/Monitor
  • STM320U Magnetic Contact Switch

 

Needless to say I was excited to get to doing something real rather than just conjuring up visions in my head while working on parts order lists and continuing researching the project. I now have the first pieces of hardware to work with and it must be working NOW. Unfortunately, now was more like several hours of wrestling around with things, but in the end it worked out OK.

image

 

I had already installed openHAB (1.5.0) on my Raspberry Pi B so I just dropped the EnOcean Pi onto that to begin with. I had to track down some issues with the serial port, but you can either use rpi-serial-console scripts as described by fvan in his blog entry "ForgetMeNot - Week 1: EnOceanPi and Sensors" or just remove all references of /dev/ttyAMA0 from the /boot/cmdline.txt file

 

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

 

Also comment out the reference to getty using /dev/ttyAMA0 in /etc/inittab as well, it's at the bottom.

 

#Spawn a getty on Raspberry Pi serial line
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

 

Once I had cleared out all references to /dev/ttyAMA0 from those two locations I restarted the system.  If you've already cleaned up the /boot/cmdline.txt file and restarted then made changed to /etc/inittab, you can just run 'sudo init q' to reload the inittab without rebooting. I ran 'ps ax|grep getty' to make sure that no getty terminals were running with that port. The first screenshot shows it running.

image

This next screenshot shows that it is not running any longer

Next I needed to find out the ID for the sensors. The push-button switch had it's ID marked on the back, but the temperature sensor and magnetic contact switch sensor did not.  I originally set up openHAB but it doesn't tell you about communications from unregistered devices. I realized I needed to go back and install FHEM to do this, but the site was down for a couple of hours. It finally came back though and I installed FHEM following the instructions written by malakai "How to setup a home automation server with EnOcean Pi" to get the IDs for the 2 other sensors.image

 

Once FHEM is running, to to http://<pi_ip_address>:8083/fhem  and you should see a screen like this, notice the section called TCM, that shows that the EnOcean Pi TCM310_0 has been detected, if you don't see this, double check that you edited the /etc/cmdline.txt and /etc/inittab properly and then rebooted the system.

Once some information is received from the EnOcean devices, the left side menu will change and provide you with an EnOceon option, click on that and you should get a result like this, the IDs are highlighted in green.image

 

image

I took all of those ID numbers and put them into a spreadsheet. Once your devices communicate a couple of times, the ???s will fill in with valid information from the sensor. With that done I went ahead and disable Fhem, by default it's set to auto-start and I don't want it competing for the serial port with openHAB. 

 

pi@raspberrypi ~/ $ sudo rm /etc/init.d/fhem


I'll step back a bit here, because as I had already mentioned, I had installed openHAB on a Raspberry Pi B already before the sensors and the B+ arrived and had been exploring it a bit. To start fresh I grabbed the 64 gig SD card out of the GoPro and wrote the Raspbian image to it.


Installing openHAB 1.5.0 is pretty straightforward, I downloaded and installed the openHAB 1.5 packages from the openhab.org site and installed the according to the directions available on the openHAB site.


I didn't copy over all of the addons into the addons directory though, I only copied the ones I needed for the demo and to make the EnOcean Pi and sensors integrate with openHAB.


Once I did that I went to the ~/openhab/configurations directory and copied openhab_default.cfg to openhab.cfg and edited openhab.cfg. I found the line with "#enocean:serialport=" and changed it to "enocean:serialport=/dev/ttyAMA0" then saved the file.

 

Like some others I edited my start.sh to add the "-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0" flag to the java start line, this basically allows Java to access the symbolically linked serial port. Once back at the command promped I typed 'chmod +x start.sh' to make it executable and ran it with ./start.sh .

 

A lot of stuff shoots by in the log as openHAB is starting up and as it's running, but I wanted to see this in particular as it means the EnOcean binding loaded

12:35:28.353 INFO  o.o.b.e.i.bus.EnoceanBinding[:290] - Connecting to Enocean [serialPort='/dev/ttyAMA0' ].

 

Doing anything with the sensors right now won't generate a result, you need to define them in the items file (Ex: demo.items) for openHAB.  You can open up another terminal and go to the ~/openhab/configurations/items folder and edit the demo.items file. There is a documentation section on openHAB's github about configuring EnOcean sensors and switches called EnOcean-Binding which will guide you through the details and how to set the sensors up for different purposes.

 

One thing to note is that while you can edit the *.items files and openHAB says that it has re-read it, the changes won't always necessarily work. If you make a change on EnOcean devices you may be better of restarting openHAB each time.

 

Once all of your devices are in the demo.items file and working, then you need to edit the sitemap to make your switches and sensors visible and interactive on the website.  I did get to that point, but I have run out of time for today and will cover my particular layout more in depth when it's more developed.

 

Now that I have things working I'm going to start digging into the hardware and trying to figure out it's full capabilities. The temperature module is also supposed to also work as a setpoint and an occupancy sensor if the EEP is set correctly, but I haven't started working on accessing those features yet or know for sure if I can even modify the EEP with the tools I have available.

  • Sign in to reply
  • Former Member
    Former Member over 10 years ago

    Hello,

     

    I managed to connect my rocker switches, my tempurature sensors and my contact sensor to OpenHab

    and I want to update the enocean binding to support the following profils:

     

    *EEP: A5-07-01 (occupancy  sensors)

    *EEP: D2.01.08 (dimmers with Energy Measurement and Local Control)

     

    Can you help me with that?

    Are there steps that I can follow to update the OpenHab EnOcean binding to be able to support a new profile?

     

    Thanks a lot!

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jpc
    jpc over 11 years ago in reply to Former Member

    Hi Bryan, thanks for the feedback. The ancillary hardware (i.e., the actual humidity sensor, dial knob, etc) is not there, you are correct. The piggyback boards such as the devkits have these components on them, but they don't add a2d converters and input lines, those are already on the STM 3xy boards.

     

    According to the specifications the STM332 has "configurable EEPs: A5-02-05, A5-10-05, A5-10-03" and with the humidity sensor "A5-04-01, A5-10-10, A5-10-12". If you look at the EnOcean Equipment Profiles V 2.6.1 you'll see the supported functionalities, but it's basically as listed in the datasheet: For available input channels: "Internal: temperature sensor, LRN button // External via 20 pin connector: occupancy button, set point dial, HSM 100".


    What this means is if I can get the EEP set right on this module, then I may be able to to access the status of the occupancy button, but more importantly the status of set point dial input which in the documentation shows a 10k potentiometer tied to V+, Gnd and an a2d converter pin. This input pin could be repurposed for a lot of different uses, a spare a2d converter is really handy, even if it's low resolution. There are several different ways to hack what I'm trying to do, I'm trying for what seems like the most direct route first. -Jon

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 11 years ago

    Hi,

     

    The temperature sensor (STM332) will not work as a set-point, occupancy, or humidity sensor without additional piggyback boards. See the HSM100 for example. The hardware just is not there but the firmware supports it.

    • 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