LinuxMCE Forums

General => Developers => Topic started by: bulek on November 13, 2007, 04:49:18 pm

Title: Complete rewrite of template for Marantz Audio receivers
Post by: bulek on November 13, 2007, 04:49:18 pm
Hi,

I've already contributed template for Marantz SR5600 audio receivers (don't know for sure, but the same template could probably be easily used also on other models from Marantz that have rs232 connector). But since it didn't get into Pluto's main database, I've decided to rewrite it completely for the LMCE system. The whole procedure is currently being updated on Wiki page : http://wiki.linuxmce.org/index.php/Marantz_SR5600 (http://wiki.linuxmce.org/index.php/Marantz_SR5600)


But I have a problem :

- when I try to add MEdia scnearios for it, it's painted in red and beside text appears :
Quote
Devices in red do not have any media types set on the A/V Properties page or they are not assigned to this entertain area.
and I cannot add any media scenario for that device. It has assigned room and EA, so I really have no clue what is wrong...

Any ideas ?


- I wonder if I can contribute template and how to do it to main LMCE database, so others will be also able to use it ? I'm interested in this, cause very shortly, template for LG LCD TVs and Plasmas will follow...

Thanks in advance,

regards,

Bulek.
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: tkmedia on November 13, 2007, 05:48:09 pm
Great work bluek,


I am currently trying to build a template for Olevia 232 Lcd it only has hex codes I have tried modifying the codes for the plasma rs232 and had no luck. I seem to have communication for I have seen a response using testserialport.   Any thoughts?

 Sorry I don't have any suggestions for your scenario issue.

Thanks

Tim
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: bulek on November 13, 2007, 06:01:44 pm
Great work bluek,


I am currently trying to build a template for Olevia 232 Lcd it only has hex codes I have tried modifying the codes for the plasma rs232 and had no luck. I seem to have communication for I have seen a response using testserialport.   Any thoughts?

....

Thanks

Tim
Sorry ,

you have to be more specific about that. Can you in few sentences describe what you've done and what your problem is - maybe it's better to start new thread... I'll help you as much as I can...

Regards,

Bulek.
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: hari on November 13, 2007, 08:06:54 pm
Hi Bulek,

- I wonder if I can contribute template and how to do it to main LMCE database, so others will be also able to use it ? I'm interested in this, cause very shortly, template for LG LCD TVs and Plasmas will follow...

we don't have figured out the complete sqlCVS workflow at the moment. But it would be great if you can commit your changes to the testing sqlCVS repository (62.99.143.187:3999, pluto~pluto, see the sqlCVS thread). I have a SR7001 myself and can test your checkin next week (dsl is coming back on monday ;) ).

When we understand how to isolate sqlCVS batches we can collect them in the testing repo for working devices and inject them into the main/release repository when approved.

best regards,
Hari
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: Zaerc on November 13, 2007, 09:23:50 pm
Hi Bulek,

- I wonder if I can contribute template and how to do it to main LMCE database, so others will be also able to use it ? I'm interested in this, cause very shortly, template for LG LCD TVs and Plasmas will follow...

we don't have figured out the complete sqlCVS workflow at the moment. But it would be great if you can commit your changes to the testing sqlCVS repository (62.99.143.187:3999, pluto~pluto, see the sqlCVS thread). I have a SR7001 myself and can test your checkin next week (dsl is coming back on monday ;) ).

When we understand how to isolate sqlCVS batches we can collect them in the testing repo for working devices and inject them into the main/release repository when approved.

best regards,
Hari

Funny coincidence, I was just preparing to get back to messing with sqlCVS again.  Good to know that it's "pluto~pluto" BTW, I was using "sqlcvsuser~sqlcvspassword" from the wiki example before.  Looking at sqlCVS Diff now on an older test install, I just wish I knew what everything meant  :-[. 

Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: PeteK on November 13, 2007, 09:45:45 pm
Bulek--

Thanks!  I've got a Denon receiver that I want to control via its RS-232 interface.  I'll use your Marantz template as a, well, template for my template.

Just out of curiosity, has anyone had any luck using the GC100's serial port?  I've seen lots of posting on the IR functionality, but I don't recall someone having a working RS232 implementation.  Hopefully it will work following the wiki.

-Pete
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: 1audio on November 13, 2007, 11:18:07 pm
The Denon should be in the database already. They are supposedly all the same and I have seen them work with LMCE. And its cheaper to get a USB-rs232 adapter and than a GC100 if you have a media director in range.

The Denon may be a good one to use as a templet for new receivers, since it was created by Pluto.
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: Zaerc on November 13, 2007, 11:19:12 pm
...
Just out of curiosity, has anyone had any luck using the GC100's serial port?  I've seen lots of posting on the IR functionality, but I don't recall someone having a working RS232 implementation.  Hopefully it will work following the wiki.

-Pete

Yep, I have a CM11 attached to it, see: http://wiki.linuxmce.org/index.php/Gc100#Serial_Port on how to fix it's serial port.  You already posted in the thread where I figured it out. :D
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: PeteK on November 13, 2007, 11:38:22 pm
Yep, I have a CM11 attached to it, see: http://wiki.linuxmce.org/index.php/Gc100#Serial_Port on how to fix it's serial port.  You already posted in the thread where I figured it out. :D

Now I'm double-super sure!  Thanks  ???
-Pete
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: Zaerc on November 14, 2007, 12:03:30 am
Yep, I have a CM11 attached to it, see: http://wiki.linuxmce.org/index.php/Gc100#Serial_Port on how to fix it's serial port.  You already posted in the thread where I figured it out. :D

Now I'm double-super sure!  Thanks  ???
-Pete

Did I miss something here ???

I was refering to this thread: http://forum.linuxmce.org/index.php?topic=2161.msg10140#msg10140 btw.
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: PeteK on November 14, 2007, 12:15:29 am
No. I just completely forgot about that thread. Hence the  ???   I did have a question on that though.  What is the purpose of the modification to the script here:

Code: [Select]
mv /usr/pluto/bin/gc100-serial-bridge.sh /usr/pluto/bin/gc100-serial-bridge.sh.backup
sed -e 's/false/0/g' /usr/pluto/bin/gc100-serial-bridge.sh.backup >/usr/pluto/bin/gc100-serial-bridge.sh


Thanks,
-Pete
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: PeteK on November 14, 2007, 12:22:13 am
The Denon should be in the database already. They are supposedly all the same and I have seen them work with LMCE. And its cheaper to get a USB-rs232 adapter and than a GC100 if you have a media director in range.

The Denon may be a good one to use as a templet for new receivers, since it was created by Pluto.

Unfortunately, I don't have an MD in range.  I have a squeezebox and a receiver.  My plan was to use the wireless bridge capabilities of the squeezebox to connect a GC100 to the network so I can turn the receiver on and off to play music, controlled by a mobile orbiter.  Mostly, it's just an excuse to play with the GC100

Thanks for the heads-up on the Denon.  With any luck (and the GC100 wiki )this may just work the first time.
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: Zaerc on November 14, 2007, 01:00:16 am
No. I just completely forgot about that thread. Hence the  ???   I did have a question on that though.  What is the purpose of the modification to the script here:

Code: [Select]
mv /usr/pluto/bin/gc100-serial-bridge.sh /usr/pluto/bin/gc100-serial-bridge.sh.backup
sed -e 's/false/0/g' /usr/pluto/bin/gc100-serial-bridge.sh.backup >/usr/pluto/bin/gc100-serial-bridge.sh


Thanks,
-Pete
That simply creates a backup of /usr/pluto/bin/gc100-serial-bridge.sh and then replaces "false" with "0".
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: PeteK on November 14, 2007, 01:16:26 am
Thanks for the info!
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: 1audio on November 14, 2007, 04:38:44 am
Quote
My plan was to use the wireless bridge capabilities of the squeezebox to connect a GC100 to the network so I can turn the receiver on and off to play music, controlled by a mobile orbiter.

There has been some discussion of using the Squeezebox's built in IR port to send IR commands. If it can be figured out it would be a great way to accomplish your goal.
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: PeteK on November 14, 2007, 06:09:30 am
Yup.  That should work too.  But then I wouldn't get to play with new hardware.  ;)
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: legolas on November 15, 2007, 12:25:28 pm
But I have a problem :

- when I try to add MEdia scnearios for it, it's painted in red and beside text appears :
Quote
Devices in red do not have any media types set on the A/V Properties page or they are not assigned to this entertain area.
and I cannot add any media scenario for that device. It has assigned room and EA, so I really have no clue what is wrong...
Your device template doesn't have any media type, that's why is displayed in red.
You can check this by running in a mysql console this:
Code: [Select]
select PK_DeviceTemplate_MediaType,FK_MediaType from DeviceTemplate_MediaType WHERE FK_DeviceTemplate=[device template ID];
Web admin doesn't allow changing that for a device template after it is created, so you have to do it in a mysql console:
Code: [Select]
select PK_MediaType,Description from MediaType;This will display all media types available.

Then run this (you can do it multiple times, for different media types):
Code: [Select]
insert into DeviceTemplate_MediaType (FK_DeviceTemplate,FK_MediaType) values ([device template PK],[media type PK]);
Then you should be able to use your device in media scenarios.
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: bulek on November 15, 2007, 04:04:14 pm
But I have a problem :

- when I try to add MEdia scnearios for it, it's painted in red and beside text appears :
Quote
Devices in red do not have any media types set on the A/V Properties page or they are not assigned to this entertain area.
and I cannot add any media scenario for that device. It has assigned room and EA, so I really have no clue what is wrong...
Your device template doesn't have any media type, that's why is displayed in red.
You can check this by running in a mysql console this:
Code: [Select]
select PK_DeviceTemplate_MediaType,FK_MediaType from DeviceTemplate_MediaType WHERE FK_DeviceTemplate=[device template ID];
Web admin doesn't allow changing that for a device template after it is created, so you have to do it in a mysql console:
Code: [Select]
select PK_MediaType,Description from MediaType;This will display all media types available.

Then run this (you can do it multiple times, for different media types):
Code: [Select]
insert into DeviceTemplate_MediaType (FK_DeviceTemplate,FK_MediaType) values ([device template PK],[media type PK]);
Then you should be able to use your device in media scenarios.


Thanks for help, will try that when I get home... But I still wonder what should I do to create proper template for such device - or is manual sql correction currently needed in any case ?

Which MediaType is proper to be used in this case of Audio Receiver, that also has two audio zones of output...

Thanks in advace,

regards,

Bulek.
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: Zaerc on November 16, 2007, 12:55:35 pm
...
Which MediaType is proper to be used in this case of Audio Receiver, that also has two audio zones of output...
...

Code: [Select]
# mysql pluto_main -e "select PK_MediaType,Description from MediaType;"
+--------------+---------------------+
| PK_MediaType | Description         |
+--------------+---------------------+
|            1 | LinuxMCE LiveTV     |
|            2 | LinuxMCE CD         |
|            3 | LinuxMCE DVD        |
|            4 | LinuxMCE Audio File |
|            5 | LinuxMCE Video File |
|            6 | LinuxMCE Live Radio |
|            7 | LinuxMCE Pictures   |
|           11 | LiveTV              |
|           12 | DVD                 |
|           13 | OTARadio            |
|           14 | SatelliteRadio      |
|           15 | CableRadio          |
|           16 | VideoTape           |
|           17 | LaserDisc           |
|           18 | Game                |
|           19 | CD                  |
|           20 | Burning             |
|           21 | Playlist            |
|           22 | Edit Playlist       |
|           23 | Blank Media         |
|           24 | Doc Viewer          |
|           25 | Cassette            |
|           26 | Picture             |
+--------------+---------------------+

I think 4 would be the one you're looking for, maybe 13,14,15 and even 25 as well.  But I'm not certain.
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: rwilson131 on November 17, 2007, 06:11:38 pm
bulek,

I have been working on getting my LG LCD TV plug and play and I have been building a template. First off Thank you for your wiki page, as it did help getting things started.  I have also ran into this issue of no media typed defined.  And from what I can tell, this is set in the Audio/Visual Properties on the Main Device Template and it can actually be changed after the creation of a template without manual SQL command. 

from the edit Device Template page click the edit Audio/Visual Properties button, which will bring up a new window where you can make changes to ruby/ir codes, but at the top you can also make changes to the inputs for the template.  click change/explain.  This will bring up a long list of possible inputs, which I am sure you are familiar with. 

Now here you can tell the template which input is associated with which media type or associate the input with an external device, which I would assume would then assign the media type.  The notes on the bottom of the page state:
Quote
REMEMBER: If the device has a built-in source of media on that input, be sure you choose it from the 'source' list. For example, if you have a receiver, normally the 'am' and 'fm' inputs have a built in source (over the air radio), but the 'cd' input is for an external device. If you have a TV, normally the 'tuner' input is a built-in source (live tv) and video 1, 2, etc. are external. For VCR's there are normally only 2 inputs, tuner and VHS, and both have built-in sources (Live tv and videotape). You may have a combo unit that has lots of built-in sources, like a built-in radio, vcr, dvd. In that case be sure to indicate which inputs have built-in sources vs. external. You don't need to specify the connector type if you don't know it; it's only used when displaying a visual diagram of your equipment's connections.

Here is where I am a little confused, and I will likely start a new thread for this one, but I will ask here as it may also apply more globally.  As I build the new template, I assign the proper media type to the inputs with built in tuners, and I leave the selection as external device when I anticipate hooking up a device, but this does not seem to work, ie no media type is defined.  I had to define my input AV1 as LiveTV even though it is connected to my Motorola DCT2000 Box, which I also created a template for and assigned it the media type of CableRadio. 

Do you know if this is a bug or if I am just getting things confused, which is entirely possible.

Thanks,
Rob

I am working on documenting my experience of building the LG template and making the TV plug and play. I will put it on the wiki as soon as I confirm it actually works as expected.
Title: Re: Complete rewrite of template for Marantz Audio receivers
Post by: bulek on November 18, 2007, 03:10:17 pm
bulek,

...

Here is where I am a little confused, and I will likely start a new thread for this one, but I will ask here as it may also apply more globally.  As I build the new template, I assign the proper media type to the inputs with built in tuners, and I leave the selection as external device when I anticipate hooking up a device, but this does not seem to work, ie no media type is defined.  I had to define my input AV1 as LiveTV even though it is connected to my Motorola DCT2000 Box, which I also created a template for and assigned it the media type of CableRadio. 

Do you know if this is a bug or if I am just getting things confused, which is entirely possible.

...

Hi, good idea, thanks.

I've done same thing and run into same problems. I've selected FM and AM tuner as internal device and now I got two child tuner devices - which is right. But the parent device (audio receiver) is still painted red for adding media scenarios. I could easily add all media scenarios to those child devices, but logically, this is not the right way, although tehcnically it would work, cause commands will end at parent device anyway.

But I guess this is a problem, cause some basic media devices types are still missing. In my case Audio reciever functionality has no embedded media device at all - you can onlyl get those devices if you "connect" your inputs to some proper media device (Live TV or Radio tuner), but that is IMHO not the right way. Parent device (like Audio receiver or LCD TV) should be of proper media type per se, it's weird that you send all media scenarios to its child tuner device, which is not meant to do that... Either do we need more embedded media devices or we need some simplification and make device with rs232 interface media device by default or by its category....

Does anyone have any more insight into this ? Any other opinion ?

I think we should discuss this in more depth and come up with good and consistent solution. Maybe the best examples can be those two devices, we're working on...

Regards,

Bulek.