NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 72 73 74 75 76 … 93 Next »
Home Automation

 
  • 0 Vote(s) - 0 Average
Home Automation
krekeg
Offline

Junior Member

Posts: 14
Threads: 2
Joined: Apr 2005
#1
2005-04-01, 09:52 AM
Hello All,

This is my first post as a new user of GB-PVR.

Brilliant product and found just in the nick of time. I was about to order a copy of Sage TV!

I thought I would post a message of what I have been doing with GB-PVR.

I have a serial relay box connected to my home PC which is able to turn on and off various things around the house - lights, heating etc.

I decided I would have a go at knocking up a quick plugin that would control this relay box. Luckily I had already written a .Net webservice that takes care of all the com port stuff controlling the relay box so adding this functionality to a plugin was simply a case of adding a reference to the webservice.

I now have the plugin up and running on GB-PVR and for the first time the girl friend finds it simple enough to use!

Screenshot of the plugin

The best bit about it is that because the plugin just calls a webservice to control the relay box, it means I can switch on the heating from a GB-PVR running on my work PC so the house is all toasty by the time I get home!

Again, great product and thanks to Sub and everybody who posted the various items on the forum that allowed me to figure out how to write a simple plugin.
johnburton
Offline

Member

Posts: 56
Threads: 7
Joined: Aug 2004
#2
2005-04-01, 10:32 AM
This is really interesting. I have a x10 unit that plugs into the serial port of the pc and sends x10 signals through the mains. It would be great if a plugin could be developed to control my unit.
simon
Offline

Member

Posts: 67
Threads: 12
Joined: Jan 2005
#3
2005-04-01, 10:50 AM
I've thought about this too and if written carefully,this should be very doable and if we write it carefully it should interface with lots of things, (X10, xAP, xPL etc etc)

John: which X10 units do you have?

krekeg: Are you using X10 or something else? I assume your PC at home has to be on all the time to allow this to work?

Simon
Simon, UK.

PVR 150, 80Gb and 250Gb SATA, UK Sky box as source.
krekeg
Offline

Junior Member

Posts: 14
Threads: 2
Joined: Apr 2005
#4
2005-04-01, 12:04 PM
All I'm using is a box I bought for about 50 quid that has 8 relays plus a few input sensors. The whole thing is controlled via a serial port.

The limitation of this device is that the relays have to be hardwired into the house electrical circuits and only for devices that draw no more than 5amps.

I looked at X10 when I first installed this device but it was a lot cheaper doing it this way. Living in a bungalow makes it a lot easier getting to the wiring, it all runs to the attic!

My PC is running all the time and it does seem quite odd programming the central heating and hotwater using Windows Scheduling.

Of coarse the really cool aspect of all this, especially when at the pub, is that it can also all be controlled from a mobile phone!
Tulex
Offline

Member

Posts: 124
Threads: 30
Joined: Feb 2005
#5
2005-04-01, 01:05 PM
This is cool. If I had an x10 hooked up to a robot arm, I could get it to hand me my beer!
Intel D915PBL with P4 550 3.4 W/1GB PC4200
Seagate 160GB and Plextor PX-716SA DVD SATA drives
DVI via Gigabyte GeForce 6600GT
Hauppauge WinTV-PVR150
krekeg
Offline

Junior Member

Posts: 14
Threads: 2
Joined: Apr 2005
#6
2005-04-01, 01:10 PM
...but what would be really cool is if i could get the X10 robot arm to press the buttons on my VCR so it could record TV programs!
krekeg
Offline

Junior Member

Posts: 14
Threads: 2
Joined: Apr 2005
#7
2005-04-01, 03:53 PM
There is no problem working it with the MVP. That was my main reason for writing it in the first place.

The trouble is I have written it specificaly for my setup and really I don't know enough about GB-PVR plugin development (skins, configurations etc) to competently write a generic plugin.

The ironic thing is, because of the webservices, if I was to give out this plugin now, everybody could control my house!

If somebody wants to properly write all the GUI stuff for a plugin like this then I would be happy to help with the background stuff.
Pioneer4x4
Offline

Posting Freak

Posts: 926
Threads: 50
Joined: Jan 2005
#8
2005-04-01, 04:53 PM
I also am VERY interested in this.
krekeg
Offline

Junior Member

Posts: 14
Threads: 2
Joined: Apr 2005
#9
2005-04-01, 05:38 PM
This is the link to the relay box that I'm using;

3165 - PC Controlled Relay Board with Box

Like I said earlier, this method requires hardwiring into the household electrical circuits with all the obvious implications. I have it set up so that with the relay set to one postion the normal wall light switch has control and with the relay set to it's other position it bypasses the switch and the light comes on.

I think the X10 methods are probably easier (and a lot safer!) but the same principles would apply as long as there is an API for controlling the X10 controller which I'm sure there is.

Idealy we would separate the physical control code from the plugin so that the plugin could remain generic with specific code for controlling specific devices.

In effect my webservice does this as it separates the com port programming and simply presents three methods to the plugin, Status, SwitchOn and SwitchOff. The SwitchOn and SwitchOff methods just take the relay number (1-8) as an argument.

In my plugin code (vb.net), when the plugin is loaded it calls the Staus method from the webservice which returns something like 00100000. In this case it shows that relay number 3 is open and all the others are closed. The buttons down the left of the screen toggle the relays by either sending the SwitchOn or SwitchOff with the relevant relay number e.g. If I press the heating button, the methods SwitchOn(5) and SwitchOn(6) are called. This turns on the boiler and the central heating pump.

The image to the right is just a selection of .pngs I created in Photoshop that are drawn depending on what relay is open. Again this is a bit specific to me as the floorplan shown is my floorplan.

We would have to create a more generic way of showing what device is on and what is off.

Has anybody had any experience in programming X10?

Just another quick question, I created the buttons on my plugin by programming the GDI to draw them. Is this correct or is there an automatic way of drawing them based purely on the skin.xml?
Ron22
Offline

Member

Posts: 132
Threads: 29
Joined: Feb 2005
#10
2005-04-01, 08:22 PM
I use a X10 CM11A that connects to the serial port. It was used on older Active Home program. Now I believe they are using a CM19 USB.
I did a little playing around with a C# library I found here http://www.craigscreations.com/projects.htm
Using this I was able to make my own quick plugin. Nothing as nice as krekeg did. I did not test it on the MVP at that point my wife was already mad about the lights going on and off.
The X10 library does have CM17 (FireCracker) programmed into it also. I also have a FireCracker but did not test with that at all..
Windows XP Home
P4 2.6GHz - 768MB Ram 980GB 4 - HDD's
3 MVP
1 PVR-150
1 PVR-250
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Windows Media Connect - Storing stuff on a Home Server psycik 3 2,744 2009-09-29, 03:47 AM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode