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,43 @@
<?php namespace App\SupportedApps\Fronius;
class Fronius extends \App\SupportedApps implements \App\EnhancedApps {
public $config;
function __construct() {
}
public function test()
{
$test = parent::appTest($this->url('solar_api/GetAPIVersion.cgi'));
echo $test->status;
}
public function livestats()
{
$status = 'active';
$attrs['query'] = ['Scope' => 'System'];
$res = parent::execute($this->url('solar_api/v1/GetInverterRealtimeData.cgi'), $attrs);
$details = json_decode($res->getBody());
$data = [];
$data['PAC'] = 0;
foreach( $details->Body->Data->PAC->Values as $key => $pac){
$data['PAC'] += $pac;
}
$data['PAC_UNIT'] = $details->Body->Data->PAC->Unit;
$data['DAY_ENERGY'] = 0;
foreach( $details->Body->Data->DAY_ENERGY->Values as $key => $ev){
$data['DAY_ENERGY'] += $ev;
}
$data['DAY_ENERGY_UNIT'] = $details->Body->Data->DAY_ENERGY->Unit;
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": "36211c66ecd5984827673c89373ae184f06c000f",
"name": "Fronius",
"website": "https://www.fronius.com",
"license": "MIT License",
"description": "This app allows to monitor the electrical production of the photovoltaic panels connected to a Fronius inverter.\r\n\r\nThe enhanced app connects to the inverter API and shows the current production of the system, as well as the daily production.",
"enhanced": true,
"tile_background": "dark",
"icon": "fronius.png"
}

View File

@@ -0,0 +1,10 @@
<h2>{{ __('app.apps.config') }} ({{ __('app.optional') }}) @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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,10 @@
<ul class="livestats">
<li>
<span class="title">PAC</span>
<strong>{{ $PAC }}{{ $PAC_UNIT }}</strong>
</li>
<li class="right">
<span class="title">Day energy</span>
<strong>{{ $DAY_ENERGY }}{{ $DAY_ENERGY_UNIT }}</strong>
</li>
</ul>