Compare commits
250 Commits
Author | SHA1 | Date | |
---|---|---|---|
c75f865589 | |||
9412aac176 | |||
ae437a09f2 | |||
640a7544d7 | |||
f38236f721 | |||
517f033ccc | |||
03b2130625 | |||
90a561be10 | |||
69d7681a28 | |||
5e60969fc4 | |||
2d756e4aaa | |||
80147631d6 | |||
8b66df8407 | |||
fc3740fe9b | |||
03ad7e3fba | |||
dfea4716d3 | |||
f9661f6452 | |||
b41e583a9e | |||
5138e6b3b0 | |||
89bc35b1bd | |||
03e79bc782 | |||
74635dfd0a | |||
443ecd7776 | |||
bbb4be939c | |||
72daa71daf | |||
68f66c8430 | |||
579f632990 | |||
790d5206b6 | |||
2c94924e97 | |||
918f4dc6a3 | |||
f14d34c1b4 | |||
274cb067cf | |||
897a3c7aef | |||
232f82eafe | |||
9c49aa49b9 | |||
24db680413 | |||
df1830a670 | |||
de58578a2d | |||
e15a70ff0b | |||
98b093bcba | |||
82907c73a3 | |||
13de67f570 | |||
7385959b38 | |||
7dfa0b2dda | |||
abb325b448 | |||
d7d5e4f843 | |||
c0dec3d3fb | |||
3e540471d5 | |||
608719ba2f | |||
472fe88ac0 | |||
682dea8bd1 | |||
fb3a690993 | |||
2cae1812d8 | |||
2111939863 | |||
c9a3cc9e1d | |||
b399fcd524 | |||
89bbb4bb10 | |||
801a1a468f | |||
eddcb708ba | |||
c7073b24b4 | |||
fe97f0b203 | |||
eebe13bb7b | |||
a6174d9982 | |||
aea73bb010 | |||
4cb9f2e50b | |||
b61c32a850 | |||
8c49aaa079 | |||
1f54fc7601 | |||
3dd4796e14 | |||
7b188e3e41 | |||
c2863d9998 | |||
76a7eeb4e5 | |||
388ae1635e | |||
d660366aea | |||
8b9ce793cd | |||
71b435d90b | |||
c86cae74e6 | |||
8ce2980356 | |||
0d29721111 | |||
ade45510ac | |||
8a32c9f215 | |||
78b5731bbf | |||
0ee95be7be | |||
bae27c39c1 | |||
47804c996b | |||
6a7083f6ea | |||
ada7e2875c | |||
658f40e979 | |||
1c7097e476 | |||
e363b45862 | |||
11c5e6650d | |||
4b998d19ab | |||
7f6c7bc265 | |||
e108afda5a | |||
a13c42f08c | |||
df33172650 | |||
f3d153726b | |||
33a10d3756 | |||
abcccefeb4 | |||
f61e9d327b | |||
42afa2133e | |||
6aba15caca | |||
1abf586f71 | |||
f02da0c428 | |||
ebb342d83f | |||
fd4ac49f59 | |||
73d7c50db0 | |||
f5ec4f699a | |||
f2400a3949 | |||
63443d75b4 | |||
5e87026852 | |||
c6ee46489b | |||
97540ef9c4 | |||
0c75c89cf0 | |||
93d0ef26c7 | |||
9b49c75317 | |||
5e10125a09 | |||
9e389681f0 | |||
5b8bd75c55 | |||
f77f49b7f1 | |||
43d9356d8c | |||
41c226536f | |||
ec88be0b06 | |||
8ce72c5ddc | |||
9643a9074f | |||
6f1eebcf48 | |||
c084fabc92 | |||
188f5d3838 | |||
9d70fa238a | |||
740effe531 | |||
426fb7c06a | |||
782ad5f0a9 | |||
41ef5cd10a | |||
6d684ade92 | |||
bc4b6eecf5 | |||
e8c2bd5183 | |||
967ec86ea1 | |||
0086f52d74 | |||
54b378d094 | |||
200751b72b | |||
7cefd1c7e3 | |||
ee0c7fa4ba | |||
ae3bf5f68a | |||
929bd705d5 | |||
9b1170a978 | |||
2a5872002f | |||
1b7670f8c5 | |||
768a5a6d7a | |||
2eefd813df | |||
197dba15f1 | |||
8dd9771033 | |||
a4a75ab016 | |||
2cbe907db4 | |||
af3dee00a2 | |||
c9b1e470cb | |||
458edffa85 | |||
930e42835b | |||
d3020ded2c | |||
97f55e6122 | |||
9f9722ce9c | |||
6ce4b352b4 | |||
b3d39a6e58 | |||
3780befa7a | |||
c68f35c2e3 | |||
830e5426d6 | |||
bbf9919ad3 | |||
ab2e990ffb | |||
df99f04e6e | |||
91ff06ea79 | |||
0c3db5e445 | |||
9ffde3bd2c | |||
3326b134a8 | |||
f8b4df8f4f | |||
5bf618a9d2 | |||
9a85c9c20d | |||
86b679ba97 | |||
a4865cae47 | |||
b6a179a0ea | |||
4666020263 | |||
576569ea2d | |||
ae4e1b9990 | |||
c07f757c4a | |||
6faccfe564 | |||
9505316291 | |||
c76fd125ec | |||
3b28a20b33 | |||
8002d2a1d3 | |||
6b475415cc | |||
40074a3db6 | |||
234607cb8d | |||
9ad11bff63 | |||
0849705c62 | |||
6490c2f1be | |||
d863cbeff0 | |||
d04ea31ef0 | |||
33fddad023 | |||
b620f87eb1 | |||
97b4147072 | |||
bd3d354786 | |||
b230baa776 | |||
4e6ca5f8ed | |||
d6e6847955 | |||
c551f4855f | |||
15c791e1bf | |||
af2f803be5 | |||
91fd570896 | |||
0e876c319c | |||
122983580f | |||
948f68515c | |||
528e8d5a08 | |||
b7adf6af6d | |||
a8646efe0d | |||
480946f9be | |||
c3620aa017 | |||
43bf81053b | |||
b4f5cef061 | |||
58333bef34 | |||
0beab4ec1d | |||
4860b7e0ee | |||
bf6734f44b | |||
a1fad78c3b | |||
bfbf2cced4 | |||
78e9906e6b | |||
8d03f20b57 | |||
83b9a4347c | |||
b197fbd082 | |||
29869e9b08 | |||
d61e06e0e9 | |||
6b87b19f0d | |||
c87d8e9302 | |||
8afc912ed5 | |||
b06c9acda3 | |||
a56dfe6a2d | |||
17b4182abe | |||
9f19ed8817 | |||
cea5741fb8 | |||
5661ef3e59 | |||
40c7318992 | |||
9bdeb2ac19 | |||
e64f8fd0a4 | |||
a193c6f814 | |||
d1b04b6a74 | |||
7113e9974e | |||
7c074adbb9 | |||
462311836f | |||
c553b8ef8f | |||
1d75b5cc77 | |||
f2c840bedc | |||
b6c5f42acc | |||
65cbeba975 |
4243
CHANGELOG.md
Normal file
4243
CHANGELOG.md
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Developed with VSCodium and richterger perl plugin.
|
||||
#
|
||||
# (c) 2017-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||
# (c) 2017-2024 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||
# All rights reserved
|
||||
#
|
||||
# Special thanks goes to comitters:
|
||||
@ -166,7 +166,7 @@ BEGIN {
|
||||
GP_Export(
|
||||
qw(
|
||||
Initialize
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
sub Initialize {
|
||||
@ -205,6 +205,7 @@ sub Define {
|
||||
my $hash = shift // return;
|
||||
my $aArg = shift // return;
|
||||
|
||||
|
||||
return $@ unless ( FHEM::Meta::SetInternals($hash) );
|
||||
use version 0.60; our $VERSION = FHEM::Meta::Get( $hash, 'version' );
|
||||
|
||||
@ -221,8 +222,9 @@ sub Define {
|
||||
$hash->{URL} =
|
||||
AttrVal( $name, 'gardenaBaseURL', 'https://smart.gardena.com' ) . '/v1';
|
||||
$hash->{VERSION} = version->parse($VERSION)->normal;
|
||||
$hash->{INTERVAL} = 60;
|
||||
$hash->{INTERVAL} = 180;
|
||||
$hash->{NOTIFYDEV} = "global,$name";
|
||||
$hash->{helper}{gettoken_count} = 0;
|
||||
|
||||
CommandAttr( undef, $name . ' room GardenaSmart' )
|
||||
if ( AttrVal( $name, 'room', 'none' ) eq 'none' );
|
||||
@ -264,6 +266,8 @@ sub Attr {
|
||||
if ( $cmd eq 'set' && $attrVal eq '1' ) {
|
||||
RemoveInternalTimer( $hash,
|
||||
"FHEM::GardenaSmartBridge::getDevices" );
|
||||
RemoveInternalTimer( $hash,
|
||||
"FHEM::GardenaSmartBridge::getToken" );
|
||||
readingsSingleUpdate( $hash, 'state', 'inactive', 1 );
|
||||
Log3 $name, 3, "GardenaSmartBridge ($name) - disabled";
|
||||
}
|
||||
@ -290,14 +294,14 @@ sub Attr {
|
||||
if ( $attrVal == 0 );
|
||||
RemoveInternalTimer( $hash,
|
||||
"FHEM::GardenaSmartBridge::getDevices" );
|
||||
$hash->{INTERVAL} = $attrVal;
|
||||
$hash->{INTERVAL} = $attrVal if $attrVal >= 180;
|
||||
Log3 $name, 3,
|
||||
"GardenaSmartBridge ($name) - set interval: $attrVal";
|
||||
}
|
||||
elsif ( $cmd eq 'del' ) {
|
||||
RemoveInternalTimer( $hash,
|
||||
"FHEM::GardenaSmartBridge::getDevices" );
|
||||
$hash->{INTERVAL} = 60;
|
||||
$hash->{INTERVAL} = 180;
|
||||
Log3 $name, 3,
|
||||
"GardenaSmartBridge ($name) - delete User interval and set default: 60";
|
||||
}
|
||||
@ -414,7 +418,6 @@ sub Set {
|
||||
|
||||
if ( lc $cmd eq 'getdevicesstate' ) {
|
||||
getDevices($hash);
|
||||
|
||||
}
|
||||
elsif ( lc $cmd eq 'gettoken' ) {
|
||||
return "please set Attribut gardenaAccountEmail first"
|
||||
@ -438,6 +441,15 @@ sub Set {
|
||||
|
||||
DeletePassword($hash);
|
||||
}
|
||||
elsif ( lc $cmd eq 'debughelper' ) {
|
||||
return "usage: $cmd" if ( scalar( @{$aArg} ) != 2 );
|
||||
my $new_helper = $aArg->[0];
|
||||
my $new_helper_value = $aArg->[1];
|
||||
Log3( $name, 5,
|
||||
"[DEBUG] - GardenaSmartBridge ($name) - override helper $new_helper with $new_helper_value"
|
||||
);
|
||||
$hash->{helper}{$new_helper} = $new_helper_value;
|
||||
}
|
||||
else {
|
||||
|
||||
my $list = "getDevicesState:noArg getToken:noArg"
|
||||
@ -482,8 +494,8 @@ sub Write {
|
||||
"GardenaSmartBridge ($name) - Send with URL: $hash->{URL}$uri, HEADER: secret!, DATA: secret!, METHOD: $method"
|
||||
);
|
||||
|
||||
# Log3($name, 3,
|
||||
# "GardenaSmartBridge ($name) - Send with URL: $hash->{URL}$uri, HEADER: $header, DATA: $payload, METHOD: $method");
|
||||
# Log3($name, 3,
|
||||
# "GardenaSmartBridge ($name) - Send with URL: $hash->{URL}$uri, HEADER: $header, DATA: $payload, METHOD: $method");
|
||||
|
||||
return;
|
||||
}
|
||||
@ -520,7 +532,6 @@ sub ErrorHandling {
|
||||
1 );
|
||||
|
||||
if ( $err =~ /timed out/ ) {
|
||||
|
||||
Log3 $dname, 5,
|
||||
"GardenaSmartBridge ($dname) - RequestERROR: connect to gardena cloud is timed out. check network";
|
||||
}
|
||||
@ -606,7 +617,7 @@ sub ErrorHandling {
|
||||
}
|
||||
|
||||
if (
|
||||
$data =~ /Error/
|
||||
$data =~ /Error/ && $data !~ /lastLonaErrorCode/
|
||||
|| ( defined($decode_json)
|
||||
&& ref($decode_json) eq 'HASH'
|
||||
&& defined( $decode_json->{errors} ) )
|
||||
@ -621,26 +632,33 @@ sub ErrorHandling {
|
||||
if ( $param->{code} == 400 ) {
|
||||
if ($decode_json) {
|
||||
if ( ref( $decode_json->{errors} ) eq "ARRAY"
|
||||
&& defined( $decode_json->{errors} ) )
|
||||
&& exists( $decode_json->{errors} ) )
|
||||
|
||||
# replace defined with exists
|
||||
# && defined( $decode_json->{errors} ) )
|
||||
{
|
||||
readingsBulkUpdate(
|
||||
$dhash,
|
||||
"state",
|
||||
$decode_json->{errors}[0]{error} . ' '
|
||||
. $decode_json->{errors}[0]{attribute},
|
||||
1
|
||||
);
|
||||
readingsBulkUpdate(
|
||||
$dhash,
|
||||
"lastRequestState",
|
||||
$decode_json->{errors}[0]{error} . ' '
|
||||
. $decode_json->{errors}[0]{attribute},
|
||||
1
|
||||
);
|
||||
Log3 $dname, 5,
|
||||
"GardenaSmartBridge ($dname) - RequestERROR: "
|
||||
. $decode_json->{errors}[0]{error} . " "
|
||||
. $decode_json->{errors}[0]{attribute};
|
||||
# $decode_json->{errors} -> ARRAY
|
||||
# $decode_json->{errors}[0] -> HASH
|
||||
if ( exists( $decode_json->{errors}[0]{error} ) ) {
|
||||
readingsBulkUpdate(
|
||||
$dhash,
|
||||
"state",
|
||||
$decode_json->{errors}[0]{error} . ' '
|
||||
. $decode_json->{errors}[0]{attribute},
|
||||
1
|
||||
);
|
||||
readingsBulkUpdate(
|
||||
$dhash,
|
||||
"lastRequestState",
|
||||
$decode_json->{errors}[0]{error} . ' '
|
||||
. $decode_json->{errors}[0]{attribute},
|
||||
1
|
||||
);
|
||||
Log3 $dname, 5,
|
||||
"GardenaSmartBridge ($dname) - RequestERROR: "
|
||||
. $decode_json->{errors}[0]{error} . " "
|
||||
. $decode_json->{errors}[0]{attribute};
|
||||
} # fi exists error
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -677,6 +695,16 @@ sub ErrorHandling {
|
||||
"GardenaSmartBridge ($dname) - RequestERROR: check the ???";
|
||||
|
||||
}
|
||||
elsif ( $decode_json->{errors}[0]{code} eq "ratelimit.exceeded" ) {
|
||||
Log3 $name, 5,
|
||||
"GardenaSmartBridge ($name) - RequestERROR: error ratelimit.exceeded";
|
||||
readingsBulkUpdate( $hash, "lastRequestState", "too many requests", 1 );
|
||||
readingsBulkUpdate( $hash, "state", "inactive", 1 );
|
||||
# remove all timer and disable bridge
|
||||
RemoveInternalTimer( $hash );
|
||||
|
||||
return; # post request max.
|
||||
}
|
||||
else {
|
||||
|
||||
Log3 $dname, 5,
|
||||
@ -686,8 +714,18 @@ sub ErrorHandling {
|
||||
|
||||
if ( !defined( $hash->{helper}{session_id} ) ) {
|
||||
readingsSingleUpdate( $hash, 'token', 'none', 1 );
|
||||
InternalTimer( gettimeofday() + 5,
|
||||
"FHEM::GardenaSmartBridge::getToken", $hash );
|
||||
Log3 $name, 3,
|
||||
"GardenaSmartBridge ($name) - getToken limit: "
|
||||
. $hash->{helper}{gettoken_count} ;
|
||||
|
||||
if ($hash->{helper}{gettoken_count} < 6) {
|
||||
$hash->{helper}{gettoken_count}++;
|
||||
InternalTimer( gettimeofday() + 5,
|
||||
"FHEM::GardenaSmartBridge::getToken", $hash )
|
||||
} else {
|
||||
RemoveInternalTimer ($hash);
|
||||
$hash->{helper}{gettoken_count} = 0;
|
||||
}
|
||||
}
|
||||
readingsEndUpdate( $dhash, 1 );
|
||||
|
||||
@ -731,7 +769,7 @@ sub ErrorHandling {
|
||||
my $i = 0;
|
||||
for my $dev_settings ( @{ $devJson->{settings} } ) {
|
||||
$output .= "[" . $i++ . "]id: $dev_settings->{id} \n";
|
||||
$output .= "name: $dev_settings->{name} ";
|
||||
$output .= "name: $dev_settings->{name} \n";
|
||||
if ( ref( $dev_settings->{value} ) eq 'ARRAY'
|
||||
|| ref( $dev_settings->{value} ) eq 'HASH' )
|
||||
{
|
||||
@ -747,16 +785,7 @@ sub ErrorHandling {
|
||||
|
||||
for my $dev_settings ( @{ $devJson->{abilities} } ) {
|
||||
$output .= "[" . $i++ . "]id: $dev_settings->{id} \n";
|
||||
$output .= "name: $dev_settings->{name} ";
|
||||
|
||||
if ( ref( $dev_settings->{value} ) eq 'ARRAY'
|
||||
|| ref( $dev_settings->{value} ) eq 'HASH' )
|
||||
{
|
||||
$output .= 'N/A \n';
|
||||
}
|
||||
else {
|
||||
$output .= "value: $dev_settings->{value} \n";
|
||||
}
|
||||
$output .= "name: $dev_settings->{name} \n";
|
||||
}
|
||||
|
||||
$hash->{helper}{debug_device_output} = $output;
|
||||
@ -1055,6 +1084,20 @@ sub WriteReadings {
|
||||
if ( ref($v) eq 'ARRAY' );
|
||||
|
||||
#$v = encode_utf8($v);
|
||||
$v = ' ' if ( !defined $v );
|
||||
Log3 $name, 4,
|
||||
"Gardena DEBUG DEBUG DEBUG stage 1 "
|
||||
. $decode_json->{abilities}[0]{properties}[$properties]
|
||||
{name}
|
||||
if ( $decode_json->{abilities}[0]{properties}[$properties]
|
||||
{name} !~ /ethernet_status|wifi_status/ );
|
||||
Log3 $name, 4, "Gardena DEBUG DEBUG DEBUG stage 2" . $t
|
||||
if ( $decode_json->{abilities}[0]{properties}[$properties]
|
||||
{name} !~ /ethernet_status|wifi_status/ );
|
||||
Log3 $name, 4, "Gardena DEBUG DEBUG DEBUG stage 3" . $v
|
||||
if ( $decode_json->{abilities}[0]{properties}[$properties]
|
||||
{name} !~ /ethernet_status|wifi_status/ );
|
||||
|
||||
readingsBulkUpdateIfChanged(
|
||||
$hash,
|
||||
$decode_json->{abilities}[0]{properties}[$properties]
|
||||
@ -1073,35 +1116,21 @@ sub WriteReadings {
|
||||
&& ref($v) eq 'HASH'
|
||||
)
|
||||
{
|
||||
if ( $decode_json->{abilities}[0]{properties}
|
||||
[$properties]{name} eq 'ethernet_status' )
|
||||
{
|
||||
readingsBulkUpdateIfChanged( $hash,
|
||||
'ethernet_status-mac', $v->{mac} );
|
||||
readingsBulkUpdateIfChanged( $hash,
|
||||
'ethernet_status-ip', $v->{ip} )
|
||||
if ( ref( $v->{ip} ) ne 'HASH' );
|
||||
readingsBulkUpdateIfChanged( $hash,
|
||||
'ethernet_status-isconnected',
|
||||
$v->{isConnected} );
|
||||
if ( $v->{is_connected} ) {
|
||||
readingsBulkUpdateIfChanged(
|
||||
$hash,
|
||||
$decode_json->{abilities}[0]{properties}
|
||||
[$properties]{name} . '-ip',
|
||||
$v->{ip}
|
||||
) if ( ref( $v->{ip} ) ne 'HASH' );
|
||||
readingsBulkUpdateIfChanged(
|
||||
$hash,
|
||||
$decode_json->{abilities}[0]{properties}
|
||||
[$properties]{name} . '-isconnected',
|
||||
$v->{is_connected}
|
||||
) if ( $v->{is_connected} );
|
||||
}
|
||||
elsif ( $decode_json->{abilities}[0]{properties}
|
||||
[$properties]{name} eq 'wifi_status' )
|
||||
{
|
||||
readingsBulkUpdateIfChanged( $hash,
|
||||
'wifi_status-ssid', $v->{ssid} )
|
||||
if ( ref( $v->{ssid} ) ne 'HASH' );
|
||||
readingsBulkUpdateIfChanged( $hash,
|
||||
'wifi_status-mac', $v->{mac} );
|
||||
readingsBulkUpdateIfChanged( $hash,
|
||||
'wifi_status-ip', $v->{ip} )
|
||||
if ( ref( $v->{ip} ) ne 'HASH' );
|
||||
readingsBulkUpdateIfChanged( $hash,
|
||||
'wifi_status-isconnected', $v->{isConnected} );
|
||||
readingsBulkUpdateIfChanged( $hash,
|
||||
'wifi_status-signal', $v->{signal} );
|
||||
}
|
||||
}
|
||||
} # fi ethernet and wifi
|
||||
}
|
||||
$properties--;
|
||||
|
||||
@ -1171,21 +1200,21 @@ sub getToken {
|
||||
|
||||
Write(
|
||||
$hash,
|
||||
'"data": {"type":"token", "attributes":{"username": "'
|
||||
'"data":{"type":"token","attributes":{"username":"'
|
||||
. AttrVal( $name, 'gardenaAccountEmail', 'none' )
|
||||
. '","password": "'
|
||||
. '","password":"'
|
||||
. ReadPassword( $hash, $name )
|
||||
. '", "client_id":"smartgarden-jwt-client"}}',
|
||||
. '","client_id":"smartgarden-jwt-client"}}',
|
||||
undef,
|
||||
undef
|
||||
);
|
||||
|
||||
Log3 $name, 4,
|
||||
'"data": {"type":"token", "attributes":{"username": "'
|
||||
'"data": {"type":"token", "attributes":{"username":"'
|
||||
. AttrVal( $name, 'gardenaAccountEmail', 'none' )
|
||||
. '","password": "'
|
||||
. '","password":"'
|
||||
. ReadPassword( $hash, $name )
|
||||
. '", "client_id":"smartgarden-jwt-client"}}';
|
||||
. '","client_id":"smartgarden-jwt-client"}}';
|
||||
Log3 $name, 3,
|
||||
"GardenaSmartBridge ($name) - send credentials to fetch Token and locationId";
|
||||
|
||||
@ -1284,7 +1313,10 @@ sub createHttpValueStrings {
|
||||
my ( $hash, $payload, $deviceId, $abilities, $service_id ) = @_;
|
||||
|
||||
my $session_id = $hash->{helper}{session_id};
|
||||
my $header = "Content-Type: application/json";
|
||||
my $header = 'Content-Type: application/json';
|
||||
$header .= "\r\norigin: https://smart.gardena.com";
|
||||
$header .= "\r\nuser-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36";
|
||||
#my $header = "Content-Type: application/json; origin: https://smart.gardena.com";
|
||||
my $uri = '';
|
||||
my $method = 'POST';
|
||||
$header .= "\r\nAuthorization: Bearer $session_id"
|
||||
@ -1331,17 +1363,16 @@ sub createHttpValueStrings {
|
||||
} # park until next schedules or override
|
||||
elsif (defined($abilities)
|
||||
&& defined($payload)
|
||||
&& $abilities eq 'mower_timer' )
|
||||
&& $abilities eq 'mower' )
|
||||
{
|
||||
my $valve_id;
|
||||
$method = 'PUT';
|
||||
|
||||
$uri .=
|
||||
'/devices/'
|
||||
. $deviceId
|
||||
. '/abilities/'
|
||||
. $abilities
|
||||
. '/properties/mower_timer';
|
||||
. '/commands/manual_start';
|
||||
|
||||
}
|
||||
elsif (defined($abilities)
|
||||
@ -1492,7 +1523,7 @@ sub DeletePassword {
|
||||
<ul>
|
||||
<li>debugJSON - </li>
|
||||
<li>disable - Disables the Bridge</li>
|
||||
<li>interval - Interval in seconds (Default=60)</li>
|
||||
<li>interval - Interval in seconds (Default=180)</li>
|
||||
<li>gardenaAccountEmail - Email Adresse which was used in the GardenaAPP</li>
|
||||
</ul>
|
||||
</ul>
|
||||
@ -1553,7 +1584,7 @@ sub DeletePassword {
|
||||
<ul>
|
||||
<li>debugJSON - JSON Fehlermeldungen</li>
|
||||
<li>disable - Schaltet die Datenübertragung der Bridge ab</li>
|
||||
<li>interval - Abfrageinterval in Sekunden (default: 60)</li>
|
||||
<li>interval - Abfrageinterval in Sekunden (default: 180)</li>
|
||||
<li>gardenaAccountEmail - Email Adresse, die auch in der GardenaApp verwendet wurde</li>
|
||||
</ul>
|
||||
</ul>
|
||||
@ -1577,7 +1608,7 @@ sub DeletePassword {
|
||||
],
|
||||
"release_status": "stable",
|
||||
"license": "GPL_2",
|
||||
"version": "v2.4.7",
|
||||
"version": "v2.6.3",
|
||||
"author": [
|
||||
"Marko Oldenburg <fhemdevelopment@cooltux.net>"
|
||||
],
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,2 +1,2 @@
|
||||
UPD 2022-02-01_18:41:32 49520 FHEM/73_GardenaSmartBridge.pm
|
||||
UPD 2022-02-09_13:50:50 57267 FHEM/74_GardenaSmartDevice.pm
|
||||
UPD 2024-05-22_18:46:22 51262 FHEM/73_GardenaSmartBridge.pm
|
||||
UPD 2024-05-21_09:01:54 127762 FHEM/74_GardenaSmartDevice.pm
|
||||
|
36
hooks/commit-msg
Executable file
36
hooks/commit-msg
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# An example hook script to check the commit log message.
|
||||
# Called by "git commit" with one argument, the name of the file
|
||||
# that has the commit message. The hook should exit with non-zero
|
||||
# status after issuing an appropriate message if it wants to stop the
|
||||
# commit. The hook is allowed to edit the commit message file.
|
||||
#
|
||||
# To enable this hook, rename this file to "commit-msg".
|
||||
|
||||
# Uncomment the below to add a Signed-off-by line to the message.
|
||||
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
|
||||
# hook is more suited to it.
|
||||
#
|
||||
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
|
||||
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
|
||||
|
||||
# This example catches duplicate Signed-off-by lines.
|
||||
|
||||
commit_msg=$(cat "${1:?Missing commit message file}")
|
||||
|
||||
test "" = "$(grep '^Signed-off-by: ' "$1" |
|
||||
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
|
||||
echo >&2 Duplicate Signed-off-by lines.
|
||||
exit 1
|
||||
}
|
||||
|
||||
if ! echo "$commit_msg" | grep -Eq "^(build|chore|ci|docs|feat|feat!|fix|perf|refactor|revert|style|test)(\(.+\))?: .*$" ; then
|
||||
|
||||
echo "Invalid commit message"
|
||||
|
||||
exit 1
|
||||
|
||||
fi
|
||||
|
||||
echo "Commit message is valid!"
|
18
hooks/post-commit
Executable file
18
hooks/post-commit
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -eu
|
||||
|
||||
# destination of the final changelog file
|
||||
OUTPUT_FILE=CHANGELOG.md
|
||||
|
||||
# generate the changelog
|
||||
git --no-pager log --no-merges --format="### %s%d%n>%aD%n%n>Author: %aN (%aE)%n%n>Commiter: %cN (%cE)%n%n%b%n%N%n" > $OUTPUT_FILE
|
||||
|
||||
# prevent recursion!
|
||||
# since a 'commit --amend' will trigger the post-commit script again
|
||||
# we have to check if the changelog file has changed or not
|
||||
res=$(git status --porcelain | grep -c ".\$OUTPUT_FILE$")
|
||||
if [ "$res" -gt 0 ]; then
|
||||
git add $OUTPUT_FILE
|
||||
git commit --amend
|
||||
echo "Populated Changelog in $OUTPUT_FILE"
|
||||
fi
|
Reference in New Issue
Block a user