Create a Night/Day switch with automatic toggle: Difference between revisions

From MiRTA PBX documentation
Jump to navigation Jump to search
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 14: Line 14:


[[file:flowdaynight2.png|400px]]
[[file:flowdaynight2.png|400px]]
You can use this Flow variable in a Condition
[[file:conditiondaynight1.png|400px]]
Now the customer can switch the day/night condition using the BLF key, but he may need to have it automatically switched also at certain times.
We start by creating two Custom Destination to set to Day mode (1/Not In Use) and to set to Night mode (2/In Use)
[[file:customdestinationdaynight1.png|400px]]
And then use those in two Cronjobs to activate the day at 8am and the night at 7pm
[[file:cronjobdaynight1.png|400px]]

Latest revision as of 08:51, 28 March 2017

Let's focus on a common need. A BLF key to change from Night to Day mode, so it can be toggle anytime, but also to be automatic triggered at specified time.

The core of this feature is a Flow, so let's start creating a Flow containing the definition of a variable used to hold the status.

Flowdaynight1.png

This Flow, assigned the number 864, can be monitored with the BLF 864-DEVEL (DEVEL is the tenant code for the tenant used)

As you may have noticed, there is no destination for this Flow. Let's create a Custom Destination to toggle its status

Toggleflowdaynight1.png

Now assign the Custom Destination above to the Flow, as action

Flowdaynight2.png

You can use this Flow variable in a Condition

Conditiondaynight1.png

Now the customer can switch the day/night condition using the BLF key, but he may need to have it automatically switched also at certain times.

We start by creating two Custom Destination to set to Day mode (1/Not In Use) and to set to Night mode (2/In Use)

Customdestinationdaynight1.png

And then use those in two Cronjobs to activate the day at 8am and the night at 7pm

Cronjobdaynight1.png