Author Topic: Problem editing ruby commands for new device template  (Read 2999 times)

scourt

  • Newbie
  • *
  • Posts: 5
    • View Profile
Problem editing ruby commands for new device template
« on: July 18, 2009, 02:29:06 pm »
I've been trying to create a new device template for the Clipsal CBUS interface by following the instructions at http://wiki.linuxmce.org/index.php/Implementing_Clipsal_Interface_using_Generic_Serial_Device.

When I click the 'Edit Ruby Codes' button I get the new window titled 'Edit Ruby Codes' but it shows the following message in red "There are no groups/codesets for this manufacturer and device category. Please add a group before adding codes."

I had a look in the DeviceTemplate table for other templates using FK_DeviceCategory=81 (Lighting Interface) and noticed tha the PLCBUS template (1920) appears to be very similar to what I'm trying to achieve.  When I click the 'Edit Ruby Codes' for this template it doesn't show the nasty message.

Does anyone know of any special steps that might be required to accomodate the different manufacturer (Clipsal) ?

LegoGT

  • Regular Poster
  • **
  • Posts: 29
    • View Profile
    • Medium Rare Brain
Re: Problem editing ruby commands for new device template
« Reply #1 on: July 18, 2009, 10:58:30 pm »
(off the top of my head...)

You can create a new codeset with any special name you want but ultimately you'll need to click the button to Add/Remove Commands. Then you can select the proper Generic/Internal commands you need for a Ruby GSD.
A brain dump of my neverending projects: http://MediumRareBrain.com

scourt

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Problem editing ruby commands for new device template
« Reply #2 on: July 19, 2009, 04:14:09 am »
Ok, so on the 'Edit Ruby Codes' page I entered a new name 'CBUS2 Commands' and clicked the 'Create new group' button.  After a refresh this page then showed numerous commands (many more than I expected) including #193 (off), #192 (on), #190 (Enter/Go), #91 (Input Select) etc.  I don't know why I inherited all the extra commands...

The section that normally shows the actual ruby script associated with command #193 was actually showing:
0000 006C 0022 0002 0158 00AC 0016 0016 0015 0016 0016 0016 0016 0016 0015 0016 0016 0016 0016 0040 0016 0016 0016 0040 0016 0041 0015 0041 0016 0040 0016 0041 0015 0041 0016 0016 0015 0041 0016 0016 0015 0041 0016 0016 0015 0016 0016 0041 0015 0016 0016 0016 0016 0016 0015 0041 0016 0016 0015 0041 0016 0040 0016 0016 0016 0040 0016 0041 0015 0041 0016 05F1 0157 0056 0015 0E55.
Surely this isn't valid ?

I clicked the 'Add/Remove Commands' button which then showed a new window with all the commands listed.  I unticked the commands that I wanted to remove then clicked the 'Save' button.  This didn't appear to remove the commands that I unticked.

Has anyone had this problem before ?

scourt

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Problem editing ruby commands for new device template
« Reply #3 on: July 20, 2009, 03:07:05 pm »
I'll just reply to myself in order to log my findings so far...

It seems that the 'Edit Ruby Codes' window is showing all of the entries in the InfraredGroup table that have FK_DeviceTemplate=NULL.  Any ideas why ?

I've been comparing my new DeviceTemplate record against the existing one for the PLCBUS (#1920).  The only obvious difference between that record and my new template is that the #1920 record has all of the psc_ fields set.

WebAdmin is freaking me out!