NextPVR Forums

Full Version: gbpvrcli and lcd smartie few questions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ive been trying to use my imon display for viewing gbpvr info. so ive tried reading news feeds from ewa using lcd smartie and now reading the registry written by pbs's batch file with lcd smartie.
now im reading the documentation to use gbpvrcli with lcd smartie.
I would like to to see maybe 3 or 4 soonest recordings and the time they start, and what ever is currently recording and the time the recordings end.

got it thanks
it installs a help file in start menu...should have all the needed info..
i liked that prog but i went with sqlite3.exe as it was much faster starting up..
[plus gbpvrcli would spike cpu heavy when run]

i used to have the batch look up the info of shows with sqlite for descriptions and everything...but since can't find out when just playing a file, i figured i'd wait for someone else to write a play event export plugin...
pbs, the way you do it now with sqlite3.exe would i benefit from it or does it basicall use less cpu ?
i got it pretty much the way i want now except that when the recordingnow.bat file is empty/nothings recording the lcd is empty for 20 seconds, im now using /messageifnodata to put an alternate message but id like to just skip it if the files empty. i just put a post on the lcdsmartie forums asking if theres some way to skip or something.
I have a stable setup that does pretty much what you ask. Afraid I've no time at moment to fully document it all but here is some info.
I use LCDSmartie 5.3.2 along with the extra ImonSmartie DLL (emulates a Matrix Orbital device) rather than 5.4 as the older version allows my to display a text file (showing next recording, USBPORTEXIT file below) when the PC is in standby. You can use 5.4 fine with the native iMON support but the display goes blank (or default text) when the PC is off/standby.
I've included the relevant extracts from my batch files & LCDSmartie config.ini. It will display the next 2 recordings (name/day/time, easily modified for 3 if required) and the in-progress ones (with end time) only when they are recording (over 2 tuners). Hope it makes some sense and if it is does help that it is enough to get you started.

[SIZE="1"]WAKE.CMD (used with GBPVRWAKE utility)
C:\Progra~1\devnz\gbpvr\gbpvrcli /p 3 /m "{Title}\n{StartDate} {StartTime:t}" > C:\Progra~1\devnz\gbpvr\pending.txt
copy /Y C:\Progra~1\devnz\gbpvr\pending.txt C:\UTILS\LCDsmartie\USBPortExit.txt
C:\Progra~1\devnz\gbpvr\gbpvrcli /i 2 /m "{Title}\n{SubTitle}\n{EndTime}\n{EndTime:HH}:{EndTime:mm}\n" > C:\Progra~1\devnz\gbpvr\inprogress.txt

POSTPROCESSING.bat
gbpvrcli /i 2 /m "{Title}\n{SubTitle}\n{EndTime}\n{EndTime:HH}:{EndTime:mm}\n" >inprogress.txt
gbpvrcli /p 3 /m "{Title}\n{StartDate} {StartTime:t}" >pending.txt
copy /Y pending.txt C:\UTILS\LCDsmartie\USBPortExit.txt

PARALLELPROCESSING.bat
gbpvrcli /p 2 /m "{Title}\n{StartDate} {StartTime:t}" >pending.txt
gbpvrcli /i 2 /m "{Title}\n{SubTitle}\n{EndTime}\n{EndTime:HH}:{EndTime:mm}\n" >inprogress.txt
copy /Y pending.txt C:\UTILS\LCDsmartie\USBPortExit.txt

LCDSMARTIE CONFIG.ini
[Screen 11]
Enabled=0
Theme=1
ShowTime=3
Sticky=0
Skip=0
InteractionTime=20
Interaction=0
Text01=" $File("C:\Program Files\devnz\gbpvr\inprogress.txt",1)-$File("C:\Program Files\devnz\gbpvr\inprogress.txt",2)"
Text02="Ends: $File("C:\Program Files\devnz\gbpvr\inprogress.txt",4)"
Text03=""
Text04=""
NoScroll01=0
NoScroll02=1
NoScroll03=1
NoScroll04=1
ContinueNextLine01=0
ContinueNextLine02=0
ContinueNextLine03=1
ContinueNextLine04=0
Center01=0
Center02=0
Center03=0
Center04=0

[Screen 12]
Enabled=0
Theme=1
ShowTime=3
Sticky=0
Skip=0
InteractionTime=20
Interaction=0
Text01=" $File("C:\Program Files\devnz\gbpvr\inprogress.txt",6)-$File("C:\Program Files\devnz\gbpvr\inprogress.txt",7)"
Text02="Ends: $File("C:\Program Files\devnz\gbpvr\inprogress.txt",9)"
Text03=""
Text04=""
NoScroll01=0
NoScroll02=1
NoScroll03=1
NoScroll04=1
ContinueNextLine01=0
ContinueNextLine02=1
ContinueNextLine03=1
ContinueNextLine04=0
Center01=0
Center02=0
Center03=0
Center04=0

[Screen 17]
Enabled=1
Theme=1
ShowTime=4
Sticky=0
Skip=0
InteractionTime=1
Interaction=0
Text01="$File(C:\program files\devnz\gbpvr\pending.txt,1)"
Text02="$File(C:\program files\devnz\gbpvr\pending.txt,2)"
Text03=""
Text04=""
NoScroll01=1
NoScroll02=1
NoScroll03=0
NoScroll04=0
ContinueNextLine01=0
ContinueNextLine02=0
ContinueNextLine03=0
ContinueNextLine04=0
Center01=0
Center02=0
Center03=0
Center04=0

[Screen 18]
Enabled=1
Theme=1
ShowTime=2
Sticky=0
Skip=0
InteractionTime=1
Interaction=0
Text01="2.$File(C:\program files\devnz\gbpvr\pending.txt,3)"
Text02="$File(C:\program files\devnz\gbpvr\pending.txt,4)"
Text03=""
Text04=""
NoScroll01=1
NoScroll02=1
NoScroll03=0
NoScroll04=0
ContinueNextLine01=0
ContinueNextLine02=0
ContinueNextLine03=0
ContinueNextLine04=0
Center01=0
Center02=0
Center03=0
Center04=0


Action15Variable=$File("C:\Program Files\devnz\gbpvr\inprogress.txt",1)
Action15Condition=5
Action15ConditionValue=
Action15Action=EnableScreen(11)
Action16Variable=$File("C:\Program Files\devnz\gbpvr\inprogress.txt",1)
Action16Condition=2
Action16ConditionValue=
Action16Action=DisableScreen(11)
Action17Variable=$File("C:\Program Files\devnz\gbpvr\inprogress.txt",6)
Action17Condition=2
Action17ConditionValue=
Action17Action=DisableScreen(12)
Action18Variable=$File("C:\Program Files\devnz\gbpvr\inprogress.txt",6)
Action18Condition=5
Action18ConditionValue=
Action18Action=EnableScreen(12)[/SIZE]
pBS Wrote:[plus gbpvrcli would spike cpu heavy when run]

GBPVRcli has a /priority switch to compensate for this. Setting it to BelowNormal removes the CPU spike.

Brilliantly, I've just noticed that the help file has a bizarre untrue sentence on the end of the page on this. "...certainly not produce the output you are expecting." Huh! A bit too much Lucozade that day, I think.
b00sfuk Wrote:I have a stable setup that does pretty much what you ask. Afraid I've no time at moment to fully document it all but here is some ...........................................................................
Action15Variable=$File("C:\Program Files\devnz\gbpvr\inprogress.txt",1)
Action15Condition=5
Action15ConditionValue=
Action15Action=EnableScreen(11)
Action16Variable=$File("C:\Program Files\devnz\gbpvr\inprogress.txt",1)
Action16Condition=2
Action16ConditionValue=
Action16Action=DisableScreen(11)
Action17Variable=$File("C:\Program Files\devnz\gbpvr\inprogress.txt",6)
Action17Condition=2
Action17ConditionValue=
Action17Action=DisableScreen(12)
Action18Variable=$File("C:\Program Files\devnz\gbpvr\inprogress.txt",6)
Action18Condition=5
Action18ConditionValue=
Action18Action=EnableScreen(12)[/SIZE]

thanks this was what i was missing and needed i didnt know about actions or how they worked lookin good now
b00sfuk - that is so exactly what I wanted. Thanks.

Can I however point out for the benefit of others one tiny bug that I expect you've already spotted? In ParallelProcessing.bat line 2, the last "End Time" should read "EndTime":

gbpvrcli /i 2 /m "{Title}\n{SubTitle}\n{EndTime}\n{EndTime:HH}:{EndTime:mm}\n" >inprogress.txt

Thanks again.
Inspired by b00sfuk's post #4, I've taken the liberty of building another brick to the wall by adding a 'what's new' section to my LCD Smartie which shows the last two recordings made.

To do this I've added the following lines to the following files:
--
Code:
[B]LCD Smartie's config.ini[/B]
[Screen 07]
Enabled=1
Theme=1
ShowTime=2
Sticky=0
Skip=0
InteractionTime=10
Interaction=2
Text01="New stuff..."
Text02=""
Text03=""
Text04=""
NoScroll01=1
NoScroll02=1
NoScroll03=1
NoScroll04=1
ContinueNextLine01=0
ContinueNextLine02=0
ContinueNextLine03=0
ContinueNextLine04=0
Center01=0
Center02=1
Center03=1
Center04=1

[Screen 08]
Enabled=1
Theme=1
ShowTime=5
Sticky=0
Skip=0
InteractionTime=10
Interaction=2
Text01="$File("C:\Program Files\devnz\gbpvr\justrecorded.txt",3) "
Text02="New $File("C:\Program Files\devnz\gbpvr\justrecorded.txt",4)"
Text03=""
Text04=""
NoScroll01=0
NoScroll02=1
NoScroll03=1
NoScroll04=1
ContinueNextLine01=0
ContinueNextLine02=0
ContinueNextLine03=0
ContinueNextLine04=0
Center01=1
Center02=1
Center03=1
Center04=1

[Screen 09]
Enabled=1
Theme=1
ShowTime=5
Sticky=0
Skip=0
InteractionTime=10
Interaction=2
Text01="$File("C:\Program Files\devnz\gbpvr\justrecorded.txt",1) "
Text02="New $File("C:\Program Files\devnz\gbpvr\justrecorded.txt",2)"
Text03=""
Text04=""
NoScroll01=0
NoScroll02=1
NoScroll03=0
NoScroll04=0
ContinueNextLine01=0
ContinueNextLine02=0
ContinueNextLine03=0
ContinueNextLine04=0
Center01=1
Center02=1
Center03=0
Center04=0
--
[B]gbpvr's postprocessing.bat[/B]
gbpvrcli /r /m "{Title}\n{SmartDate}" > justrecorded.txt
lastlines
--
You'll note a 'lastlines' command in the postprocessing.bat above. This is a compiled Autoit script which grabs the last four lines from gbpvrcli's list of recorded shows and outputs them to justrecorded.txt. This is because the list starts with the oldest recording, and grabbing the last four lines (the newest shows) is not simple with a batch file afaik; the lastlines script was easier. It's available in both script and compiled forms here: http://gbpvr.manek.fastmail.fm/startpvrx2/ LCD Smartie then picks the data from this file and displays it.

Hope this helps someone....

NB: Lastlines is a barebones app - no error checking and it only works if the justrecorded.txt file exists and they're both in the gbpvr directory.
liteswap Wrote:You'll note a 'lastlines' command in the postprocessing.bat above. This is a compiled Autoit script which grabs the last four lines from gbpvrcli's list of recorded shows and outputs them to justrecorded.txt. This is because the list starts with the oldest recording, and grabbing the last four lines (the newest shows) is not simple with a batch file afaik; the lastlines script was easier. It's available in both script and compiled forms here: http://gbpvr.manek.fastmail.fm/startpvrx2/ LCD Smartie then picks the data from this file and displays it.

Although a nice idea/work, that can be achieved with LCDSmartie's $LogFile. Ex: $LogFile(C:\etc\justrecorded.txt,0) This reads the LAST line of justrecorded.txt. Since it starts from the end, the total number of lines output is irrelevant, as long as the most recent are output last. The line parameter accepts values from 0 (last line) to 3 (fourth line from the end).
Check http://lcdsmartie.sourceforge.net/commands.html (Misc commands). Look around the other commands also

I know this thread is old, but since it did help kickstart the software side of my homemade LCD display, figured I'd pass along this small correction/sugestion for those who (like me) are trying to set up a way to get info from the htpc without having to interrupt the soap opera (major dent in the WAF :p).

BTW, the $dll function is probably a major gold mine for those who can exploit it. Calls a dll function, accepting up to 2 parameters, and displays the returned value/string.