Soundgraph iMon LCD - display icons
#31
hi again,


comunicate this script wit the event server or with the web server?

do i have to change the port number in the webserver or in the scriptHuh??

$sock = new IO::Socket::INET (PeerAddr => 'localhost', PeerPort => '13666', Proto => 'tcp', );
Reply
#32
jaap Wrote:Fantastic! Works for me. I had to remove the password I set on XBMC, but after that, it works like a charm. Nice to see the icons.

hi,

did you had to remove the system password of the xbmc user or the webinterface passwordHuh?
Reply
#33
The webserver password
Reply
#34
hi,

i´ve now running the script....very nice these icons....



but if i want to shut down over the xbmc menu, the pc didnt shut down, only xbmc starts again. i think this is, because the script isnt stopped.


how can i add this script to startup and how can i stop it when the machine reboots or shut downHuh

if i add this"imon.pl" to my autostart entries, it didnt start...... so i think i need a special startup/stop script for this....



please help


thanks...
Reply
#35
hi,


i´ve now build a startup script and this i want to test now.


Please correct if you see a mistake in the script


#!/bin/bash
### BEGIN INIT INFO
# Provides: Imon Icons
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Start, Stop or Restart IMon Icons
### END INIT INFO

# Shell functions sourced from /etc/rc.status:
# set -e
# Reset status of this service
# rc_reset

#
case "$1" in
start)
echo -n "Starting Imon Icons "
/root/imon.pl


;;
stop)
echo -n "Shutting down Imon Icons "
/usr/bin/killall imon

;;
restart)
echo -n "Restart Imon Icons "
$0 stop
sleep 20
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
# rc_exit
exit 0



mfg

muggi
Reply
#36
Now i´ve a my start/stop script working


#!/bin/bash
### BEGIN INIT INFO
# Provides: Imon Icons
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Start, Stop or Restart IMon Icons
### END INIT INFO

# Shell functions sourced from /etc/rc.status:
# set -e
# Reset status of this service
# rc_reset

#
case "$1" in
start)
echo -n "Starting Imon Icons "
/root/imon.pl


;;
stop)
echo -n "Shutting down Imon Icons "
/usr/bin/killall imon

;;
restart)
echo -n "Restart Imon Icons "
$0 stop
sleep 20
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
# rc_exit
exit 0





i copy this imon starts/stop script to init.d

and

sudo update rc.d imon defaults 65 65





it works perfect...


greets muggi
Reply
#37
I've got a cut down version of Phantasm4489's script that watches tvheadend's simple web interface and turns on the REC symbol when any recording is going on.

Code:
!/usr/bin/perl
use HTTP::Request::Common;
use LWP::UserAgent;
use IO::Socket;

my $sockres;
my $sock;

#see here for details of imon lcd driver output control bits
#http://lcdproc.cvs.sourceforge.net/viewvc/lcdproc/lcdproc/server/drivers/imonlcd.c?view=markup

#based on script by Phantasm4489

$sock = new IO::Socket::INET (PeerAddr => 'localhost', PeerPort => '13666', Proto => 'tcp', );
die "Could not create socket: $!\n" unless $sock;
print $sock "hello\n";
$sockres = readline $sock;

do
{
  my $output = "";
  my $icondata = 0;

  my $ua = LWP::UserAgent->new;
  my $res = $ua->request(GET 'http://localhost:9981/simple.html');

  if ($res->is_success)
  {
    $output = $res->content;
  }

  my @lines = split(/\n/, $output);

  foreach my $val (@lines)
  {
     if ($val =~ /\(Recording\)/)  {$icondata = $icondata | (1<<25); }
  }

  printf $sock "output %i\n",$icondata;
  $sockres = readline $sock;
  sleep 5;

} while 1;

close $sock;

It needs merging with the other script if you want to both sets of icons (they will interfere with each other if you try and run both). Version 2.6 of tvheadend has a much more complete xml interface and I'm waiting til then before I do much more.

But it stops me rebooting my htpc and interrupting a recording.
Reply
#38
muggi Wrote:hi,

i´ve now running the script....very nice these icons....



but if i want to shut down over the xbmc menu, the pc didnt shut down, only xbmc starts again. i think this is, because the script isnt stopped.


how can i add this script to startup and how can i stop it when the machine reboots or shut downHuh

if i add this"imon.pl" to my autostart entries, it didnt start...... so i think i need a special startup/stop script for this....



please help


thanks...

hi muggi, how did you resolve your issue? i have the same error when strating the script:
Code:
Can't locate HTTP/Request/Common.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /home/xbmc/.xbmc/imon.perl line 2.
BEGIN failed--compilation aborted at /home/xbmc/.xbmc/imon.perl line 2.
xbmc@XBMCLive:~$
Reply
#39
hi,


you need to install this...(it was a horror trip to find out this)


sudo apt-get install libwww-perl


greetz muggi
_______________________________________________
CASE: Silverstone with Imon LCD/ Harmony ONE
BOARD: Zotac IONITX 330 D-E / 6 Terrabytes
NAS: Synology Diskstation 8TB RAID5
Software: XBMC Live Skin: Modded Confluence AppleTV2: XBMC....rocks
KARATELIGHT
Reply
#40
Big Grin 
muggi Wrote:hi,


you need to install this...(it was a horror trip to find out this)


sudo apt-get install libwww-perl


greetz muggi

Thnx for the quick reply!
works like a charm...merry xmas Wink
Reply
#41
muggi Wrote:Now i´ve a my start/stop script working


#!/bin/bash
### BEGIN INIT INFO
# Provides: Imon Icons
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Start, Stop or Restart IMon Icons
### END INIT INFO

# Shell functions sourced from /etc/rc.status:
# set -e
# Reset status of this service
# rc_reset

#
case "$1" in
start)
echo -n "Starting Imon Icons "
/root/imon.pl


;;
stop)
echo -n "Shutting down Imon Icons "
/usr/bin/killall imon

;;
restart)
echo -n "Restart Imon Icons "
$0 stop
sleep 20
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
# rc_exit
exit 0





i copy this imon starts/stop script to init.d

and

sudo update rc.d imon defaults 65 65





it works perfect...


greets muggi

thnx for the script, works too! but not the defaults:
sudo update rc.d /etc/init.d/imon.pl defaults 65 65
-->
sudo: update: command not found
Reply
#42
look here.....http://forum.xbmc.org/showpost.php?p=450178&postcount=4
_______________________________________________
CASE: Silverstone with Imon LCD/ Harmony ONE
BOARD: Zotac IONITX 330 D-E / 6 Terrabytes
NAS: Synology Diskstation 8TB RAID5
Software: XBMC Live Skin: Modded Confluence AppleTV2: XBMC....rocks
KARATELIGHT
Reply
#43
muggi Wrote:look here.....http://forum.xbmc.org/showpost.php?p=450178&postcount=4

thnx!
Reply
#44
Great stuff!

Can anyone tell me how to stop LCDproc from interfering and displaying the LCDproc status every few seconds?

That's really annoying, as I just want to see the information XBMC sends to the display.

Thanks.
Reply
#45
legan Wrote:Great stuff!

Can anyone tell me how to stop LCDproc from interfering and displaying the LCDproc status every few seconds?

That's really annoying, as I just want to see the information XBMC sends to the display.

Thanks.

it can be disabled in LCDd.conf

Quote: ServerScreen = { yes | no | blank }

Control the bahaviour of the server screen, that usually shows the number of active clients and screens. When set to its default value yes, the server screen is included into the screen rotation scheme when other screens exist. Whet set to no, the server screen only shows up when no other screen exists. The special value blank is similar to no, but instead of displaying the current number of clients and screens, only a blank screen is displayed.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply

Logout Mark Read Team Forum Stats Members Help
Soundgraph iMon LCD - display icons0