1.12 - Time of Day Service

Overview

For Fullscreen: https://www.youtube.com/watch?v=s2F95zTJBrs

Today we will show you how to use the time of day service with the quantum system.


Download and Configure the Service

To get started you will need to download your service in your Q-Server library. So go to the library tab and then to services and click on “Download” of “Time of Day”.

Once it is installed go to the service tab and you should see the “Time of Day” service there.

Go to the actions and click start.

For this configuration you’ll have to input the latitude and longitude of your current position which you can find by doing a simple internet search. Once you have input the data go ahead and click next.

Now that your configuration is set up hit activate.

Next we will have to set our time zone in the settings of the Q-Server. Hit the gear object in the top right corner to get to the settings.

Then go to general settings and scroll down and then select the correct time zone for your location. Once you have done that your time of day service is set up and then you can create an app using the associated objects.


Using Sunrise/Sunset objects

Now we are going use this service to build an app. So go back to your Q-Server and go to apps.

Hit “+ Create New” and give your app a name. We named ours “Time of Day”.

You will find yourself on the canvas.

So for the first app we will need an “Initial Trigger” object and a “Sunrise” and “Sunset” object. You can simply search for them or click trough the right side of the bars till you find them.

The initial trigger will trigger the objects right away once your app is running. To use the sunrise and sunset object you will need to set a time. You can either set a time before sunrise or sunset or a time after sunrise or sunset to trigger another object. The sunrise and sunset object can then trigger something like a shade to close when the sun sets or something else. The trigger will be set in minutes. So if you want something to trigger 10 minutes after the sunrise, you simply type in 10 for the “Default Value” or any value or time you would like.


Using the Time of Day object

For the next possible app we will use the “Time of Day” object and a “Time Picker” and a “Button” object aswell.

The “Time of Day” object let’s you choose a day of the week you want to trigger another object. So if you want to trigger something at Tuesday and Friday click on them and type in “true” or press 1. This will set these days as a trigger for your object. Next you have to set a time you want the objects to trigger. To do so click on the “Time” port and type in your desired time. A default example looks like this “XX:XX AM/PM”. So if you want something to trigger at 10 AM in the morning on Tuesday and Friday type in “10:00 AM”. With the connected time picker object you can easily adjust the trigger time later on in the dashboard so you don’t have to change it inside the app. Also you don’t have to stop the app then aswell. To start the “Time of Day” object we will need a button so you can start the object in the dashboard and also you can start it again with the button after you changed the time with the time picker.


Demo

As you can see we added a “Debug” object so in this way we can read the trigger value that will be put out by the “Time of Day” object. Then hit “Save App” and “Return To My Apps”.

Hit the play button to start the app.

Since we have no hardware to map to the app you can simply hit “Save + Run”. Go to the dashboard by clicking on the dashboard button in the top right corner.

You will find your app. Click on it. It should like this.

As you can see we can choose the time now by clicking on “Edit” of the Time Picker. It say’s “No Time set!” so we are going to set a time. We set 4:04 PM for the time. After you set the time click on the “Trigger” button to trigger the “Time of Day” object so it is working. Once you the time 4:04 PM is reached the Debug value should change and look like this.

This is just a quick simple demo to show you how that time of day service object works. There is a bunch of different applications you can use it for. So far we have used it to trigger a motorized shade to go up and down based on the time of day and different time during the week and on the weekends.

We hope this is useful for you and happy making!