EnOcean Pi, Sensors and FHEM and the lost hours of sleep

The Enocean Sensors

The Enocean Sensors

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 athttps://github.com/openhab/openhab/wiki/EnOcean-Binding or in the user manual like

EEP profile of the Rocker
EEP profile of the Rocker

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.

osgi Console output
osgi Console output

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!

Advertisements

2 Comments

  1. Thank you very much for your effort and the idea. What exact pin numbers are used for the +3.3 V and GND. I cannot get it to work.
    Thank you Kai kaibec(at)web.de

  2. I envy your rocker switch….I can’t get mine to work. Temperature on the other hand is happily reporting every 10 minutes or so which is fine enough granularity for my purposes.

    Out of curiosity do you have a single or dual switch rocker?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s