74_AutomowerConnect: Cref improved, automowerconnect.js fix third party file loading, change tp repository, add file size to log entry.

git-svn-id: https://svn.fhem.de/fhem/trunk@29881 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Ellert 2025-04-20 12:17:00 +00:00
parent a5fbfbfb24
commit 9372456abd
4 changed files with 30 additions and 17 deletions

View File

@ -1,5 +1,8 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it
- change: 74_AutomowerConnect: Cref improved, automowerconnect.js fix third
party file loading, change tp repository, add file size to log
entry
- bugfix: 76_SMAInverter.pm: fix SBS LG bog
- feature: 50_MOBILEALERTSGW: Added Internal lastGateway
- feature: 76_SolarForecast: Major release 1.51.0

View File

@ -284,13 +284,13 @@ __END__
<li><a id='AutomowerConnect-get-MowerData'>MowerData</a><br>
<code>get &lt;name&gt; MowerData</code><br>
Lists all mower data with its hash path exept positon array. The hash path can be used for generating userReadings. The trigger is e.g. <i>device_state: connected</i> or <i>mower_wsEvent: &lt;status-event|positions-event|settings-event&gt;</i>.<br>
Lists all mower data with its hash path exept positon array. The hash path can be used for generating <a href="#userReadings">userReadings</a>. The trigger is e.g. <i>device_state:\sconnected</i> or <i>mower_wsEvent:\s&lt;event name&gt;</i>.<br>
Example: created reading <code>serialnumber</code> with hash path <code>$hash->{helper}{mower}{attributes}{system}{serialNumber}</code><br><br>
<code>attr &lt;name&gt; userReadings serialnumber:connected {$defs{$name}->{helper}{mower}{attributes}{system}{serialNumber}}</code></li>
<code>attr &lt;name&gt; userReadings serialnumber:device_state:\sconnected {$defs{$name}->{helper}{mower}{attributes}{system}{serialNumber}}</code></li>
<li><a id='AutomowerConnect-get-StatisticsData'>StatisticsData</a><br>
<code>get &lt;name&gt; StatisticsData</code><br>
Lists statistics data with its hash path. The hash path can be used for generating userReadings. The trigger is e.g. <i>device_state: connected</i> or <i>mower_wsEvent: &lt;status-event|positions-event|settings-event&gt;</i>.</li>
Lists statistics data with its hash path. The hash path can be used for generating <a href="#userReadings">userReadings</a>. The trigger is e.g. <i>device_state:\sconnected</i> or <i>mower_wsEvent:\s&lt;status-event|positions-event|settings-event&gt;</i>, see .</li>
<li><a id='AutomowerConnect-get-errorCodes'>errorCodes</a><br>
<code>get &lt;name&gt; errorCodes</code><br>
@ -816,13 +816,13 @@ __END__
<li><a id='AutomowerConnect-get-MowerData'>MowerData</a><br>
<code>get &lt;name&gt; MowerData</code><br>
Listet alle Daten des Mähers einschließlich Hashpfad auf, ausgenommen das Positonsarray. Der Hashpfad kann zur Erzeugung von userReadings genutzt werden, getriggert wird durch e.g. <i>device_state: connected</i> oder <i>mower_wsEvent: &lt;status-event|positions-event|settings-event&gt;</i>.<br>
Listet alle Daten des Mähers einschließlich Hashpfad auf, ausgenommen das Positonsarray. Der Hashpfad kann zur Erzeugung von <a href="#userReadings">userReadings</a> genutzt werden, getriggert wird durch z.B. <i>device_state:\sconnected</i> oder <i>mower_wsEvent:\s&lt;event name&gt;</i>.<br>
Beispiel: erzeugen des Reading <code>serialnumber</code> mit dem Hashpfad <code>$hash->{helper}{mower}{attributes}{system}{serialNumber}</code><br><br>
<code>attr &lt;name&gt; userReadings serialnumber:connected {$defs{$name}->{helper}{mower}{attributes}{system}{serialNumber}}</code></li>
<code>attr &lt;name&gt; userReadings serialnumber:device_state:\sconnected {$defs{$name}->{helper}{mower}{attributes}{system}{serialNumber}}</code></li>
<li><a id='AutomowerConnect-get-StatisticsData'>StatisticsData</a><br>
<code>get &lt;name&gt; StatisticsData</code><br>
Listet statistische Daten mit ihrem Hashpfad auf. Der Hashpfad kann zur Erzeugung von userReadings genutzt werden, getriggert wird z.B. durch <i>device_state: connected</i> oder <i>mower_wsEvent: &lt;status-event|positions-event|settings-event&gt;</i></li>
Listet statistische Daten mit ihrem Hashpfad auf. Der Hashpfad kann zur Erzeugung von <a href="#userReadings">userReadings</a> genutzt werden, getriggert wird z.B. durch <i>device_state:\sconnected</i> oder <i>mower_wsEvent:\s&lt;event name&gt;</i></li>
<li><a id='AutomowerConnect-get-errorStack'>errorStack</a><br>
<code>get &lt;name&gt; errorStack</code><br>

View File

@ -3053,7 +3053,8 @@ sub listInternalData { ## no critic (ProhibitExcessComplexity [complexity core m
$ret .= '<p><table class="block wide">';
$ret .= '<caption><b>Third Party Software</b></caption><tbody>';
$ret .= '<tr class="column ' . ( $cnt++ % 2 ? "odd" : "even" ) . '"><td>hull calculation (hull.js)</td><td style="word-wrap:break-word; max-width:40em"> Server: ' . $hash->{helper}{FWEXTA}{url} . '</td></tr>';
$ret .= '<tr class="column ' . ( $cnt++ % 2 ? "odd" : "even" ) . '"><td>hull calculation (hull.js)</td><td style="word-wrap:break-word; max-width:40em"> Server: ' . $hash->{helper}{FWEXTA}{url}
. ', filesize: ' . ( -s $FW_dir . '/' . $hash->{helper}{FWEXTA}{path} . '/' . $hash->{helper}{FWEXTA}{file} ) . ' kB, check content if not about 12kB.</td></tr>';
$ret .= '</tbody></table>';
@ -3166,8 +3167,9 @@ sub getTpFile {
print $fh $msg;
close( $fh );
readingsSingleUpdate( $hash, 'third_party_library', "$file downloaded to: $path", 1 );
Log3 $name, 1, "$name getTpFile: third party library downloaded from $url to $path";
my $fsz = -s "$path/$file";
readingsSingleUpdate( $hash, 'third_party_library', "${file}, (${fsz} Byte) downloaded to: $path", 1 );
Log3 $name, 1, "$name getTpFile: third party library downloaded from $url to $path/$file, filesize: $fsz. Check content if not about 12 kB.";
}

View File

@ -826,6 +826,8 @@ function AutomowerConnectUpdateDetail (dev, type, detailfnfirst, picx, picy, sca
loadScript('automowerconnect/hull.js', ()=> {
if ( typeof hull === "function" ) {
const pts = [];
for ( let i = 0; i < pos.length; i+=3 ){
@ -842,6 +844,12 @@ function AutomowerConnectUpdateDetail (dev, type, detailfnfirst, picx, picy, sca
}
} else {
log( 'AutomowerConnectUpdateDetail: Loading automowerconnect/hull.js failed, no function named hull, check content of hull.js' );
}
});
}