Kodi Community Forum

Full Version: Would you use a FREE home automation program with KODI, including voice control?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I'm new to KODI, but I am an expert in Home Automation and can integrate literally anything in my home. Everything from my dust collector in my garage to my: doorbell, mail box, Google Voice (via OBi110), lighting, ceiling fans, AV components, security, HVAC and even cell phone GPS location is integrated into a single seamless platform, allowing for a common place for all control logic and scenes (e.g. no logic exists in a separate location such as within Tasker, universal remotes, etc...). Even the voice control discussed below is done in a generic and automatic fashion (e.g. no need to define names of switches, exact phrasing of commands, etc...).

Since I believe in a common platform so that everything in my home can work together, I've also developed an easy to set up home automation module for KODI; it even includes auto library import for all native media content types, two way communication (so events are always kept in sync within the home automation program), allows you to send message such as caller id data to KODI, etc... The home automation platform being used is completely free, but runs on Windows and is called Motorola Premise Home Control. It is a very open platform and end-user friendly, allowing you to mix z-wave with X10 with insteon, IR with Serial control with IP control, but keep the control logic in a common object oriented language and GUI.

Premise can truly automate anything you can think of and even has an SDK in addition to vbscript support (for us non-professional programmers): http://cocoontech.com/forums/page/home-a...premise-r3

I've attached a poll on this thread to see how many would actually download and install, a free Windows based program for home automation
Please vote yes after studying the wiki only if you actually plan to use it.
It would take a lot of time to fully document everything to where a beginner can set things up, and you would still have to be very computer literate (which is why I think it's a great match for KODI users). I developed the module for myself and plan to put a KODI box on the back of every TV, but I want to share my work too as that's what makes KODI great. Again, there would need to be enough interest for the KODI module (e.g. more than a few people downloading and using it), as this would consume a bunch of my free time over the next few months until others are familiar enough with Premise to help support things.

I would follow the KODI module up with more videos on youtube covering topics such as a beginners guide to Premise and Home Automation, how to integrate new IR devices into Premise (using a wizard), and how to use my SpeechParser module. You don't have to be a computer programmer to do the stuff I'm showing (I've done the coding for you!), but you do need to be a self study, and able to use forums and read help files to figure stuff out. The best match is probably someone with an IT, engineering or computer programming background. Below are some videos to see the level of integration I'm talking about, and some things you'll be able to do. Between the videos below and the wiki at the top of this post, hopefully the community can decide if it's worth my time to post and document everything.

Overview of voice commands with KODI and Premise using my SpeechParser module:


More details on my integration of KODI:
(NOTE: video is of nVidia Shield and mixes IR to allow control of native Netflix 4k app), but you'll use the JSON-RPC option within the module to control any version of KODI in recent years.


Additional Questions for the moderator:
Is this the correct place to post home automation software or is the hardware section better? How does it then get added to the listof supplemental tools at the top of this forum?
This is stuff I've always been interested in. Unfortunately I know very little or nothing about programming. I will say that when I saw your videos as well as a video of a guy using echo with plex it did interest me a whole lot and want that in my house.
I suspect this is the case with 80% of the people here. Hence the reason for the poll!

You can do a lot with Premise without coding, but to do anything complex, you will need to learn vbscript syntax at some point. This is NOT a requirement at the start though and you can for sure setup everything in the video without it, except the URC MXW-920 RF remote as I never made that module to be DIY friendly.

With a mouse you can do: scenes, create custom buttons, logic diagrams for occupancy detection (to automatically turn on lights or whatever you want), add scenes to a calendar, etc... If whatever Premise module you want to use is designed well (99% of them are), setup is also done with a mouse! The web-based GUI in the video is also automatically generated!

You can add a lot of functionality using vbscript statements like: if/then/else, creating objects, using variants, toggling Boolean properties for some device object through code, etc... I don't think this is hard as there are thousands of examples on the Premise forum, and even more vbscript examples online. These are the types of things a beginner tutorial would show too (after covering basics like how to install Premise, what Premise is and how it works, etc...)

I learned vbscript from doing home automation, but I also have an MS in EE. I'm not sure of your technical background, so when I get around to posting some videos on how to use Premise, just watch a few and see if it's something you think you can do. It's free after all Wink
I also like how you could use the watch you had. I love what I've seen you and other people do with the Amazon Echo but it seems like it's pretty much stuck in one location with it. At least with the watch you have you can be in another part of the house if you want to have your system do something. How hard would it be to use the apple watch? Just wondering since I have lots of Apple products and no android products.
The SpeechParser module I've written is much more elegant than some methods out there. The actual command interpretation is done within the home automation server, and you send a command via an HTTP Get or Post like:

MyServer.com/sys/{SomePathGUID}?d??mbNaturalLanguage(this_is_a_spoken_command)

Where this_is_a_spoken_command could be "turn_on_master_bedroom_light" or whatever you want Premise to do. The neat thing is the words are NOT order dependent (unlike the Smartthings or Wink stuff that works with the Echo).

As you can guess, this is possible with any device as long as it has an API that lets you grab what the spoken phrase was and send it as part of an HTTP Get (any programming language can do this).

Here's a PDF describing the SpeechParser part in detail, it also goes over some command examples: https://drive.google.com/file/d/0B1J0a4O...sp=sharing

I need to update the Tasker instructions before I ever post this as there are some more details on setting up the Tasker Javascript, especially if HTTPS is used. I actually made this module over two years ago and have used it everyday with Google Now, but the KODI module is new so I need to test it more, and refine it's code.

No reason it couldn't work with iOS, someone just needs to write a script or build an APP. I'm not going to do this though as I don't have any apple devices, plus there's no incentive for me to do this...

(2015-09-14, 19:23)Tatts4Life Wrote: [ -> ]I also like how you could use the watch you had. I love what I've seen you and other people do with the Amazon Echo but it seems like it's pretty much stuck in one location with it. At least with the watch you have you can be in another part of the house if you want to have your system do something. How hard would it be to use the apple watch? Just wondering since I have lots of Apple products and no android products.
I really like what you've done, but when thinking about Home Automation, I look for the Automation part, which really wasn't shown that much within Kodi.

Is there an interface in Kodi, which you can see which lights in which part of the house are On? Or what is playing in different rooms (Movies, TV Shows, Music)?

What about Security settings, can you have a Security Camera that will show a picture on the Kodi screen when someone comes up to the front door? Maybe pauses whatever you're doing at the moment (watching a Movie, TV Show, Music), when the image (or video) is displayed?

What would really be nice, is if you could display the layout of a room within Kodi, and be able to turn lights on/off with a remote, or turn on/off a ceiling fan, or view various security camera's, etc.

What about powering up when I'm driving home (reading my GPS on my phone), to turn on Music and lights (if its' at night), in say the Living room?
I'll be taking a look at what you've put together here, im a fairly invested user of homeseer which im very happy with, but always nice to see new products being introduced!
I have been wanting to do this for a while. I would definitely love a free home automation program that ties into XBMC/Kodi.
These are excellent questions. You are clearly into HA. The videos aren't meant to be a 1-2 hour presentation of my whole home (not yet) and can't in detail explain or even show the back end Premise Builder in 5 minutes Wink They are meant to gauge interest for later videos that will be about automation too and not just control.

No 10 foot interface for KODI to control my home is planned, but this would technically be "control" and not automation. I know what you are thinking, and I've too have seen the Control4 interface that can be displayed on a TV... There's no reason this can't be added later though when experienced KODI folks like yourself get involved (see the wiki in my first post for minibroker and SDK links). I for one would be willing to help with it. For now, this isn't on my list as I have only used KODI for about a month! I don't know anything about KODI's source code right now or how to make a KODI add on.

The KODI Premise module right now pauses when certain events take place, and also displays a message (using KODI's JSON-RPC, this was trivial to implement). Currently, this occurs in my setup:
1. Door bell rings (message displayed, but the final version will use JSON-RPC to send the image path of my door bell camera. I actually meant to go back and add this, thanks for reminding me).

2. Incoming phone calls to my cell number or google voice (I wanted to show this in the video, but didn't want my cell number for the world to see, and was too lazy to edit the video)... My original post did say: "doorbell, mail box, Google Voice (via OBi110)" Wink

3. Weather alerts (uses weather underground API), me and another guy worked on that module (see the wiki from my first post).

The capability is there in the KODI Premise module, it's always up to the user to integrate their own stuff with a few lines of code written under "OnChange" events. I can include examples of things you can do in later videos.

A good approach for what you want is to use my Doorbell module from 2012 that's found here that uses a generic IP based camera (discussed in the wiki I posted) along with another users work on a doorbell module:
http://cocoontech.com/forums/topic/22227...ntry181365

Then you will use the properties of the KODI device object to do whatever you want such as send an image of what the doorbell camera captured and text message to KODI when the doorbell rings. This is done using vbscript under Home, based on events (for most things typically just you OnChange events).

To better illustrate the idea of what a Premise module is:
A Premise install consists of "Modules" so you can reuse code across multiple installations. These "Modules" define classes that "Devices" are instances of (e.g. aka device objects). Then, these device objects are linked to home device objects, allowing you to add home specific logic under the "Home" layer. The automation part of it like the stuff you are asking, is typically found under this home layer.

This way the specific code is easily reused when a device technology changes (e.g. you switch from X10 to Z-Wave for lighting). Also, a module can be used over and over by anyone as it doesn't include the home specific logic you are asking about. This is a very versatile way to do things, which will be clear after I post more videos. This is shown with images in the wiki (not sure if you clicked on the link in my first post).

Since you are already into HA, please read the wiki in my first post. You can also download Premise and read the help file. Premise of course includes a powerful calendar/scheduler, so it can control anything that Premise can talk to and do whatever you want at night.

PS: I also have Tasker monitor my GPS location and then have a javascript that sends it to my home using a Tasker module I've built for Premise. This was also discussed in my original post Wink This event, like any event in Premise, can of course be tied to anything my Premise Server (aka SYS) can talk to. For example, you can have KODI start up and play your favorite channel, you porch lights and garage lights come on as you approach, etc...

If there's enough people using Premise, I don't mind posting my Tasker module down the road. I always write stuff generically, so folks like you can reuse it. The Tasker module does everything via javascript too, so not a lot of clicking required on your phone to setup, but you do need Android, and possibly root for some of the features. If I did this now though without showing people how to use Premise first, I'd get a zillion questions...

After the beginner videos, I definitely want to post a video screen recording of what the back end of my current setup looks like and how stuff "binds" together (or you could just read the wiki I linked to). I have to be careful here, so as to not divulge any details of what brand my security system is, etc but I don't mind showing you. Right now, without a video, there's too much explanation required for this thread.

(2015-09-14, 20:19)Powerhouse Wrote: [ -> ]I really like what you've done, but when thinking about Home Automation, I look for the Automation part, which really wasn't shown that much within Kodi.

Is there an interface in Kodi, which you can see which lights in which part of the house are On? Or what is playing in different rooms (Movies, TV Shows, Music)?

What about Security settings, can you have a Security Camera that will show a picture on the Kodi screen when someone comes up to the front door? Maybe pauses whatever you're doing at the moment (watching a Movie, TV Show, Music), when the image (or video) is displayed?

What would really be nice, is if you could display the layout of a room within Kodi, and be able to turn lights on/off with a remote, or turn on/off a ceiling fan, or view various security camera's, etc.

What about powering up when I'm driving home (reading my GPS on my phone), to turn on Music and lights (if its' at night), in say the Living room?
Thanks!

Premise isn't new. It used to be part of Motorola, and Lantronix before that. It was also a $1000+ program originally. It was just ahead of it's time, and never took off. So the original developers then at Motorola made it free!

Now the modules I'm talking about are new. You can read the SpeechParser PDF I posted a few posts up to get an idea of what a Premise "Module" is. I know now I should have clarified that in my first post, instead of providing a Premise wiki link.

A module inherits from existing classes within Premise, creates new classes and also extends others. The stuff in the second video I posted was possible in ~2002-2006 range with Premise Builder (using DVD changers that talk over RS232, etc) and the same GUI in fact (minus the accurate voice control, although there's a Premise voice control module from 2006 believe it or not)!

What's so beautiful about Premise is the ability to reuse classes like I have in the KODI module, for a 4k KODI box I can hold in my hand. That obviously never existed when Premise was first created in 2002.

(2015-09-14, 20:26)DoubleT Wrote: [ -> ]I'll be taking a look at what you've put together here, im a fairly invested user of homeseer which im very happy with, but always nice to see new products being introduced!
Pretty sophisticated.
Never got any further than Active Home SDK with X-10 Commander and a module controller plug-in for Kodi.
This looks..... well...... awesome.
yesi would this is what i have been looking for i want to change my room into voice contorted like javis
Thanks. Premise natively supports the X-10 via a CM19a and a few other serial based controllers. I wrote a module for X10 secure devices too, link is on wiki. This way, you can have your lights dim when you hit play, and brighten when you pause KODI. This works whether you use a keyboard, IR remote or mouse to play/stop KODI (have this working now, not sure if I posted it in the second video).

(2015-09-14, 22:38)brazen1 Wrote: [ -> ]Pretty sophisticated.
Never got any further than Active Home SDK with X-10 Commander and a module controller plug-in for Kodi.
This looks..... well...... awesome.
Using this for years and Harmony 900 actions to tie up loose ends. Yes, using CM19a and IR543. Not 100% but better than nothing. Interested in yours. Not to take away from all the other automations you've shared in your videos.

http://forum.kodi.tv/showthread.php?tid=110392
Very interesting for Kodi if all the code for this is released as open source, but not interested if it closed source.

I've got nothing in general against you protecting your inovation, however having a "free" closed source option available generally discurages new open source alternatives from emerging.

Once example is closed source binary codecs verses open source FFmpeg/Libav. And another more relevant example here is the closed source VoxCommando integration with Kodi.

As long as there is a existing "free" option out there then will be less developers that sees a whole to fil and step up to develop a new open source option for Kodi.

My conclusion is that it's better for the Kodi community if there is no "free" closed source option in the long term.
Pages: 1 2 3