Author Topic: Velleman k8000 kit  (Read 4769 times)

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Velleman k8000 kit
« on: October 24, 2005, 04:36:55 pm »
Hi,

A year or two ago I was going to build myself a custom security system using the Velleman K8000 interface kit. Of course, as a lot of my projects do, it got forgotten about.

Now that I'm getting my plutohome system up and running it looks like it has drastically reduced the amount of work needed to use this interface.

Has anyone used a k8000 with plutohome before? It has 16 digital io ports, 9 analog outputs and 4 inputs. Should be more than enough to get a decent alarm system working, and possibly climate sensors too.

The question is, what do I need to do to get this working? There are linux libraries available to interface with it, and I have had them working in the past. Is it just a case of implementing something in perl for example that connects to the k8000 and sends events to the DCErouter (and receives them too!)? Would I then have to create a device template to understand this? Am I getting totally confused? ;) Any pointers to the correct areas of the documentation would be great!

I've got lots of plans on what I want to do with pluto, and hopefully I'll have a machine ready to do a proper install on (rather than a small epia system I'm playing with atm). Any ideas when .31 will be available? (not nagging... honest!)

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Velleman k8000 kit
« Reply #1 on: October 25, 2005, 08:56:46 am »
We don't have a K8000 device, but it's easy to add.

In PlutoAdmin you will go 'Advanced', 'Device Templates'.  Choose (ar add) Velleman as the manufacturer, and the category 'Interfaces', 'Specialized', then 'add' to add a "k8000".

You will have to decide if you want to use GSD or C++.  C++ is better if there's already a Linux library you want to link to and make system calls.  If the K8000 uses a basic serial protocol that you want to implement directly: (ie <stx><0xport_ID><0xcommand><0xparameter><0xchecksum>, etc.), then GSD may be easier.  GSD uses embedded ruby with a web-based wizard.

After adding the device template, run DCEGen if you want a C++ program for your device, or go 'wizard', 'devices', 'generic serial devices' if you'll use GSD.  See: http://plutohome.com/support/right.php?section=documents/documentDisplay&docID=51 and http://plutohome.com/support/index.php?section=document&docID=113

Now in PlutoAdmin go to Wizard, Devices, Interfaces.  Add the K8000 as an interface.  The controlled via is whatever pc you want to run the software on.  Go to Wizard, Devices, Security and add some motion sensors, door break, etc.  The Controlled Via is the K8000, and the 'Port/Channel' is whatever port you plugged it into in the K8000.  You can also add a thermometer on the Wizard, Devices, Climate page, and maybe a light on the Light page.

When defining the device template for the K8000 you can choose what commands it implements and events it fires.  Normally this type of device doesn't do any because all commands/events are to/from the child devices.  In other words when it's time to turn on the light that's attached to port 5, the "ON" command will go to the 'Light' device which is a child of (or controlled via) the K8000 and has a port/channel of 5.  When the motion detector is tripped you will fire a 'sensor tripped' event from the motion detector--not the K8000.  The K8000 itself probably does nothing (except maybe on/off???)--it only processes commands on behalf of its children and fires events on their behalf.

This works because the child devices (light switch, motion detector, etc.) do not implement DCE (ie they don't register to receive commands).  Therefore DCERouter will walk up the tree to the find the first parent that does (the K8000) and send it all commands destined to its children.

Without knowing this devices my guess is all the code for implementing commands will likely go into the 'ReceivedCommandForChild' function.  And there will be probably an event thread to polls it for events and when it gets one fires an event from the appropriate child.

When your device starts up, you will check what are all your child devices, what ports they're on and create whatever structure you want to hold this info.  You will also want to check the type or category of teh child device so you know how to handle it.  You will treat events from a motion detector differently than events from a thermometer: fire temperature changed events rather than sensor tripped, etc.

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Velleman k8000 kit
« Reply #2 on: October 25, 2005, 10:19:21 am »
Wow, cheers for that!

I wish I could use GSD, but unfortunately this is a parallel device! :( I shall start work on it as soon as I have my final system built for pluto.

How do I go about submitting the DCE wrapper to you for possible inclusion, along with any device template?

Thanks,

Darren.

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Velleman k8000 kit
« Reply #3 on: October 25, 2005, 11:26:01 am »
Just email me the code: aaron.b at plutohome.com.  Our public svn is read-only, but I'll add it here.  Then it will be built automatically by our daily build system and included in our mirror and on the cd.  As far as the changes you make to the databaes, do 'advanced', 'sqlcvs', 'checkin'.  It shows you what tables/records you modified and commits them.  Note that when you commit like that your database changes go into a 'quarantine' until they're reviewed.  You can also go to live chat, ask the support rep to be transferred to me, and if you turn on remote assistance i can commit them for you with my password so they go directly into the production database without quarantine.

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Velleman K8000 Support Status?
« Reply #4 on: January 24, 2006, 05:31:27 pm »
Hi there--long-time lurker, first-time poster.  :)

I was just wondering if support for this device had been added yet.  I downloaded the program last weekend and was thinking this might be a great add-on to enhance your product.  

As noted, Linux libraries are available as well as C++ code.  One enterprising user has even written an alarm system for the unit that runs under Linux.  Here's his site: http://benoit.locher.club.fr/k8housealarm/index.html

I'm looking forward to setting up a machine to begin working with Pluto.  It looks like a great product!