Howto:Push to Night

From innovaphone wiki
Revision as of 13:34, 3 January 2019 by Rotodt (talk | contribs)
Jump to navigation Jump to search

This article describes the possibility to switch a Boolean abject in the innovaphone PBX using an external button and display with an external lamp his status.

A typical application is switching the day/night operations of a PBX also with a simple push-button.

Imagine a garage, near the garage door a lamp shows the status and when the last employee leaves the building it should be possible switch the PBX in night mode. An example for a real implementation is a small fire Department: if the team leaves, calls are routed to the headquarter. If they are back a push to the button and the calls are routed to the IP-phones.

Of cause, the day/night switch should be possible also from the IP-Phones and even the automatic calendar function must work. Therefore, also the Boolean status must be “copied” on the external lamp.

Applies To

This information applies to

The solution requires:

innovaphone PBX V11 or higher on every platform, tested with V12.

- 3 DSP for conferencing or in alternative a timer relay

- 3 PBX port licenses

- 3 analog FXS ports from any innovaphone device, typically IP29x

- 3 relay, 2 condenser

- Push button and lamp, electrical material as clamp

- 3 XML (see download)



How it works

The working principle is simple, the push-button closes an analog port, the user configured on that port calls a XML using the direct dial function. This XML read the actual status of the Boolean (night) object in the PBX. The XML will toggle the actual Boolean status and therefore if the status of the object is true the analogue port “User ON” is called, and the “User OFF” extension if it is false. The call will switch on/off the lamp using external relays. Than the status is stored in a file on the CF/mSATA/Flash/Webdav and the XML did a status update of the Boolean object in the PBX. Because of system design the updating must be the last step, after that the XML will stop.

The following picture shows the required external electrical circuit. On top there are the three analogue ports of the analogue gateway. They are labeled “TEL1” etc., in our diagram we put in the name of the function. The left one called “User button” is simply connected to the push-button.


P2N02.png


If the XML switch on the night service it calls the user “User ON”, the relay R2 attract because the condenser C2 the permeable for the alternate ringing current. If R2 attracts his contact r2 closes and the relay R3 will attract. If R3 closes, the lamp will go on and the R3 is hold by himself with his own second contact r3. If now the button is close the XML call the “User OFF”, the relay R1 attracts and his contact r1, normally closed, opens the current feeding for R3; the relay R3 opens and the lamp switch off. The Relay R3 coul be feed from a free analog port of the IP24/29, in our example we use a external power source (typically available for the door speaking circuits or similar)


Problem details

The switching from day to night operation should be possible also from the IP Phones. Therefore, the actual status of the Boolean object must be checked periodically in the PBX. This is done each minute by a second XML triggered by the wakup feature; if the Boolean object is switched using a Boolean feature key (typically three state (day/night/automatic) the lamp status could have a delay up to one minute. Not nice, therefore we recommend switch the status calling the XML even from the IP-Phones. In this case, the reaction is immediate, but you need one function key for each status. So one feature key for day operation, one for night and one for automatic. On top one to display the status. A lot of Featurekeys, on the other hand we see that most customer have many unused Feature keys on their IP-Phones.

Switching using a feature key is nothing else than calling the XML from the phone and adding operational codes: 10 = day, 11=night and 01=automatic. Calling the XML without operational codes will simple toggle the actual Boolean status.

For the XML the automatic status is a problem, because the status after setting the object in automatic mode is not clear. In theory, the XML should set the automatic status, read out the PBX again and then act on the lamp. Unfortunately, that is not possible because after setting a status in the PBX the XML ends. Also in this case the second XML will read out at least after one minute the real status and correct him.

Operational safety

The called XML must have an active call for at least 3 seconds to ensure a secure switching of lamps and Boolean. If the user press the button for a shorter period it is possible that the XML can just switch on the relay but has not enough “livetime” to modify the Boolean status in the PBX. Of cause also in this case the second “security” XML triggered by the wakup feature will recover the situation, but if a user press a button he expect an immediate feedback.

There are two way to grant three seconds of calling time, the first one is an electrical one: instead of closing the contact with the bush button the button trigger a timer relay; the timer relay will close the “User button” interface and open just after for example 3 or 4 seconds. “Short” pressing is impossible. Simple, but you need a timer relay.

If you are in the lucky situation to have a PBX with free DSP you can realize that also within the PBX. Define a alarm conference, the “User button” call that conference, the alarm conference call the XML and also a second XML called “Waketimeout” (in the package). The Waketimeout simple play silence and releases after 4 seconds. Now if the “User button” release even after a short period the Waketimeout will hold the conference up for 4 seconds. When the Waketimeout releases only the XML is still in the conference and the flagged option in the conference unit “release last user” will forced to end the entire call.

Setup

Electrical installation

Electrical equipment is typically installed in a cabinet, therefore we have to bring our analogue extension line in this case. Be carefully, if you are not a electrician it could be a good idea give other people that job. But you can also just work with low voltages and the lamp could be also driven by for example 12 or 24 volts.

Those cabinets typically are equipped with a 35mm DIN rail (known also as top-hat rail) widely used for mounting circuit barkers and industrial control equipment:

Dinschiene.png

For the door opener we need a DIN mountable, 24Vac relay with at least on free contact and a condenser 4,7µF 100Vac.

One possible relay with 2 floating changing contacts available worldwide you can find here: http://www.rs-components.com/index.html

Search the product number 494-0536.

The next picture shows the product, the producer is Tyco Electronics, Part number RT3S4R24.

RT78726.png

In doing this shopping you can buy also a condenser, a possible product is part number RS –components 115-629, producer Vishay part number BFC236825475.

Condens.png

Please note that the relay shown has a led indicator that consumes a lot of power. Fortunately the led is located in a small module that can be plugged out. There is no difference in operation; you just will not see the led. We recommend to remove the led module, in this case even a 2µF condenser is large enough to provide power for the relay.

Installation

To install the XML first unzip the Download ZIP file.

Now edit with a text editor the XML “Push2Night” and “NightCheck”. In both on top of the text, you have to edit four parameter:

The name of the Boolean object, if for example your Boolean abject is named “nightswitch” change the line <assign out="$NameBoolean" value="BoolNotte" /> in <assign out="$NameBoolean" value=" nightswitch " />.

The parameter “Numberboolean” is the number of the boolean object.

The parameter “NumberportON” the number of the “user ON”, the parameter “NumberPortOFF” the one of the “User OFF”.

Save the files and copy all files to a directory of the CF/Flash/mSAT/Webdav.

Configuration

Configure in the PBX the three analogue extensions and the Boolean object for night switching.

Create three Voicemail Objects pointing on the three XML.

Configure the direct call in the “User button” user pointing to the XML “Push2Night”.

Do your electrical installation. For testing you can also simple connect two analogue Phones on the User On/Off ports knowing that a call will switch on and off when the relays circuit is done.

Now you can test the lamp, simply call from a phone first the user “User ON”, the lamp must switch on, then call the user “User OFF”, the lamp must switch off. If that works call the XML “Push2Night”, the Boolean status must toggle and switch each time call and even the lamp status. Now call the XML adding the status “10” and “11” to fix a status and check if works fine.

Call now the XML “Nightcheck”; if you modify manually the Boolean status the relays are called. Call the XML “Push2Night” adding “01” (automatic) and then "Nightcheck", in function of the status the relays are called.

Now add a wakeup to the XML “Nightcheck” (VM), put in one second in the “Sec” field, flag the “Multiple” flag and put in the “Source Name” field the XML name “Waketimeout”.

Doing so each minute, the XML “Nightcheck” will check the situation while the XML “Waketimeout” assure that the calls goes down after four Seconds.

Test the automatic check; toggle the status with the phone or using the browser, at least after one minute the lamp must follow.

Download