Author Topic: Rii mini i8 wifi multimedia keyboard template: getting multimedia keys working  (Read 10839 times)

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
As promised, opening a new thread since I got the template up and running and autodetecting in the following thread:

http://forum.linuxmce.org/index.php/topic,13309.0.html

Now the problem is getting the multimedia keys working... which is why I need a template in the first place since the rest of the keyboard works otb.


jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Thanks Tschak...

Have read it and applied it. Works very well. What was messing things up was that I was battling to run "xev" because it wants to use "X" - ie it asks for 'DISPLAY' enviro variable to be set and generally I'm running it from a text terminal.

I tried setting 'DISPLAY' to '192.168.80.4:0.0' which worked a bit but didn't get the events coming through nicely... some errors/messages in xev where I think it's fighting with LMCE over the window visibility... so I just plugged the Rii into my zoneminder server and ran xev there and copied all the keycodes I needed.

Have created the template and it's working brilliantly. Very pleased, thanks for the pointers.

Now to share the template with others- are the instructions in
http://wiki.linuxmce.org/index.php/LinuxMCEsqlCVScommitProcedure
still relevant. What's a mantis ticket?

PS have already wikified on the assumption that I'll share the device template with others.

« Last Edit: July 07, 2013, 01:00:40 pm by jamo »

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
You need to:

- create a ticket over at svn.linuxmce.org, and keep note of the #
- use sqlcvs diff in web admin to check in your changes to dce. Hopefully this is the only template you have added or changed?
- in the comment, please reference the trac ticket #
- we will look it over and check it in.

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Thanks!

 :-[

And if I've changed one or two others....? Is there any way of isolating them at sqlcvs diff time?

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Yes, on the sqlCVS diff screen, you'll see entries that have changed. That's why you're there.

You'll notice each change has a check box next to it, if you uncheck it, that change will not be sent to our server.

You'll need to dig into the database, and match the primary keys it is showing you, with the rows in the database, to see which rows are relevant, and uncheck the rows that do not involve the Rii template.

And, for next time, please only work on one device template at a time, before submitting. :)

-Thom

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
And, for next time, please only work on one device template at a time, before submitting. :)
Now you tell me!!
OK... so I need to take screenshots of all those shiny new templates I've created because my DB is so out of date I need to update the sucker and then add them back and *then* submit. hmm...

All learning is good. Thanks Thom, appreciate the help... hope my piddly little effort can help someone else one day.

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
OK... so I need to take screenshots of all those shiny new templates I've created because my DB is so out of date I need to update the sucker and then add them back and *then* submit. hmm...
Jamo,

One trick I use is to create a text file for each parameter (i.e. #373), and copy/paste from/into the WebUI.  That way, I can use an editor with Ruby syntax highlighting, and keep a copy aside for back-up purposes.

Hope that helps!

/Mike

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Your effort is not piddly, the fact that you are doing this at all, makes you a man amongst mice. :)

-Thom

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Just say, completely hypothetically speaking, that I completely cooked the database....

Am I looking at a re-install of linuxmce?

If, for the sake of argument, I had run the sqlCVSupdate from the web-admin.... checked all the update options ... then pressed submit... while logged in as root to the pluto_main db from a terminal. and then, after waiting a reasonable time for a blank firefox window that said only "Waiting for dcerouter..." at the bottom, that I'd tried again to log in to pluto_main from the terminal, and found a bunch of error stuff scrolling past the screen ending in something like

Code: [Select]
nnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
130708 21:46:26  InnoDB: Unable to open the first data file
InnoDB: Error in opening ./ibdata1
130708 21:46:26  InnoDB: Operating system error number 11 in a file operation.
InnoDB: Error number 11 means 'Resource temporarily unavailable'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/operating-system-error-codes.html
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
130708 21:46:26 [ERROR] Plugin 'InnoDB' init function returned error.
130708 21:46:26 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
mysqld: Too many arguments (first extra is 'pluto_main').
Use --verbose --help to get a list of available options
130708 21:46:26 [ERROR] Aborting

130708 21:46:26 [Note] mysqld: Shutdown complete

Would that be a bad thing? Would it be advisable to carry on "Waiting for dcerouter...." and go to bed..... and see what it looked like in the morning? Or should I start downloading the latest snapshot now?

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Woah, forgot about rule#1.  8)
update came back with success.

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Done... I think I've checked the sucker in against ticket http://svn.linuxmce.org/trac.cgi/ticket/1836
 :o

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
I've approved the template.

However, I do need to explain something:

sqlCVS is very clever...but also very finicky...

Basically, if your database is not always up to date, then when a device template is scheduled to be approved, the various foreign keys in database tables may not be updated properly, (Basically, the device template # shifted because you had an old copy of the database, then you updated, and sqlCVS moved your device template # to the highest psc_id value (which is 2374 at the moment, we really need to reset the psc id's!), so when you sent in the submission, the device template was assigned the # 2262, but the records all had #2374 attached to them.. I went through and corrected the issue.

Now,

You also seem to have added a manufacturer (#1172), but this is actually part of the IR repository, so, for now, I have set the manufacturer to 1, so the database is correct for the moment.

You need to do the following steps, to get everything up to date:

* sqlCVS update, to pull in my changes.
* reset the manufacturer from Pluto to your new manufacturer (if needed)
* sqlCVS diff the ir repository, and have it check in your new manufacturer row
* sqlCVS diff the dce repository, and have it check in the change to the manufacturer (if needed)

Thanks so much for the submission, I wish more people would add support for hardware. :)

-Thom

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Hi Thom

Thanks again... I've done what you suggested - checked in the new manufacturer (Rii) and the updated mini i8 template linked to this manufacturer but I'm afraid we're probably going to have another key issue.... because the manufacturer number (mine) will probably differ with the master.

Shucks.... at the end of this I'm going to search the wiki for every entry that refers to creating a device template and put in bold at the top !!Make sure you update your datbase *before* merrily creating templates if you want to share with the rest of the class!!

When you get a moment, please check the submissions and see if they can work.

Ta

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Oh, no.... I think it's cooked. I went a away for a few days and shutdown the core. When I start up again, none of my MDs or orbiters come up properly... and dmesg reports a segfault from libpluto_main.so (IIR) in updateEntArea or something. I wonder if this is due to a corrupt device database - missing PKs or FKs or something?

I can scan through the DB manually but may be difficult to determine exactly where the problems are. Is there any way I can start with a "clean" pluto_main databse and then add everything from there? I took screenshots of my new devices and saved the IR codes anyway just in case of this scenario?