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
|4||ORG||Telegram format: 0x05 RPS. 0x06 1BS. 0x07 4BS.|
|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.