Rise with the (artificial) sun: (Home automation series post #4)
One of the great things about home automation is the ability to setup scenarios
I have a morning alarm scenario which is triggered by a calendar event (or alarm event) on my android phone.
once it is triggered it sends a message to my home automation server which then triggers the morning alarm scenario.
this scenario does the following
- Gradually brightens the bedside lamps over 30 min.
- after 30 min turn the main bedroom light on to full brightness
- Turn the TV on in the living room and set to a news channel
Here's a time lapse video of what it looks like(you might wanna skip through a few times points its still 2:30 min of watching a light turn on :-p
https://dtube.video/#!/v/spidersprog/f9idqmus
Tutorial
here's the step by step to set this up
I'm assuming you already have:-
Some lights setup including a dimmer device.
Tasker on your android phone
Domoticz server setup with your lights/devices added and controlled by domoticz
On Domoticz
Setup Scene
- Connect to your domoticz web server front end go to the scenes tab
- click "Add Scene"> enter a name> leave the type as "Scene"
- A new Scene will appear> Click "edit" on this new scene
- Now you just need to add the devices you want to tigger in the scene.
I have added the same device (bedroom lamp) many times but each time with a longer on delay and a higher brightness setting. I timed these series of commands to last 30 min, so the lights come on gradually over a 30 min period.
After these events I added the other lights and TV on events. Take a look at the screenshot below for an example of how it looks when complete
Get your JSON command
Domoticz has a JSON interface which can be used to trigger commands (and scenes ) over http. You need to find the IDX of the scene we just made.
- In domoticz click setup and then devices
- Use the search bar to the right and find your newly created scene and note its idx number
- The JSON API is documented here but essentaly what you want is something like this
http://192.168.1.4:70/json.htm?type=command¶m=switchscene&idx=1&switchcmd=on
but replacing 192.168.1.4:70 with your servers IP and port and 1 with the IDX number of your scene. - If you make these changes and then attempt to open the URL (on the same network as your domoticz installation) it should trigger the scene(check your domoticz log, or your lights :-p ) f it works its on to the next step
- Write down the URL or transfer it to your phone somehow( I use push bullet)
On the phone
Setup you Morning-Alarm calendar event
- Open up Google calendar and add a calendar event called Morning-Alarm (or whatever you like)
- Set it for 30 min before you want to get up. if you want you can set recurrence and days if the week too.
- Remember the name of the calendar event for the profile step
Tasker Task
Their are two main parts to tasker. The task which performs the actions, lets setup the action now.
- Open tasker>click task>click the + button
- Name your task > click +
- Net>http get
- In the server:port field enter your JSON command string from step earlier
- Hit back
- If you want you can test it by clicking the play button (bottom left)
- Hit back again
Tasker Profile
And the profile which triggers your actions. So lets set that up too.
- Open tasker and click profile, then the + button
- Then State>App>Calendar Entry
- Enter your calendar event title from step earlier
- Hit back
That's it. when the alarm is triggered on your phone and connected to the same network as the domoticz server. It will trigger the morning alarm scenario and run your defined commands.
Still to do Here
There's still some more i would like to add to my scenario:-
- Set some music to play on the bedroom Chromecast
- Snooze functions (I will soon be getting a knocki which I plan to use for this) but any device capable of sending a message to the phone or server will work
When I get round to these I will cover them in their own posts
Upvoted on behalf of the dropAhead Curation Team!
Your post will be Resteemed by @dropahead witness account of the dropAhead curation team!
Watch out for the #xx-votesplus tag!
By doing the above you will give us more STEEM POWER (SP) to give YOU more earnings next time.
Keep up the good work!
Most recent post: Moving #25_votes_plus to Discord
Congratulations! This post has been awarded a 100% upvote by @lottobot! This post was the winner of lottery #266, which had a total of 1 entries. @lottobot always has a lottery going on! If you would like to nominate a post for the current lottery, just send 0.1 SBD or STEEM to @lottobot, and include the url of the post you would like to nominate as a memo. Learn more by reading the introductory post! Good luck!
**@spidersprog got you a $6.65 @minnowbooster upgoat, nice!
Want a boost? Minnowbooster's got your back!
The @OriginalWorks bot has determined this post by @spidersprog to be original material and upvoted it!
To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!
To enter this post into the daily RESTEEM contest, upvote this comment! The user with the most upvotes on their @OriginalWorks comment will win!
For more information, Click Here! || Click here to participate in the @OriginalWorks writing contest!
Special thanks to @reggaemuffin for being a supporter! Vote him as a witness to help make Steemit a better place!
@cmtzco has voted on behalf of @minnowpond. If you would like to recieve upvotes from minnowpond on all your posts, simply FOLLOW @minnowpond. To be Resteemed to 4k+ followers and upvoted heavier send 0.25SBD to @minnowpond with your posts url as the memo
@reported has voted on behalf of @minnowpond. If you would like to recieve upvotes from minnowpond on all your posts, simply FOLLOW @minnowpond. To be Resteemed to 4k+ followers and upvoted heavier send 0.25SBD to @minnowpond with your posts url as the memo