Google Search

Custom Search

Powered by...

Find us on Facebook

Friday, 5 February 2016

Kodi keyboard shortcuts to run Vera scenes (Windows)

This question came up on the Vera forums, how to use Kodi media center keyboard shortcuts to run scenes in the Vera home automation controller. This is for Kodi Windows users only.

If you wish to do this in Kodi / OpenElec (Linux) then read this article here instead.

Here is a brief overview of the steps required:

Step 1: Create or Edit the Kodi keyboard.xml file to create your desired keyboard shortcuts.

Step 2: Create a pyhton .py script file that Kodi calls when you press your keyboard shortcut in Kodi. In turn the python script calls a Windows .vbs script.

Step 3. Ceate the .vbs script which sends the HTTP command to the Vera controller to run the scene.

The main reason why we use a .vbs script is so we don’t have pop up command windows appearing over the top of the Kodi user interface and the HTTP request will be sent to Vera invisibly in the background.

Step 1: Create or Edit the Kodi keyboard.xml file to create your desired keyboard shortcuts.

The keyboard.xml file should be located in this folder:

C:\Users\Stuart\AppData\Roaming\Kodi\userdata\keymaps

Obviously browse to your own “username” folder what ever that is called, mine is called “Stuart”

If you have an existing keyboard.xml file in this folder then great we can just edit this in a text editor program. I use EditPade Lite7 as my text editor.

If you do not have a keyboard.xml file in this folder, you can download the master keyboard.xml file, to do this right click on this link here and select “Save Link As” (Chrome browser) and save the file Keyboard.xml in to the correct folder.

C:\Users\Username\AppData\Roaming\Kodi\userdata\keymaps

Now open the Keyboard.xml file in with your preferred text editor application.

The file looks like this:

image

Scroll down to the <keyboard> section

image

Hit enter to make a new line

Now this is where we enter our new keyboard shortcut and specify the python script file it should run. In my example here I want my keyboard shortcut to be Ctrl+Alt+A and I want this to run a python script called lounge-on.py

<A mod="ctrl,alt">RunScript(C:\Users\Stuart\AppData\Roaming\Kodi\userdata\Scripts\lounge-on.py)</A>

So now the Keyboard.xml file looks like this, save and close the file.

image

Note: Anytime you edit the keyboard.xml file you need to close and reopen Kodi for the changes to take affect.

Step 2: Create a pyhton .py script file that Kodi calls when you press your keyboard shortcut

Before you start this step ensure you can see file extensions in Windows Explorer.

Now the path I specified in the keyboard.xml file for my python script was:

C:\Users\Stuart\AppData\Roaming\Kodi\userdata\Scripts\lounge-on.py

So in Windows Explorer I need to navigate to the Kodi\Userdata folder and I need to create a new sub-folder called “Scripts”

In here I now need to create a new python .py script file. To do this right click in Windows Explorer and on the menu select New –> Text Document.

image

Then rename the text file in this example I am calling my python script file lounge-on.py

Ensure you have removed the .txt extension and that it now has a .py extension instead.

image

Now right click the new .py file and select to edit it in your text editor.

Paste in this code and change the path as required:

import subprocess
child = subprocess.Popen("wscript C:\Users\Stuart\AppData\Roaming\Kodi\userdata\Scripts\lounge-on.vbs")

So my lounge-on.py file now looks like this:

image

Save and close the python .py script file.

In the python .py script file, we call another .vbs file. I am going to call my lounge-on.vbs.

Step 3. Ceate the .vbs script which sends the HTTP command to the Vera controller to run the scene.

In Windows Explorer in the same folder

C:\Users\Stuart\AppData\Roaming\Kodi\userdata\Scripts\

Right click and from the menu select New –> Text Document

image

Rename the file including the .txt extension to lounge-on.vbs in this example.

image

Now right click the lounge-on.vbs file and edit it in your text editor.

Enter this code:

Dim oXmlHttp
Dim sWebPage

set oXmlHttp = CreateObject("MSXML2.XMLHTTP")

oXmlHttp.open "GET", "http://192.168.1.10:3480/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=14", false
oXmlHttp.send ""
sWebPage = oXmlHttp.responseText

image

You need to change the IP address to the IP address of your Vera controller and the SceneNum needs to be changed to the scene number you want to run.

Save and close the .vbs file.

Testing

That’s it the setup is completed, now open Kodi and enter your keyboard shortcut, in this example it was Ctrl+Alt+A and your Vera scene should then be run and you should see no command windows popping up over the top of the Kodi user interface.

Running  more scenes

Repeat the process to be able to run more scenes. So for example add a new line in to the keyboard.xml file like:

<B mod="ctrl,alt">RunScript(C:\Users\Stuart\AppData\Roaming\Kodi\userdata\Scripts\lounge-off.py)</B>

image

In this example pressing Ctrl+Alt+B would run a python script file called lounge-off.py

So you would then create the lounge-off.py file and the lounge-off.vbs file etc.

Controlling Vera Devices

You can also use HTTP commands to turn on or off Vera devices, rather than running scenes. For exmaple this HTTP command turns ON my FAN device.

http://192.168.1.10:3480/data_request?id=lu_action&output_format=xml&DeviceNum=50&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1

You need to specifiy the correct IP address of your Vera controller and specify the correct device number in DeviceNum=

ON is - SetTarget&newTargetValue=1

OFF is - SetTarget&newTargetValue=0

Summary

This is a fairly easy way to be able to use Kodi keyboard shortcuts to run scenes in Vera and also to be able to control devices in Vera.

In addition you could then go on to program your universal remote control to send these keyboard shortcuts to your Kodi HTPC and you could then run scenes or control devices from your remote control handset via the Kodi HTPC etc.

Friday, 29 January 2016

Z-Wave RFID Keypad Kits for Sale

We have put together a kit perfect for creating entrance / exit alarm panels for your Z-Wave Home Automation system.

The kit includes:

RFID Keypad with a Fibaro Universal Binary Sensor a miniature relay and a power supply unit.

image

image

image

Instruction Videos

RFID Programming Guide

This is a short video describing how to programme the RFID keypads in preparation for inclusion in a Z-Wave system.



RFID UBS inclusion guide

Video to show inclusion into the controller and changing of the parameters. Paramater 3 needs changing to the value '0' with '1 byte hex'.



Contact our Leeds Office for further information and pricing.

Thursday, 28 January 2016

What is Home Automation? Demo Video

Home Automation falls in to the loT (The Internet of Things) category, its an exciting trend, there are new devices announced every day that connect to the internet to control something. The world is slowly filling up with connected devices, that ultimately make our lives easier. Connected devices are electronic devices, such as appliances, that are able to connect to the Internet. Now everyone has the ability to purchase a product in which they can turn off their lights and close their garage when they are not home. We will be living in a world where everything is “smart.”

‘home automation’ has transformed into an increasingly prominent trend for the development of the ‘smart home’. There is nothing impressive about opening a garage with a remote any more, but there is about double-checking that you remembered to shut your garage by simply picking up your mobile phone when you are miles and miles away from your home.

Smart home automation systems have made it possible for users to do things such as: put their shades up, turn their lights on, adjust their thermostat, unlock their door, and turn their dishwasher on, all from a voice command, or a simple tap on the phone. All this is great, but what are the benefits of having a smart home?

Having a smart home is beneficial for many reasons including: control, convenience, savings and security:

Convenience: Having a smart home is simply convenient. Having your lights turn on when you walk in the room, or having the ability to turn on your central heating on your way home, is a convenient way to live.

Control: Individuals have always had control over things occurring while they are in their homes, but they now have control over their home when they are away at work, or at the store shopping.

Savings: Smart homes can cut down on energy and water usage in your home, which could also save you money in the long run. Wi-fi enabled lights, smart sprinklers, and controlled thermostats are all factors in home automation that can help you save on energy usage, and put money in your wallet!

Security & Safety: Devices connected to your smartphone, such as: smart sensors to detect: carbon monoxide, motion, heat, smoke and water leaks will all keep your home secure and safe. It will not take you until a week after you come home from a vacation to realize that water has been leaking. Any emergency that occurs in your home, you can know about right away and get an immediate solution.

Building a smart home is not as much of a hassle as it used to be. Today, home-automation technologies are way more user-friendly, accessible, and most importantly, way more affordable than they used to be. Adapting to the smart-home world can change your life.

Watch our new demonstration video.

Contact us today for a consultancy to see how we can make your digital smart home become a reality.

Monday, 30 November 2015

Budget Cinema Room Project

Hello and welcome to another blog post. We had a client who wanted a cinema room but on a modest budget. We know that these rooms can cost thousands of pounds but we accepted the challenge and came up with this…..

Before:

before1

before2

before3

As you can see we start with a typical room layout.

In order to be a budget cinema room we discussed with the client about requirements and costs. We then came to an agreement and proceeded to work within the budget.

This was for everything, all materials, amplifier, speakers, lights, Z-Wave Home Automation controller and modules. The only item that wasn’t included was the TV as the client already had their 55” LG TV.

Once the room was cleared we started creating the false ceiling for the speakers and spots and the strip light effects. We also started work on the fake chimney breast as well.

ceiling1

ceiling2

ceiling3

ceiling4

ceiling5

chimney1

ceiling6

Once this was completed we added all the wiring as needed.

ceiling7

The next stage was the boarding up stage.

chimney2

ceiling8

ceiling9

Straight after it was the plastering stage.

chimney3

ceiling10

Once most of the plaster had dried we then measured the ceiling and made all the holes for the speakers and lights.

ceiling11

As part of the budget deal the clients decided they would do all the painting themselves and so we left them to it, which took 2 days to do.

We came back after a week as agreed with the client and then continued with the installation of the lights, speakers and strip lighting. We also added in the Z-Wave Home Automation controller and modules.

ceiling12

ceiling13

Finally we programmed the Z-Wave Home Automation controller and created the scenes and configured the smart phone app and also a handheld keyfob, so that the client can go into “cinema mode” at a touch of a button which turns off the main ceiling lights and turns on the LED colour lighting. Also the client can select a “normal mode” by pressing a different button which turns back on the main ceiling lights and turns off the LED lighting.

Using either the smart phone app or the handheld keyfob the client can select pre-defined LED lighting scenes to choose different colours. See the demonstration video below.

Z-Wave Handheld Keyfob

Smart phone app for RGBW lighting control

Here you can see the finished room, with the ceiling mounted speakers, LED strip lighting in the new false ceiling recess and LED backlighting behind the new false chimney breast. These are RGBW LED lights so the client can pick any colour that suits their mood.

chimney4

Below the wall mounted TV you can see the cabinet for the AV equipment.

chimney5

Here you can see the floor sub-woofer speaker and the AV equipment such as the surround sound amplifier (AVR), SKY TV box, Playstation 4 and a Western Digital media player for movies and TV shows.

Our high-end cinema rooms tend to have a Kodi Home Theatre PC and a Home Storage Server (NAS).

AV-Equipment1

AV-Equipment2

chimney6

chimney7

All in all the client was very pleased with the outcome and happy with everything we had done.

Demonstration Video

Please don’t hesitate to contact us on www.yorkshireautomation.co.uk for FREE no obligation quotation.

Wednesday, 25 November 2015

Multi Zone Heating System Using Danfoss Z-Wave TRV

Todays post is about how to create an even more efficient heating system with the use of Danfoss Z-Wave TRV (Thermostatic Radiator Valve)

In your typical home we have a single boiler with multiple radiators and a single thermostat controller which is usually located in the hallway. The biggest problem with this arrangement is that once the temperature has reached the set point in the hallway, that is when the heating will be triggered. This means that even if the rooms are heated up to the the required temperature but the hallway hasn’t, then the boiler will continue to run until the hallway has reached the set point.

We can add traditional TRV to help each room reach a set temperature and this then means the temperature is then normalized throughout the house. This helps to save energy as once the room reaches the desired temperature then the heat supply is shut off and diverted to where it is needed.

These traditional TRV are manually operated valves and once you have set the temperature setting then it will continue to work at that temperature. During a typical day the downstairs is occupied and upstairs is unoccupied. So if the heating is turned on then the whole house will receive the heat from the boiler and start warming up the whole house, so unfortunately the upstairs is also being heated when it is not required. This means wastage.

By adding the Danfoss TRV instead and including them into your Z-Wave home automation network we can program in a schedule setting and adjust the required temperature setting for the upstairs rooms to a lower value during the day and to a higher temperature for the evening as required. This means that we are not wasting energy by heating unwanted rooms of the house.

image

By adding the Danfoss Z-Wave TRV to each radiator we can create a simple multi zone heating system enabling greater control over the temperature of individual rooms within the home.

If you are interested in purchasing home automation products and services contact us for pricing and more details.

Thursday, 19 November 2015

Budget Wall Mounted Tablet for Home Automation Control

Here is a cheap little project I did at home, using an old Android tablet I had laying around and a cheap box photo frame and a long white USB cable for powering the tablet. 

I am using the excellent ImperiHome Android app which can be used to control various Z-Wave gateways such as Vera and the Fibaro Home Center 2 and some others. 

With the ImperiHome app I can control all aspects of the home automation system such as lighting, curtains, heating etc however the main use for this wall panel will be for entry and exit. To be able to arm and disarm the house / Z-Wave alarm system. 

ImperiHome has a very useful feature and this is the ability to lock down certain scenes or devices with a pin code. So for example when I press the Welcome Home scene or the Disarm House scene you are prompted to enter a 4 digit pin code like a traditional alarm panel. 

Another nice feature of ImperiHome is the screensaver option, so after a set amount of time, 1 minute in my case the screen will go black / dark.

I have configured the Android tablet to never go to sleep so it will always be on and the WIFI will always be up and running, you just need to tap the screen once to display the ImperiHome app and away you go you can then control the home automation system instantly. 

ImperiHome also has an option to start the app at startup. so if the tablet loses power or is restarted the ImperiHome app will automatically launch again. 

Wednesday, 7 October 2015

Kitchen Cabinets Z-Wave Colour Changing LED Lighting

In this post we will show you how we can install for you colour changing under cabinet lighting for your kitchen. Many people have a standard light coming on but we can go a few steps further and give you an array of colours to choose from.

image

What we did was put some RGBW strip lighting under the wall cabinets and take the cable through the cabinet to above the wall units. We then put a single Z-Wave RGBW module and connected the power supply and the LED strip lights.

Once that was complete we added in the Z-Wave module to the Fibaro Home Automation controller. Here you can see that we can now set our colours or create some programmes and/or favourite colours as well.

image

Not all family members are big technology fans and some may not want to use the phone app or tablet app to control the lights, they may require something more simple and straight forward.

Fibaro Home Automation APP – RGBW Controls

With this in mind we added a key fob remote control, this is a wireless Z-Wave remote and does not require line of sight to function.

 

image

The remote has four buttons but importantly can be used to give us eight functions. So we programmed one of the buttons as on/off, and the remaining three buttons gave us options for six colours.

My wife loves this as she has the under cabinet lighting she has been wanting for a long time and now has six colours to choose from and all from using a simple remote control.

Of course later on if she wants to change the colours that is no problems at all and we just go into the Z-Wave controllers configuration page and make the changes to six different colours.

So instead of being boring and having just one colour we have six!

Blue Colour:

image

Red Colour:

image

White Colour:

image

Purple Colour:

image

Below is a short video showing the remote and lighting effects in action.

Don’t forget to visit us at www.asmarterhome.co.uk for more home automation ideas and FREE no obligation quotations.