Note
The project described below can be created any time in the HS/FS Expert by means of the sample project "sample_languagemenu"!
This example should demonstrate how a DTMF menu can be implemented. The HS/FS should read out a menu structure in case of a call from a previously defined number, through which the caller can navigate by pressing the telephone buttons.
The selection of submenu items and the execution of commands should be made possible.
Commands can be executed directly in the submenu or after confirmation.
The selection of submenu items and the execution of commands should be made possible.
Commands can be executed directly in the submenu or after confirmation.
1.Project settings
1.2.Telephone operation
First, a workplace has to be set up at EIB controller\Telephone operation.
The created workplace must still be assigned a name and phone number. The HS/FS answers every call with this number. In the Voice message/DTMF tab, voice support is also activated and the target number specified (the number under which the HS/FS can be reached). As voice message, a welcome message as well as a voice message for the submenu and the command execution have to be created, which simultaneously inform the caller about the valid options.
Sample voice message: "Welcome to the house, 1 for living room, 2 for outside area"
The pause here is 2 sec., the voice message duration 30 sec.. The pause defines the time between 2 voice messages. The voice message duration defines for how long the respective voice message should be played.
The HS/FS behaves as follows:
Voice message played -> 2 sec. Pause -> voice message played again...
This procedure lasts for 30 seconds. Afterwards, the HS/FS breaks the connection if no button has been actuated.
A communication object is required in order to be able to evaluate the button codes of the caller, in which the status code of the respectively pressed button is written by the HS/FS. The communication object must be of the type 8-bit (0..255/EIS 2,6), and assigned in the current tab of the DTMF object.
The voice message is dynamically changed via the voice message object (communication object of the type 14-byte text), For this, the communication object must be written with a valid voice message key. In this example, this task is done by the nodes DTMF_Menustructure and DTMF_Trigger.
The created workplace must still be assigned a name and phone number. The HS/FS answers every call with this number. In the Voice message/DTMF tab, voice support is also activated and the target number specified (the number under which the HS/FS can be reached). As voice message, a welcome message as well as a voice message for the submenu and the command execution have to be created, which simultaneously inform the caller about the valid options.
Sample voice message: "Welcome to the house, 1 for living room, 2 for outside area"
The pause here is 2 sec., the voice message duration 30 sec.. The pause defines the time between 2 voice messages. The voice message duration defines for how long the respective voice message should be played.
The HS/FS behaves as follows:
Voice message played -> 2 sec. Pause -> voice message played again...
This procedure lasts for 30 seconds. Afterwards, the HS/FS breaks the connection if no button has been actuated.
A communication object is required in order to be able to evaluate the button codes of the caller, in which the status code of the respectively pressed button is written by the HS/FS. The communication object must be of the type 8-bit (0..255/EIS 2,6), and assigned in the current tab of the DTMF object.
The voice message is dynamically changed via the voice message object (communication object of the type 14-byte text), For this, the communication object must be written with a valid voice message key. In this example, this task is done by the nodes DTMF_Menustructure and DTMF_Trigger.
1.3.Structure of the logic
In order to now correctly interpret the entries of the caller, the logic must be correspondingly created. 3 work sheets are required in this example for this:
- Main menu
- Living room menu
- Outside area menu
The input box of the work sheet Main menu contains the DTMF object. DTMF_Menustructure is first required as the only module. The DTMF object of the input box is linked with the input E1 DTMF of the module. Entry E2 voice message is permanently assigned (double-click on the entry) with the voice message key of the welcome message created above. When initialising this module, this voice message key is sent to output A10 voice message. The inputs E3 A1, as well as E4 A2, are also permanently assigned a 1.
The 1 is necessary to inform the module that it should evaluate the numbers 1 and 2 (=> A1 and A2). All other DTMF numbers are ignored (for further information see documentation of the logic node).
Regardless of which button you now press (only button 1 and button 2, as well as the return button 0 are considered), the respective output is activated (A1 or A2 of restart the module). The return button 0 is permanently specified by the DTMF modules and cannot be varied.
The voice message object now still has to be transferred in order to output it when receiving a value at input E1 DTMF or during module initialisation. For this, output A10 voice message has to be connected with the previously created voice message object. If a telegram is now received at input E1 DTMF, or if the module is initialised, the value of input E2 voice message is now transferred to output A10 voice message, and therefore occupies the voice message communication object. This, in turn, triggers the language output with the message of the occupying Voice message key.
Output A1 1 is now connected with the connector of the work sheet of the Living room submenu. Output A2 2 is correspondingly connected with the connector of the work sheet Outside area submenu.
The 1 is necessary to inform the module that it should evaluate the numbers 1 and 2 (=> A1 and A2). All other DTMF numbers are ignored (for further information see documentation of the logic node).
Regardless of which button you now press (only button 1 and button 2, as well as the return button 0 are considered), the respective output is activated (A1 or A2 of restart the module). The return button 0 is permanently specified by the DTMF modules and cannot be varied.
The voice message object now still has to be transferred in order to output it when receiving a value at input E1 DTMF or during module initialisation. For this, output A10 voice message has to be connected with the previously created voice message object. If a telegram is now received at input E1 DTMF, or if the module is initialised, the value of input E2 voice message is now transferred to output A10 voice message, and therefore occupies the voice message communication object. This, in turn, triggers the language output with the message of the occupying Voice message key.
Output A1 1 is now connected with the connector of the work sheet of the Living room submenu. Output A2 2 is correspondingly connected with the connector of the work sheet Outside area submenu.
2.Structure of the Outdoor submenu
The structure of the Outdoor submenu is described as an example.
Note
Please note that all entries can additionally be acknowledged with an * or aborted with a # in the Outside area submenu.
First, a DTMF_Trigger module has to be created on the work sheet for the Outside area submenu. Input E2 voice message of the new module is again permanently occupied with a valid voice message key (that of the outer area submenu). In addition, input E3 voice message confirmation is permanently occupied with a valid voice message key for the voice message of the confirmation request. In order to activate the confirmation, the input E4 confirmation is permanently assigned a 1.
Note
Please note that the voice message key specified here usually differs at input E2 message from the one used beforehand in the main menu because different options are available in the submenu than in the main menu.
For the sake of simplicity, we are limiting ourselves here solely to the options
- 1 - Light on
- 2 - Light off
- 0 - Back to the main menu
Output A10 voice message has to have been linked beforehand with the voice message object.
Afterwards, the respective commands must still be assigned. For this, the outputs A1 1 and A2 2 of the DTMF_Trigger have to be connected with two different commands that are created in the output box. These commands make use of the command Set to constant in order to set a communication object Light optionally to
Afterwards, the respective commands must still be assigned. For this, the outputs A1 1 and A2 2 of the DTMF_Trigger have to be connected with two different commands that are created in the output box. These commands make use of the command Set to constant in order to set a communication object Light optionally to
- 0 - Light off, or
- 1 - Light on
. In this way, when receiving the DTMF code 1 or 2 after successful confirmation per *, the respective command is triggered by sending a value to output A1 1 or A2 2. The return option is implemented by the DTMF_Trigger module and does not need to be created additionally.
3.Summary of the valid DTMF buttons
- Main menu
1 - Jumps to the living room submenu
2 - Jumps to the outside area submenu - Living room submenu
1 - Light changeover
2 - Blind down
3 - Blind up
4 - Blind stop
0 - Jumps back to main menu - Outside area submenu
1 - Light on
2 - Light off
0 - Jumps back to the main menu