RobbH wrote:
> Is this still necessary?
>
> https://forums.slimdevices.com/showthread.php?111938-Squeezebox-Radio-would-not-connect-to-LMS-8-quot-Update-required-quot&p=989043&viewfull=1#post989043
Don't really know. As far as I read the Radio must be connected to some
Squeezebox server entity to allow it to install the patch that will make
it regard LMS 8 as a higher (and thus acceptable) server to connect to.
But I should probably explain my planned method. The idea is that by
enabling SSH access, which is a pretty simple action to be performed on
the player, I can push all the settings either by using a convenient
computer console or by scripted socket actions. Think (final) wifi
network, LMS host and of course the version patch.
Coding example: I currently use this to access the ambilight sensor
values on Radio and Touch:
Code:
--------------------
#!/usr/bin/perl -ICPAN
use warnings;
use strict;
use Net::OpenSSH;
my @hosts=qw(assurancetourix *maestria);
my $rundir=qw(/tmp/sqambient);
my $user = 'root';
my $pass = '1234';
my $host;
my $fstat;
my $ssh;
my $flux;
if ( -e $rundir )
{
mkdir $rundir, 0700;
}
foreach $host (@hosts) {
if ( $host =~ /^\*/ )
{
$fstat = '/sys/class/i2c-adapter/i2c-1/1-0010/ambient';
$host =~ s/^.//;
}
else
{
$fstat = '/sys/class/i2c-adapter/i2c-0/0-0039/lux';
}
$ssh = Net::OpenSSH->new("$user:$pass\@$host",
master_opts => [
-o => "StrictHostKeyChecking=no",
-o => "UserKnownHostsFile=$rundir/.known_hosts",
-o => "KexAlgorithms=+diffie-hellman-group1-sha1",
-c => "3des-cbc"
],
timeout => 2,
batch_mode => 1,
strict_mode => 0,
ctl_dir => "$rundir"
);
$ssh->error and die "Unable to connect: " . $ssh->error . "\n";
$flux = $ssh->pipe_out("cat $fstat 2>&1") or die "Command failed:" .
$ssh->error . "\n";
while (<$flux>)
{
my $lux = $_;
$lux =~ s/[\r\n]//g;
print "$host: $lux\n";
}
close $flux;
undef $ssh;
}
--------------------
Still a bit rough, as I need to mark which one is Radio in this script,
which I can also programmatically determine, so that will be the next
change.
------------------------------------------------------------------------
gordonb3's Profile: http://forums.slimdevices.com/member.php?userid=71050
View this thread: http://forums.slimdevices.com/showthread.php?t=113410
_______________________________________________
Squeezecenter mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/squeezecenter