Skip to content

Commit

Permalink
ScanMyTesla last received will be shown in settings panel
Browse files Browse the repository at this point in the history
  • Loading branch information
bassmaster187 committed Dec 30, 2019
1 parent 1748d4a commit 5bc8fa7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions TeslaLogger/www/admin/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,18 @@ function save()
<tr><td></td><td><input class="startdate timepicker text-center"></input> to <input class="enddate timepicker text-center"></input></td></tr>
<tr><td valign="top"><b><?php t("URL Admin Panel"); ?>:</b></td><td><input id="URL_Admin" style="width:100%;" placeholder="http://raspberry/admin/"></td></tr>
<tr><td><b><?php t("ScanMyTesla integration"); ?>:</b></td><td><input id="checkboxScanMyTesla" type="checkbox" value="ScanMyTesla"> Enable</td><td><a href="https://teslalogger.de/smt.php" target=”_blank”><img src="img/icon-help-24.png" /></a></td></tr>
<tr><td><b><?php t("ScanMyTesla last received"); ?>:</b></td><td>
<?php
$t1 = shell_exec('grep "ScanMyTesla: insert ok" /etc/teslalogger/nohup.out | tail -1');
if (isset($t1) && strpos($t1,"]") > 5)
{
$t2 = substr($t1, 0,20);
echo $t2;
}
else
echo "-";
?>
</td></tr>
<tr><td valign="top"><b>Tasker Token:</b></td><td>
<?php
$taskertoken = file_get_contents("/etc/teslalogger/TASKERTOKEN");
Expand Down

0 comments on commit 5bc8fa7

Please sign in to comment.