PDA

View Full Version : LCDs & VFDs



John Brett
2004-07-01, 12:29 PM
I have a Samsung VFD, and I'd like GBPVR to drive it (e.g. display current channel, current program, current track, current picture &c, recording y/n, time/date &c.).
I'm currently using Smartie, but that's a pain for anything more complex than a clock, doesn't directly integrate with GBPVR, and when my PC wakes from standby, it trashes the VFD display :-(

I've downloaded some code from www.codeproject.com which has the necessary to drive the VFD, and I've oo'd it and built some interfaces & helper classes, but the issue then is GBPVR integration.

'sub' - would you be willing to provide support for these displays?
As I see it, the primary requirement on GBPVR would be to
a) load the device-specific driver .dll (I have an HD44780 version from the codeproject source)
b) provide text relating to the current activity (e.g. current channel).
Configuration can come later, if people want it.

Anyone else - would you be interested in this?

nkh
2004-07-01, 06:24 PM
That sounds like a great idea! Right now I'm using jaLCDs (http://www.jalcds.de/) to display things like time, cpu usage, temperatures and how much space there's left on my pvr drive (very handy information). It supports plugins, so maybe that's an easier solution?

sub
2004-07-01, 06:40 PM
I also think its a good idea. I could probably add some new sort of event plugin which would allow you to implement plugin DLLs for driving these types of displays. The key method would be something like:

public void Notify(EventTypes eventType, string eventText)

So when I start playing a song I'd call something like plugin.Notify(EventTypes.MusicNowPlaying, "blah blah blah"). That way you guys can write support for the specific types of screens.

I could send notifications of channel, video name, music name etc.

sub
2004-07-01, 06:53 PM
Ok, expanding on that. For the next release, if you implement a .net DLL that contains a class that implements the following interface and drop it in the plugins directory, it will be notified of GB-PVR events.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">using System;

namespace GBPVR.Public
{
public enum EventTypes
{
CurrentAudioTrack,
CurrentVideoTrack,
CurrentTrackDuration,
CurrentChannelNumber,
CurrentChannelName,
};

/// &#60;summary&#62;
/// This interface is implement by GB-PVR plugins which need to be
/// notified about current audio/video track playing etc
/// &#60;/summary&#62;
public interface IEventNotification
{
void Notify&#40;EventTypes eventType, string eventText&#41;;
}
}
[/QUOTE]

More than one of these can be called in quick succession, so your plugin will need to keep track of the various events it is interested in. For example, when I start playing an audio track, I&#39;m likely to notify you plugin twice for CurrentAudioTrack followed by CurrentTrackDuration

Let me know if you want specific event types that arn&#39;t listed here.

sub
2004-07-01, 07:08 PM
You&#39;ll just have to use your imagination to picture the original tabing in the code sample above.

John Brett
2004-07-02, 08:01 PM
I have some framework code for this, but I&#39;m away on holiday for the next week. If no-one else beats me to it, I&#39;ll put a plugin together for the HD44780 when I get back.

janviet
2004-10-05, 09:39 PM
John,

Have you made any progress on the plugin for the HD44780 yet? If not, would you be willing to share the code you have so far?

I tried jaLCDs, but it&#39;s been a frustrating experience...

Regards,

Jan

janviet
2004-10-12, 08:46 AM
Sub,

Since there appear to be no takers, and I have a VFD idling in my HTPC case, I decided to make a very simple LCD plugin. To not restrict it to my particular VFD, I have chosen an existing &#39;LCD driver&#39; to base this plugin on. Despite my reservations about jaLCDs, it&#39;s the only thing out there that somewhat meets my requirements.

Anyway, I have something very simple going now (my first venture into the world of C#...), but I quickly noticed that I would like more events:

- can you add an event to indicate playback has stopped?
- can you add the full path of the audio track, so I can extract ID3 info (if you already have this info, you could also pass that in stead of just the track name)?
- you list the track duration, but have not actually included it in EventTypes

I&#39;m afraid I have very little time to spend on this, but as soon as I have something worth sharing, I&#39;ll let you know.

Regards,

Jan

reven
2004-10-23, 05:41 AM
whats the status of VFD/LCD in GBPVR (i just got one), does gbpvr show info on them yet?
if not, sub i know your busy, but could you put this near the top of your massive todo list. nice to show (&quot;Recording [tvshowname]&quot;) or something

sub
2004-10-23, 05:58 AM
Everything I needed to do is in place, now its up to someone with a VFD/LCD to write a plugin using the IEventNotification interface described above. I dont own one, so cant write this plugin myself.

janviet
2004-10-25, 08:45 PM
Hi All,

I have a simple LCD plugin going for GB-PVR, but... I don&#39;t want to release it like this. The problem is that I based it on jaLCDs. I had my reservations about using jaLCDs and I&#39;m afraid I was right... It has improved, but it still has problems going into and coming out of standby and we can&#39;t have that. So, jaLCDs is out (for now).

I do like the variable concept of jaLCDs: with it my LCD pluging can simply set variables like artist, title, duration and a jaLCDs configuration defines the visualization of these variables. I have only a 16 x 2 VFD, but others may have e.g. a 40 x 4 display. Using variables, each display can be used to the fullest by creating specific configurations. How am I going to support a whole range of displays without (re)creating something like jaLCDs?

If anyone knows of an alternative to jaLCDs or has other suggestions, please let me know. In the mean time, I&#39;ll be on the lookout for a solution or I may release a plugin that&#39;s more or less hard coded for my display and would require some C# coding to adapt it to another one.

I suddenly realize there may be a way around jaLCDs&#39; standby problems... if I disconnect after every command sequence... hmm... I&#39;ll keep you all posted...

Regards,

Jan

Huw
2004-10-25, 09:07 PM
I think this is similar to JaLCD LCD Smartie (http://backupteam.gamepoint.net/smartie/)

nkh
2004-10-25, 10:36 PM
janviet, I&#39;m using jaLCDs and I&#39;d very much like to try your plugin http://gbpvr.com/iB_html/non-cgi/emoticons/tounge.gif I have a 20x4 LCD display.

reven
2004-10-25, 11:07 PM
i found the reverse, jaLCD goes in and comes out of standby no problems, but smartie once from standby wont start up again, and causes lots of problems. i too have a 16x2 display

i say stick with jaLCD, and i cant wait for you to release this plugin

janviet
2004-10-26, 08:00 PM
Hi All,

I thought disconnecting from jaLCDs after every sequence of writes would solve my problem, but it doesn&#39;t... Everytime my system goes into standby, jaLCDs crashes *http://gbpvr.com/iB_html/non-cgi/emoticons/mad.gif

However, I don&#39;t mind sharing what I have with a few others to let them have a go at it. What would be the best way to do that? For now I suggest that anyone interested sends me a PM with an e-mail address, and I will send the small (54 KByte) zip file including the source.

Regards,

Jan

nkh
2004-10-26, 08:34 PM
sounds great, I hope my PM landed in your inbox (&#39;cos it disapeared from my sent box..) http://gbpvr.com/iB_html/non-cgi/emoticons/smile.gif

arttext
2004-10-28, 07:00 AM
After reading all this (i had plans to buy a display) I concluded that it&#39;s best to wait (buying one) until something really usefull has emerged, is that right?

cheers, arttext

reven
2004-10-28, 09:01 AM
i still think they are useful without the gbpvr support, no need for the diskspace plugin, it can be displayed on lcd via a bar graph. its also useful to show the systems time, so you know when a show will start etc.

oh and they&#39;re pretty http://gbpvr.com/iB_html/non-cgi/emoticons/biggrin.gif

arttext
2004-10-28, 10:59 AM
Quote[/b] (reven @ Oct. 28 2004,11:01)]oh and they&#39;re pretty http://gbpvr.com/iB_html/non-cgi/emoticons/biggrin.gif
That&#39;s why&#33;

What would you recommend?

cheers, arttext

reven
2004-10-28, 02:53 PM
i say get one, they&#39;re arent that expensive, jalcd seems to work fine on my one, smartie is good too but it didnt like system standby on my machine. makes my case look cool, ht-400.

and eventually a decent plugin would be made to show gbpvr info on them, if none are going ill look into them after i finish my uni exams (of course have week of doing nothing, then ill starting playing around with C# again, god im such a geek).

ive got a 2x16 screen, so does janviet, so the first plugin most likely to be working will probably be best suited for a 2x16 screen, but with a 4x20 you can do more things, like a full screen clock (whoohoo&#33;). 2x16 should be large enough for most informatin anyway, channel number start-stop on top line, show title on bottom (possible scrolling).

there are some cool plugins for jalcd out there, winamp, trillian (see msgs on ur lcd, sure hard to read but cool http://gbpvr.com/iB_html/non-cgi/emoticons/smile.gif).

janviet
2004-10-28, 06:07 PM
Hi All,

Actually, the nice thing about using jaLCDs is that my plugin does not need to be display specific. All my plugin does is set some variables. A jaLCDs configuration takes care of the visualization. I use a jaLCDs configuration for a 16 x 2 display, but any display supported by jaLCDs can be addressed completely by creating the proper jaLCDs configuration.

On my system jaLCDs still crashes when it goes into standby, but if this plugin works for others I don&#39;t mind sharing it...

Regards,

Jan

arttext
2004-10-28, 06:35 PM
With a search I noticed that jaLCD is software. Can I buy any 2x16 display or does it need special specs? Or a special brand?
Forgive me for my ignorance, i don&#39;t know dick about this.

cheers, arttext

tybreizh29
2004-10-28, 07:32 PM
Hi,
Is the IEventNotification working with your last version 227?
Thanks
Bzh

I tried this way and it&#39;s not working :
namespace ComicPlugin
{
public enum EventTypes
{
CurrentAudioTrack,
CurrentVideoTrack,
CurrentTrackDuration,
CurrentChannelNumber,
CurrentChannelName,
};
public interface IEventNotification
{
void Notify(EventTypes eventType, string eventText);
}
...
public void Notify(EventTypes eventType, string eventText)
{
System.Diagnostics.Debug.WriteLine(&quot;Event&quot;);
System.Diagnostics.Debug.WriteLine(eventText);
}

reven
2004-10-28, 08:39 PM
oh so janviet does *your plugin use this like &#036;channelnumber&#036;, &#036;isrecording&#036; (not sure how you do this one) and stuff in jalcd itself?

also could you add a channel number, start/stop time, and show title as variables. those are probably the most important ones, well the ones i feel should be implemented first.

cheers

reven
2004-10-29, 04:22 AM
arttext you dont need any special lcd screen, to my knowledge anyway, they are pretty generic well i know the parallel port ones are, there are some tutorials out there that show you how you can make a lcd yourself using a lcd screen from your local tech store (dicksmith kinda deal). *usb ones im not sure how compatible they are, dont have one myself, i think i read somewhere they arent as generic, but you can plug them directly into your mb and dont need cable coming out the back of ur computer to plug into the parallel port (if you&#39;re lucky enough to have an extra onboard parallel port err socket you could plug it into that so dont have to have it going out the back). *new computers tend to just have one on the back panel.

just make sure you get a nice color one, mines blue its pretty http://gbpvr.com/iB_html/non-cgi/emoticons/smile.gif green is so 80s :P red wud be cool, aslong as it matched ur case of course.
-----------------------------------------------------------
oh and janviet trying your plugin now, seems to be working very well&#33; love it infact, just the length and current position are always 0:06 and 0:00 but artist + song title is working perfect. also doesnt your plugin add a menu item to the jalcd program? if not can you give me a list of the variable i can use?

cheers,
reven

janviet
2004-10-29, 07:55 AM
Hi All,


Quote[/b] ]reven: the length and current position are always 0:06 and 0:00
That&#39;s odd... duration and position work for me. Which version of GB-PVR are your running? Have you tried with different files? Do you use the jukebox plugin to play the file?


Quote[/b] ]reven: can you give me a list of the variable i can use?
They should be in the included readme.txt, but here they are (without jaLCDs&#39; delimiters): <ul> title artist album year comments tracknum genre duration position[/list]It is very easy to add variables. The only hard part may be the code required to set them to a proper value...


Quote[/b] ]tybreizh29: Is the IEventNotification working
It works for me. If you send me a PM, I&#39;ll send you my LCD plugin so you can have a look at my code.

Regards,

Jan

reven
2004-10-29, 08:15 AM
hey jan i was using the Music Library and the new Music plugin (i forget its name). *both had the same result with the 0:00 0:06 on every file i tried.

im running latest version of gbpvr 227, and your example config file.

i tried it again, after a reboot and still displayes 0:06 and 0:00. using the lame codec aswell. its wierd how length is 0 but pos is 6 seconds.

reven
2004-10-29, 12:47 PM
i get a null exception error when i exit the music albums, which only happens when im running the jalcd program, this is the code im using in jalcd
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">&#036;artist§ &#036;fixend&#58;&#036;position§§
&#036;fix&#58;&#036;tracknum§.§&#036;showif&#58;&#036;len&#58;&#036;artist§§&#58;&#62;&#62;&#58;0&#58;§&#036;tit le§[/QUOTE]

i think its to do with null values for tracknum etc.

janviet
2004-10-29, 01:45 PM
Hi,

Do you mean that jaLCDs is throwing the exception? I have noticed that jaLCDs has a hard time dealing with incorrect configurations. That combined with the (let&#39;s be friendly here *http://gbpvr.com/iB_html/non-cgi/emoticons/biggrin.gif) unorthodox syntax has frustrated me a few times already...

The one thing I notice in your configuration fragment is that you have a showif construct without any text to show (in my sample I use this construct to show a &#39;-&#39; between artist and title only if artist is not empty). Could this be the cause of your troubles?

Regards,

Jan

reven
2004-10-29, 02:08 PM
yeah i fixed the null bug by using an if tracknum length &gt; 0. only problem now is trying to get the tracknumber fixed on left, and song title scrolling after it, but the tracknumber overlaps the song title if the song title is less than 16 (well does if its over but scroll makes it seem like it doesnt) anyone know to fix this in jalcd?

boy these little pieces of code can be a nightmare to keep track off, all the ifs etc on one line. might be a good idea to add a lot of these lines of code to an attached readme file; once the plugin is finished of course. im trying to get it to look the best on a 16x2 screen, this is my setup (well the setup im trying to get)
[ARTIST] [FIXEND SONG TIME POSITION (Not length)]
[TRACKNUMBER. (with a period, but no space)][SONG TITLE, starting after the dot, so maybe a space 1, 2(if track under 10, or 3 for &gt; 10, ie 1.blah, 10.blah). and try do an if statement, if the tracknumber + title length is greater than 16 add an &quot; - &quot; to the end.

so far i got the top line done, the tracknumber with dot, giving up the rest for now, sleep sounds good.

janviet
2004-11-03, 08:03 AM
Hi All,

I have solved my problems with jaLCDs (it no longer craches when my HTPC is going into standby). Don&#39;t ask me what the problem was... it&#39;s just too stupid for words... well OK, if you really want to know: I was running the latest version of jaLCDs on my development system, but an old version on my HTPC... *http://gbpvr.com/iB_html/non-cgi/emoticons/tounge.gif

Anyway, with this out of the way, I would like to continue developing my LCD plugin. I&#39;ve sent it to a few of you and have received some feedback, but I would like to know if you have found any serious problems or have any feature requests.

reven, do you still have problems with duration and position?

sub, I noticed last night that when I exit the jukebox plugin, the music continues to play but the audio playlist (which I use to retreive the current position) is empty. Is this a bug?

Regards,

Jan

Huw
2004-11-03, 08:11 AM
Quote[/b] ]sub, I noticed last night that when I exit the jukebox plugin, the music continues to play but the audio playlist (which I use to retreive the current position) is empty. Is this a bug?

I think this is to do with the way the Jukebox works, if you don&#39;t have a playlist it creates it on the fly, so there isn&#39;t an actual physical playlist, but I could be wrong http://gbpvr.com/iB_html/non-cgi/emoticons/smile.gif

reven
2004-11-03, 10:49 AM
yeah im still having the problems with duration and position 0:06 pos and duration=0:00. dont know why.

could you add a try/catch around your code aswell, getting some null exceptions

arttext
2004-11-04, 02:15 PM
Quote[/b] (janviet @ Nov. 03 2004,10:03)]Hi All,

I have solved my problems with jaLCDs (it no longer craches when my HTPC is going into standby). Don&#39;t ask me what the problem was... it&#39;s just too stupid for words... well OK, if you really want to know: I was running the latest version of jaLCDs on my development system, but an old version on my HTPC... http://gbpvr.com/iB_html/non-cgi/emoticons/tounge.gif

Anyway, with this out of the way, I would like to continue developing my LCD plugin. I&#39;ve sent it to a few of you and have received some feedback, but I would like to know if you have found any serious problems or have any feature requests.

reven, do you still have problems with duration and position?

sub, I noticed last night that when I exit the jukebox plugin, the music continues to play but the audio playlist (which I use to retreive the current position) is empty. Is this a bug?

Regards,

Jan
I am still waiting for a friend of mine who cab buy these things for a wholesale price, when it&#39;s installed I will also install the (then current) plugin.

cheers, arttext

janviet
2004-11-17, 10:12 PM
Hi All,

Wow... has it been that long already&#33; Anyway, I finally got arround to spending some time on my LCD plugin again. I made a few changes and added some stuff, and just sent it off to sub.

This plugin requires jaLCDs, which makes it compatible with all displays supported by jaLCDs (or one of its output plugins). Check www.jalcds.de for more information.

By the way, reven, I can&#39;t figure out why you are still having problems with the position. Nor, do I understand the exceptions you&#39;re getting. Are you certain it&#39;s the LCD plugin causing the problems, and not jaLCDs?

Regards,

Jan

reven
2004-11-18, 02:00 AM
yeah im pretty sue its not jaLCD since everything else is fine. might be a the mp3 decoder im using or something (think it should be using lame). there is null exceptions (i think if fields are missing in the id3 tags (which i assume have null values) these are causing a null exception so a simple try catch would hopefully solve some of my problems (not to worried about the time for mp3s, not a biggy)).
major things i want is to show file/show name, channel number, the video position and length, err and yeah gbpvr status, like recording. fm/net info would be nice too, current picture etc. just the channel stuff is more important, well i think so anyway.

janviet
2004-11-18, 07:14 AM
I assume sub will put the plugin up in the next couple of days, so please give the new one a try. I think the plugin has been catching most exceptions all along, so I still don&#39;t understand what you&#39;re experiencing. Then again, I could have missed something... Anyway, I appreciate the feedback.

By the way, if you try the new version, note that I have changed the variable names, so you will have to modify your jaLCDs configuration accordingly (check the readme for details).

I&#39;ll see if I can get at the video duration and position. Currently I only report the video file name to jaLCDs. My focus has always been on audio; when I&#39;m watching video I prefer the VFD to be off...

Regards,

Jan

sub
2004-11-18, 03:06 PM
Has any one got an appropriate LCD picture for me for the plugins page? If so email it me at support@devnz.com