MYSENSORS_DEVICE: changes to reboot bootloader identification, #116250

git-svn-id: https://svn.fhem.de/fhem/trunk@23254 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User
2020-11-29 07:21:46 +00:00
parent 09553b5527
commit b0bbf0f0e7

View File

@@ -281,8 +281,7 @@ sub Set {
} }
if ($command eq "reboot") { if ($command eq "reboot") {
my $blVersion = ReadingsVal($name, "BL_VERSION", ""); AttrVal($name, "OTA_BL_Type", 0) or ReadingsVal($name, "BL_VERSION", 0)
defined($hash->{OTA_BL_Type}) or $blVersion eq "3.0"
? return sendClientMessage($hash, ? return sendClientMessage($hash,
childId => 255, childId => 255,
cmd => C_INTERNAL, cmd => C_INTERNAL,
@@ -310,10 +309,12 @@ sub Set {
if ($fwType == -1) { if ($fwType == -1) {
Log3 ($name,3,"Firmware type not defined (FW_TYPE) for $name, update not started"); Log3 ($name,3,"Firmware type not defined (FW_TYPE) for $name, update not started");
return "$name: Firmware type not defined (FW_TYPE)"; return "$name: Firmware type not defined (FW_TYPE)";
} elsif ($blVersion eq "3.0" or $blType eq "Optiboot") { }
if ($blVersion eq "3.0" or $blType eq "Optiboot") {
Log3 ($name,4,"Startet flashing Firmware: Optiboot method"); Log3 ($name,4,"Startet flashing Firmware: Optiboot method");
return flashFirmware($hash, $fwType); return flashFirmware($hash, $fwType);
} elsif ($blType eq "MYSBootloader") { }
if ($blType eq "MYSBootloader") {
$hash->{OTA_requested} = 1; $hash->{OTA_requested} = 1;
Log3 ($name,4,"Send reboot command to MYSBootloader node to start update"); Log3 ($name,4,"Send reboot command to MYSBootloader node to start update");
return sendClientMessage($hash, return sendClientMessage($hash,