EnOcean Receive Messages

Programming receiving messages

Wel the first object is to see if we can get the modules working together.

The Eltako modules are well built. They feel very sturdy and durable. The must be at the price I paid for them!!

The instructions to setup the learn mode on the dimming device are clear. You turn a knob with a screwdriver in the LRN position and you press a button on the remote. A small LED lamp on the dimmer shows confirmation and the dimmer is programmed. I could quickly turn on and off the light. The switch also feels very solid. The click which generates the current for the message feels very solid indeed.

I quickly found that the messages from the remote switch would show up as some numbers in the testtool from Sollae. The testtool shows all communication which is sent by the TCM 120 module.

I then programmed the following simple app for communicating on the network and listening for some messages. I called the program enoceanrcv. The output from a small session is:

macbookeve evert$ mono enoceanrcv.exe enocean.esweb.local 1470
enoceanrcv commandline utility.
2009 Evert van Es

parameters host=enocean port=1470
Host enocean.esweb.local resolved. Now connecting to: 192.168.10.121 1470

A5 5A 0B 05 50 00 00 00 00 15 A5 BB 30 05
A5 5A 0B 05 00 00 00 00 00 15 A5 BB 20 A5

closing connection.
ready.
macbookeve evert$

I pressed a button on the remote. This sends the message start with A5 5A etc..

When releasing the button the second message is received. See the difference in the end, 20 instead of 30.

I quickly found the description in the documentation concerning messages, all seemed well. All messages are 14 bytes long. Or better 14 bytes short. They need to be because power is limited.

1 Sync Byte 1 A5
2 Sync Byte 2 5A
3 H_SEQ (3 bits) +
Length after header (5 bits) = 11 dec or 0x0B
0B
4 ORG Telegram format: 0x05 RPS. 0x06 1BS. 0x07 4BS.
5 DATA_BYTE3
6 DATA_BYTE2
7 DATA_BYTE1
8 DATA_BYTE0
9 ID_BYTE3
10 ID_BYTE2
11 ID_BYTE1
12 ID_BYTE0
13 Status Special coding depending on message
14 Checksum Sum of ORG, DATA_BYTES, ID_BYTES and
Status and then the first 8 bits.

H_SEQ can be one of the following:

  • 0 – Receive Radio Telegram (RRT)
  • 1 – not available in TCM 120
  • 2 – not available in TCM 120
  • 3 – Transmit Radio Telegram (TRT)
  • 4 – Receive Message Telegram (RMT)
  • 5 – Transmit Command Telegram (TCT)

There is no real difference in message structure between the RPS, 1BS en 4BS messages. Only the data needs to be interpreted differently.

In EcOcean documentation there is often mention of EEP (EnOcean Equipment Profile). This code is made up of three numbers: ORG – FUNC – TYPE.

The ORG value is directly from the ORG field of the message and corresponds with RPS, 1BS and 4BS. On this subject the EnOcean documentation becomes very unclear. I think FUNC and Type can only be found from the structure of the messages. Concerning the 4BS messages there is a description on the Teach-In Telegram which has fields for the FUNC (previously profile) and TYPE field as well as a ManufacturerID. I still need to figure this stuff out and update these webpages.

 

EnOcean Receive example

 

see also EnOcean send example

5 thoughts on “EnOcean Receive Messages

  1. Hi,
    your blog is really interesting. I think this is the first web source around EnOcean and c#. My interests are around truly EnOcean (not a 3rd party company) and c#. So I have the EDK 350 with EnOcean USB Gateway. The installed driver of this usb gateway simulates an com port. I got the telegram/messages which are transmitting on the com port. But I couldn’t set it up to an EEP telegram. The received data didn’t match to any EEP telegram. Maybe you can help me in this case?! Here is my simple code:
    int bytes = comPort.BytesToRead;
    //create a byte array to hold the awaiting data
    byte[] comBuffer = new byte[bytes];
    //read the data and store it
    comPort.Read(comBuffer, 0, bytes);
    //display the data to the user
    DisplayData(MessageType.Incoming, ByteToHex(comBuffer) + “n”);
    I know that the telegram has to be 14 Bytes long. Something I’m doing wrong.
    But I can’t see what. I hope you have any idea.
    Thx a lot…

    • Ooh, one more thing I forgot: I used a 2 Rocker Switch and I received the following data/message as a sample:
      24
      E5 E0 F0
      25
      B7 E1 F8

    • Great to hear you like my post.

      Is great if I can be of help.

      Currently I have a new project on cloud application and I do not have time to tinker on enocean. Must admit to have new devices lying around on my desk but not having any time to test the new devices.

      Please also look at domoticz and the developer. He contacted me also and got good progress on communicating with enocean devices.

      good luck.

      Evert

      • I got the solution to receive the fully telegrams from the Gateway…
        Thx for your efforts.

        • Milo – I’m having the same problem. Would you mind sharing your solution or where you found it?

          Thanks!

Comments are closed.