Author Topic: Contributing device templates and other changes into "710"  (Read 10028 times)

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Contributing device templates and other changes into "710"
« on: December 26, 2007, 07:08:22 am »
Hi,

I've made pretty complete GSD template for Marantz SR line of rs232 audio receivers. If I remember right, there is alyways a headache on upgrading LMCE if you have local changes in your sql database. Also, I'd like to enahnce it, so I'm curious if somehow this one can enter new 710 version of LMCE...

I also have implemented pretty complete support for other automation devices (blinds, drapes, thermostats, etc....) and have made some simple changes on their templates (so for instance they can be shown on floorplan, controlable from home automation interfaces, etc....) that I'd also like to contribute....

With my previous experience with Pluto, I ended up having local changes not entered into main database for over a year - so I'd like not to repeat this with LMCE...

Maybe I can also make sql dump and someone can review changes....

Please give me advice, what to do I(either to contribute now, or wait for release and contribute after that...) ?

Thanks in advance,

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Contributing device templates and other changes into "710"
« Reply #1 on: December 26, 2007, 08:07:37 am »
Bulek,

Interesting... you say GSD... are you using C++ or Ruby?

I'm doing the same thing with Insteon.. in Ruby.

Any chance you could post some of your code snippets?


Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Contributing device templates and other changes into "710"
« Reply #2 on: December 26, 2007, 08:11:00 am »
Oh, BTW, I'm in the same boat... 

I need to update sqlcvs too.....

Hari, any word of wisdom here??
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Contributing device templates and other changes into "710"
« Reply #3 on: December 26, 2007, 06:10:36 pm »
Oh, BTW, I'm in the same boat... 

I need to update sqlcvs too.....

Hari, any word of wisdom here??

for now we had to reset the repository to provide some developing sqlCVS service, the local database has to be resynchronized after a fresh 0704 installation (there is a script for that, see the sqlCVS thread). After that you can checkin your local changes and pull updates from the database.
After daniel's return we will see how to include the dump from the new repo in the 0710.
sqlCVS makes it easy to identify which rows are affected by a batch (for example see Zaerc's addition for the Logitech webcam: http://sqlcvs.charonmedia.org/sqlcvs/?site=batch/detail&repository=dce&batchid=-2).
The next step for me will be a crude perl hack to merge a batch between two repositories. The final "merge" code should maybe go into the sqlCVS binary, there are already some routines to sort out id collisions.

Any better thoughts?

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Contributing device templates and other changes into "710"
« Reply #4 on: December 26, 2007, 11:44:38 pm »
Hari, Will that also handle things lik PNP Detection scripts?
How do I handle 'external' files?
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Contributing device templates and other changes into "710"
« Reply #5 on: December 27, 2007, 12:53:20 am »
Hari, Will that also handle things lik PNP Detection scripts?
How do I handle 'external' files?

they go into the svn:
http://svn.charonmedia.org/trac.cgi/browser/trunk/src/pnp_detection_scripts

bulek: i already did a script for the Marantz SR detection:
http://svn.charonmedia.org/trac.cgi/browser/trunk/src/pnp_detection_scripts/20_MarantzReceiver.sh
after resorting sqlCVS things we have to insert the final DeviceTemplate id.
Can you add the marantz template to a fresh 0704 installation after running the sqlcvs sync script (http://sqlcvs.charonmedia.org/ReinitSqlCVS.sh)? You could then check in and i could test it with my 7001 ;)

EDIT:
you have to refer to the script from the DHCPDevice Table (referred by DeviceTemplate):
Code: [Select]
| PnpDetectionScript | varchar(25) | YES  |     | NULL              |                |
the field should hold the scriptname without path. Can be done in the pluto-admin (device template).

best regards,
Hari
« Last Edit: December 27, 2007, 01:11:32 am by hari »
rock your home - http://www.agocontrol.com home automation

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Contributing device templates and other changes into "710"
« Reply #6 on: December 27, 2007, 01:14:10 am »
Thanks Hari, that makes sense..

I'm debugging right now..
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: Contributing device templates and other changes into "710"
« Reply #7 on: December 27, 2007, 01:26:19 am »
When the Pluto guys attempted to check my template was checked into the pluto sqlcvs server, they encountered problems due to the fact that I had checked it into Hari's server earlier.  Dan, if your templates are already checked into the plut sqlcvs server, there may be the same issues checking into Hari's sqlcvs server.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Contributing device templates and other changes into "710"
« Reply #8 on: December 27, 2007, 02:52:31 am »
When the Pluto guys attempted to check my template was checked into the pluto sqlcvs server, they encountered problems due to the fact that I had checked it into Hari's server earlier.  Dan, if your templates are already checked into the plut sqlcvs server, there may be the same issues checking into Hari's sqlcvs server.
yeah, that of course leads to problems. With sqlCVS a client can only be synchronized to one repository (the one from which it imported the .sqlcvs dumps).

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Contributing device templates and other changes into "710"
« Reply #9 on: December 27, 2007, 05:19:54 am »
Understood.

I'm (STILL) debugging right now..

Trying to make the code a bit more readable...

When I'm ready to check it in, I'll let you guys know...

Thanks...
Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Contributing device templates and other changes into "710"
« Reply #10 on: December 27, 2007, 04:52:36 pm »
When the Pluto guys attempted to check my template was checked into the pluto sqlcvs server, they encountered problems due to the fact that I had checked it into Hari's server earlier.  Dan, if your templates are already checked into the plut sqlcvs server, there may be the same issues checking into Hari's sqlcvs server.
yeah, that of course leads to problems. With sqlCVS a client can only be synchronized to one repository (the one from which it imported the .sqlcvs dumps).

best regards,
Hari

Hmmm... that throws up an interesting issue. If changes are made down-stream in your sqlCVS how do you get those changes back upstream? Whats the thinking about how this will be managed?
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: Contributing device templates and other changes into "710"
« Reply #11 on: December 27, 2007, 10:19:12 pm »
Hari, Will that also handle things lik PNP Detection scripts?
How do I handle 'external' files?

they go into the svn:
http://svn.charonmedia.org/trac.cgi/browser/trunk/src/pnp_detection_scripts

bulek: i already did a script for the Marantz SR detection:
http://svn.charonmedia.org/trac.cgi/browser/trunk/src/pnp_detection_scripts/20_MarantzReceiver.sh
after resorting sqlCVS things we have to insert the final DeviceTemplate id.
Can you add the marantz template to a fresh 0704 installation after running the sqlcvs sync script (http://sqlcvs.charonmedia.org/ReinitSqlCVS.sh)? You could then check in and i could test it with my 7001 ;)

....
best regards,
Hari
Hmm,

I'm not sure if there is an easy way to do it. I also made several scarce changes to local database for other templates too (mostly for supporting more devices on interactive floorplan). I also spent quite some time for adding things to Marantz template ( I also had to add a lot of new generic A/V commands), so I guess I cannot reproduce this work from memory...

Is there any other way of detecting my work and let it go in to main database in more automatic way ?

Thanks in advance,

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Contributing device templates and other changes into "710"
« Reply #12 on: December 27, 2007, 11:13:04 pm »
Hmmm... that throws up an interesting issue. If changes are made down-stream in your sqlCVS how do you get those changes back upstream? Whats the thinking about how this will be managed?
have not discussed that with Daniel or pluto yet (all are busy with the 0710). I'm still busy staring at the sqlCVS code to explore the innards. Great stuff that is. Some brilliant mind came up with that. But from what i have seen in my journey it does not fit for that task at the moment. I'm still awaiting response from pluto. We will discuss the topic after Daniel's vacation. My first task was to do a rudimentary "batch viewer" to see the affected rows. The biggest thing hindering me from automatic merging at the moment is the id reordering. How should the script now if eg a devicetemplate is the same in the two repos if they have different id's..
Other than that it should be pretty easy to extend sqlCVS for some "merge" option to pull a specific batch from another repo and push it into the local database (without psc and stuff). That changes could then be checked in upstream.

But maybe I'm completely wrong...

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Contributing device templates and other changes into "710"
« Reply #13 on: December 27, 2007, 11:16:24 pm »
Is there any other way of detecting my work and let it go in to main database in more automatic way ?
all rows with empty psc_id should be local additions. Changes to rows can only be seen with a sqlCVS diff to the synced repo.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

Matthew

  • Douchebag
  • Addicted
  • *
  • Posts: 567
    • View Profile
Re: Contributing device templates and other changes into "710"
« Reply #14 on: January 03, 2008, 03:43:48 pm »
If I'm not mistaken, the consensus of this thread is that adding GSD templates to LMCE v0710 should not require revising the LMCE installer, but rather will depend on installing 0710 with its default GSD templates and sqlCVS support, and then syncing one's complete base installation to the public sqlCVS. Correct?

Will a public sqlCVS support that operation sometime soon, perhaps by the time v0710 is actually released (not just beta)? Will that sqlCVS allow naming groups of GSD devices, so a sync can grab just a subset (like "base 0710", or "Marantz stack#X" or "Matthew's House"), or a group of groups?

Thanks for working on sqlCVS - it really does look like it could be the site of the most LMCE development of all, as people can contribute configs to it for their own gear with a minimum of overhead.