EnOcean Link
1.14.0.0
Middleware to Connect EnOcean easily to other Projects
|
This tutorials will learn in different EEP temperature profiles and creates one Generic Profile containing all temperature channels. Afterwards the received temperatures will be converted to generic profile temperatures and sent.
The Source Code of this Tutorial can be found here: tutorial6.cpp
Tutorial 6 consist of 3 functions: Tries to open the gateway
Lets the eoGateway run in learn mode. Only A5-02-xx temperature profiles will be learned in, and an generic profile channel will be created.
When we receive a telegram from a learned in device, the temperature will be parsed and the generic profile temperature profile channel will be set.
and the main functions
In the openGateway function, no generic Profile functions are used.
The learnInMode uses the eoGenericProfile::AddChannelOut(CHANNEL_TYPE type, GP_RESOLUTION resolution, int8_t engMaximum, int8_t engMinimum, GP_SCALING scaleMaximum, GP_SCALING scaleMinimum, VALUE_TYPE valueType) for adding a generic profile channel, using the eep channel information
As in generic profiles the "subtype" of the same channel types are just counted, (the first temperature channel is subtype 1, the second temperature is subtype 2 and so on) we save which device has which subtype number
Then the teach in time is over a Teach In telegram is created and sent
In the operatingMode() function the temperatures values are updated after receing a teached in tempetature and a generic profile message is created.