LinuxMCE Forums
May 18, 2013, 07:51:55 pm GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: 1 [2]
  Print  
Author Topic: noob wants to know a b c's of building divers for hardware  (Read 3837 times)
mhorst
Veteran
***
Posts: 72


View Profile
« Reply #15 on: April 11, 2010, 06:32:12 pm »

Ok, done.

Trac Ticket number is #671 (http://svn.linuxmce.org/trac.cgi/ticket/671).
Logged
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #16 on: April 11, 2010, 06:43:24 pm »

did you do an sqlCVS checkin of DCE and IR referencing the trac ticket?

-Thom
Logged
mhorst
Veteran
***
Posts: 72


View Profile
« Reply #17 on: April 11, 2010, 06:53:28 pm »

Yep. Did something go wrong?
« Last Edit: April 11, 2010, 06:55:11 pm by mhorst » Logged
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #18 on: April 11, 2010, 07:13:17 pm »

Everything was checked in, and I have verified that it is in the master database. This has been added as device template #2127

Thank you so much for your contribution Smiley

-Thom
Logged
mhorst
Veteran
***
Posts: 72


View Profile
« Reply #19 on: April 12, 2010, 09:14:34 am »

You're welcome Smiley

It was actually quite fun, I'm planning on contributing more in the future.
Logged
Kooma
Veteran
***
Posts: 102


View Profile
« Reply #20 on: April 12, 2010, 02:14:44 pm »

Now that you succeeded so well and fast with the driver, would it be possible to document the whole process in wiki?

I know there are pages referenced already in this thread, but still, that would be a mega contribution.

I'm sure there a bunch of others like me that would like to compose some drivers or support for new devices, yet, it's too complicated (at least to me) with diffused and distributed information.
Logged
grind
Veteran
***
Posts: 54


View Profile
« Reply #21 on: April 12, 2010, 09:19:38 pm »

Kooma is totally right. A short How-To to create new Templates would be very usefull.
Logged
mhorst
Veteran
***
Posts: 72


View Profile
« Reply #22 on: April 13, 2010, 08:25:46 am »

I've already updated the http://wiki.linuxmce.org/index.php/How_to_add_your_own_GSD_device page, but the http://wiki.linuxmce.org/index.php/Edit_Device_Template page I reference there can still use some work.
I'll see what I can do.

BTW: I've only made an ethernet based driver, and have only added ethernet based examples to the wiki page. If somebody has experience with writing drivers for the other communication methods (RS232, USB, etc.), feel free to add the drivers you wrote to the examples section of the page, and note any differences in creation. (For RS232 drivers the device data probably has to contain the COM port to be used by the core, instead of the TCP port, but I have no idea which id that field has.)
« Last Edit: April 13, 2010, 08:34:29 am by mhorst » Logged
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #23 on: April 13, 2010, 03:15:52 pm »

TCP is used when the TCP Port device data is specified. Serial Port is used when COM Port on PC device data is specified.
Logged
gonesurfing
Veteran
***
Posts: 61


View Profile
« Reply #24 on: April 18, 2010, 05:05:48 am »

hi
can you point me in the right direction of a c++ interface driver using udp as an example
steve
Logged
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #25 on: April 18, 2010, 05:31:48 am »

Look at the VistaICM2 driver in src/VistaICM2 of the source tree. Los93sol and I wrote it.

-Thom
Logged
mhorst
Veteran
***
Posts: 72


View Profile
« Reply #26 on: May 17, 2010, 06:29:55 pm »

I updated my system yesterday and it stopped working.

Took me a while to track it down; the id of the device template for my Proliphix driver had changed, during the update, but the template id referenced by already installed devices was not updated. Is this supposed to happen?

I had to do a manual mysql query to fix it, because according to the web-admin there was no such device (despite the fact that my thermostat was there in the list of devices Smiley ).
Logged
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #27 on: May 17, 2010, 07:53:01 pm »

AIGH!

DO NOT DO MANUAL QUERIES TO MODIFY PRIMARY KEYS!

Put it back, and change your code to reference the new template #.

-Thom
Logged
mhorst
Veteran
***
Posts: 72


View Profile
« Reply #28 on: May 17, 2010, 10:05:03 pm »

No, I did NOT change the primary key. Upon re-reading my previous post, however, I can see how you can interpret it that way Smiley

I changed the foreign key in the Device table of the pluto_main database. My device with PK_Device=78 now has FK_DeviceTemplate=2127 (instead of FK_DeviceTemplate=2190). That's the only thing I changed, and I kinda considered that the obvious thing to do (I'll try express myself better next time Smiley)

I was just surprised that the foreign keys in other tables do not change automatically when the primary key is changed.
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!