[dvblast-devel] DVBlast Status PHP page
Ahmed Ramze
ahmedramze at gmail.com
Tue Jul 18 01:37:51 CEST 2017
Hello DVBlast developers
Hello
I just complete php page for tunner signal SNR and signal strength for
running dvblast , need to add -r /tmp/1.sock to dvlast command for example
CODE: dvblast -a 1 -e -Y -W -f 12340000 -s 27500000 -v 18 -m psk_8 -r
/tmp/4.sock -c /root/dvblast_3.conf
the code for page to read from soct that made on /tmp folder or elese
result
[image: Inline image 1]
put code below in status.php or any php file.
also you can add too many tables for tunners just change the socket number
in /tmp/X.sock
<table align="center" border=1>
<tr>
<th>
<h1>< Tunner LNB-0 Status ></h1>
<B>Signal SNR:</B>
<style>
#meter_item
{
width: 100%;
}
#scale {
display: table;
width: 100%;
padding: 0px 0px 0px 0px;
margin: 2px 0px 10px 0px;
border: 0px 0px 0px 0px;
text-align: center;
}
#scale li {
width: 10%;
display: table-cell;
white-space: nowrap;
}?
</style>
<div style="width: 100%">
<meter id="meter_item" min="0" value=<?php $sig =
shell_exec('dvblastctl -r /tmp/1.sock fe_status | grep -i "snr"| cut -d\:
-f2 | sed -e
"s| ||g" '); $sig = intval ($sig / 655,2); echo $sig;?> max="100" ></meter>
<ul id="scale">
<li style="width: 5%"><span></span></li>
<li><span id="scale">10</span></li>
<li><span id="scale">20</span></li>
<li><span id="scale">30</span></li>
<li><span id="scale">40</span></li>
<li><span id="scale">50</span></li>
<li><span id="scale">60</span></li>
<li><span id="scale">70</span></li>
<li><span id="scale">80</span></li>
<li><span id="scale">90</span></li>
<li style="width: 10%"><span id="scale"></span></li>
</ul>
</div>
<B>Signal Strength:</B>
<style>
#meter_item
{
width: 100%;
}
#scale {
display: table;
width: 100%;
padding: 0px 0px 0px 0px;
margin: 2px 0px 10px 0px;
border: 0px 0px 0px 0px;
text-align: center;
}
#scale li {
width: 10%;
display: table-cell;
white-space: nowrap;
}?
</style>
<div style="width: 100%">
<meter id="meter_item" min="0" value=<?php $sig =
shell_exec('dvblastctl -r /tmp/1.sock fe_status | grep -i "strength"| cut
-d\: -f2 | se
d -e "s| ||g" '); $sig = intval ($sig / 655,2); echo $sig;?> max="100"
></meter>
<ul id="scale">
<li style="width: 5%"><span></span></li>
<li><span id="scale">10</span></li>
<li><span id="scale">20</span></li>
<li><span id="scale">30</span></li>
<li><span id="scale">40</span></li>
<li><span id="scale">50</span></li>
<li><span id="scale">60</span></li>
<li><span id="scale">70</span></li>
<li><span id="scale">80</span></li>
<li><span id="scale">90</span></li>
<li style="width: 10%"><span id="scale"></span></li>
</ul>
</div>
</th>
<th>
<h1>< Tunner LNB-1 Status ></h1>
<B>Signal SNR:</B>
<style>
#meter_item
{
width: 100%;
}
#scale {
display: table;
width: 100%;
padding: 0px 0px 0px 0px;
margin: 2px 0px 10px 0px;
border: 0px 0px 0px 0px;
text-align: center;
}
#scale li {
width: 10%;
display: table-cell;
white-space: nowrap;
}?
</style>
<div style="width: 100%">
<meter id="meter_item" min="0" value=<?php $sig =
shell_exec('dvblastctl -r /tmp/2.sock fe_status | grep -i "snr"| cut -d\:
-f2 | sed -e
"s| ||g" '); $sig = intval ($sig / 655,2); echo $sig;?> max="100" ></meter>
<ul id="scale">
<li style="width: 5%"><span></span></li>
<li><span id="scale">10</span></li>
<li><span id="scale">20</span></li>
<li><span id="scale">30</span></li>
<li><span id="scale">40</span></li>
<li><span id="scale">50</span></li>
<li><span id="scale">60</span></li>
<li><span id="scale">70</span></li>
<li><span id="scale">80</span></li>
<li><span id="scale">90</span></li>
<li style="width: 10%"><span id="scale"></span></li>
</ul>
</div>
<B>Signal Strength:</B>
<style>
#meter_item
{
width: 100%;
}
#scale {
display: table;
width: 100%;
padding: 0px 0px 0px 0px;
margin: 2px 0px 10px 0px;
border: 0px 0px 0px 0px;
text-align: center;
}
#scale li {
width: 10%;
display: table-cell;
white-space: nowrap;
}?
</style>
<div style="width: 100%">
<meter id="meter_item" min="0" value=<?php $sig =
shell_exec('dvblastctl -r /tmp/2.sock fe_status | grep -i "strength"| cut
-d\: -f2 | se
d -e "s| ||g" '); $sig = intval ($sig / 655,2); echo $sig;?> max="100"
></meter>
<ul id="scale">
<li style="width: 5%"><span></span></li>
<li><span id="scale">10</span></li>
<li><span id="scale">20</span></li>
<li><span id="scale">30</span></li>
<li><span id="scale">40</span></li>
<li><span id="scale">50</span></li>
<li><span id="scale">60</span></li>
<li><span id="scale">70</span></li>
<li><span id="scale">80</span></li>
<li><span id="scale">90</span></li>
<li style="width: 10%"><span id="scale"></span></li>
</ul>
</div>
</th>
</tr>
<tr>
<td>
<h1>< Tunner LNB-2 Status ></h1>
<B>Signal SNR:</B>
<style>
#meter_item
{
width: 100%;
}
#scale {
display: table;
width: 100%;
padding: 0px 0px 0px 0px;
margin: 2px 0px 10px 0px;
border: 0px 0px 0px 0px;
text-align: center;
}
#scale li {
width: 10%;
display: table-cell;
white-space: nowrap;
}?
</style>
<div style="width: 100%">
<meter id="meter_item" min="0" value=<?php $sig =
shell_exec('dvblastctl -r /tmp/3.sock fe_status | grep -i "snr"| cut -d\:
-f2 | sed -e
"s| ||g" '); $sig = intval ($sig / 655,2); echo $sig;?> max="100" ></meter>
<ul id="scale">
<li style="width: 5%"><span></span></li>
<li><span id="scale">10</span></li>
<li><span id="scale">20</span></li>
<li><span id="scale">30</span></li>
<li><span id="scale">40</span></li>
<li><span id="scale">50</span></li>
<li><span id="scale">60</span></li>
<li><span id="scale">70</span></li>
<li><span id="scale">80</span></li>
<li><span id="scale">90</span></li>
<li style="width: 10%"><span id="scale"></span></li>
</ul>
</div>
<B>Signal Strength:</B>
<style>
#meter_item
{
width: 100%;
}
#scale {
display: table;
width: 100%;
padding: 0px 0px 0px 0px;
margin: 2px 0px 10px 0px;
border: 0px 0px 0px 0px;
text-align: center;
}
#scale li {
width: 10%;
display: table-cell;
white-space: nowrap;
}?
</style>
<div style="width: 100%">
<meter id="meter_item" min="0" value=<?php $sig =
shell_exec('dvblastctl -r /tmp/3.sock fe_status | grep -i "strength"| cut
-d\: -f2 | se
d -e "s| ||g" '); $sig = intval ($sig / 655,2); echo $sig;?> max="100"
></meter>
<ul id="scale">
<li style="width: 5%"><span></span></li>
<li><span id="scale">10</span></li>
<li><span id="scale">20</span></li>
<li><span id="scale">30</span></li>
<li><span id="scale">40</span></li>
<li><span id="scale">50</span></li>
<li><span id="scale">60</span></li>
<li><span id="scale">70</span></li>
<li><span id="scale">80</span></li>
<li><span id="scale">90</span></li>
<li style="width: 10%"><span id="scale"></span></li>
</ul>
</div>
</td>
<td>
<h1>< Tunner LNB-3 Status ></h1>
<B>Signal SNR:</B>
<style>
#meter_item
{
width: 100%;
}
#scale {
display: table;
width: 100%;
padding: 0px 0px 0px 0px;
margin: 2px 0px 10px 0px;
border: 0px 0px 0px 0px;
text-align: center;
}
#scale li {
width: 10%;
display: table-cell;
white-space: nowrap;
}?
</style>
<div style="width: 100%">
<meter id="meter_item" min="0" value=<?php $sig =
shell_exec('dvblastctl -r /tmp/4.sock fe_status | grep -i "snr"| cut -d\:
-f2 | sed -e
"s| ||g" '); $sig = intval ($sig / 655,2); echo $sig;?> max="100" ></meter>
<ul id="scale">
<li style="width: 5%"><span></span></li>
<li><span id="scale">10</span></li>
<li><span id="scale">20</span></li>
<li><span id="scale">30</span></li>
<li><span id="scale">40</span></li>
<li><span id="scale">50</span></li>
<li><span id="scale">60</span></li>
<li><span id="scale">70</span></li>
<li><span id="scale">80</span></li>
<li><span id="scale">90</span></li>
<li style="width: 10%"><span id="scale"></span></li>
</ul>
</div>
<B>Signal Strength:</B>
<style>
#meter_item
{
width: 100%;
}
#scale {
display: table;
width: 100%;
padding: 0px 0px 0px 0px;
margin: 2px 0px 10px 0px;
border: 0px 0px 0px 0px;
text-align: center;
}
#scale li {
width: 10%;
display: table-cell;
white-space: nowrap;
}?
</style>
<div style="width: 100%">
<meter id="meter_item" min="0" value=<?php $sig =
shell_exec('dvblastctl -r /tmp/4.sock fe_status | grep -i "strength"| cut
-d\: -f2 | se
d -e "s| ||g" '); $sig = intval ($sig / 655,2); echo $sig;?> max="100"
></meter>
<ul id="scale">
<li style="width: 5%"><span></span></li>
<li><span id="scale">10</span></li>
<li><span id="scale">20</span></li>
<li><span id="scale">30</span></li>
<li><span id="scale">40</span></li>
<li><span id="scale">50</span></li>
<li><span id="scale">60</span></li>
<li><span id="scale">70</span></li>
<li><span id="scale">80</span></li>
<li><span id="scale">90</span></li>
<li style="width: 10%"><span id="scale"></span></li>
</ul>
</div>
</td>
</tr>
</table>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/dvblast-devel/attachments/20170717/36fb2b33/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 34793 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/dvblast-devel/attachments/20170717/36fb2b33/attachment.png>
More information about the dvblast-devel
mailing list