ajout heimdall

This commit is contained in:
2025-01-01 11:24:01 +01:00
parent f8be42e486
commit c52f60fca9
1477 changed files with 15692 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
<?php namespace App\SupportedApps\Tasmota;
class Tasmota extends \App\SupportedApps implements \App\EnhancedApps {
public $config;
//protected $login_first = true; // Uncomment if api requests need to be authed first
//protected $method = 'POST'; // Uncomment if requests to the API should be set by POST
function __construct() {
//$this->jar = new \GuzzleHttp\Cookie\CookieJar; // Uncomment if cookies need to be set
}
public function test()
{
$test = parent::appTest($this->url('cm?cmnd=Status 8'));
echo $test->status;
}
public function livestats()
{
$status = 'inactive';
$res = parent::execute($this->url('cm?cmnd=Status 8'));
$details = json_decode($res->getBody());
$data = [];
if($details) {
$data['temperature'] = number_format($details->StatusSNS->AM2301->Temperature,1);
$data['humidity'] = number_format($details->StatusSNS->AM2301->Humidity,1);
$data['dewpoint'] = number_format($details->StatusSNS->AM2301->DewPoint,1);
}
return parent::getLiveStats($status, $data);
}
public function url($endpoint)
{
$api_url = parent::normaliseurl($this->config->url).$endpoint;
return $api_url;
}
}

View File

@@ -0,0 +1,10 @@
{
"appid": "0d318b04d2442102c6a9643405bce18b5df5cf78",
"name": "Tasmota",
"website": "https://github.com/arendst/Tasmota",
"license": "GNU General Public License v3.0 or later",
"description": "Alternative firmware for ESP8266 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX.",
"enhanced": true,
"tile_background": "light",
"icon": "tasmota.png"
}

View File

@@ -0,0 +1,10 @@
<h2>{{ __('app.apps.config') }} - Pull AM2301 Sensor Data @include('items.enable')</h2>
<div class="items">
<div class="input">
<label>{{ strtoupper(__('app.url')) }}</label>
{!! Form::text('config[override_url]', null, array('placeholder' => __('app.apps.override'), 'id' => 'override_url', 'class' => 'form-control')) !!}
</div>
<div class="input">
<button style="margin-top: 32px;" class="btn test" id="test_config">Test</button>
</div>
</div>

View File

@@ -0,0 +1,14 @@
<ul class="livestats">
<li>
<span class="title">Temp.</span>
<strong>{!! $temperature !!}&deg;C</strong>
</li>
<li>
<span class="title">Humid.</span>
<strong>{!! $humidity !!}&percnt;</strong>
</li>
<li>
<span class="title">Dew.</span>
<strong>{!! $dewpoint !!}&deg;C</strong>
</li>
</ul>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB