mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
00_ZWDongle.pm/10_ZWave.pm: NETWORK_STATS patch from krikan (Forum #90436)
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@17186 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
91a078eab9
commit
a75ed367cc
@ -28,6 +28,7 @@ my %sets = (
|
|||||||
onNwSec=>0xc1, onSec=>0x81 } },
|
onNwSec=>0xc1, onSec=>0x81 } },
|
||||||
"backupCreate" => { cmd => "" },
|
"backupCreate" => { cmd => "" },
|
||||||
"backupRestore" => { cmd => "" },
|
"backupRestore" => { cmd => "" },
|
||||||
|
"clearStatistics" => { cmd => "39" }, # CLEAR_NETWORK_STATS
|
||||||
"controllerChange" => { cmd => "4d%02x@", # ZW_CONTROLLER_CHANGE
|
"controllerChange" => { cmd => "4d%02x@", # ZW_CONTROLLER_CHANGE
|
||||||
param => { on =>0x02, stop =>0x05,
|
param => { on =>0x02, stop =>0x05,
|
||||||
stopFailed =>0x06 } },
|
stopFailed =>0x06 } },
|
||||||
@ -69,6 +70,7 @@ my %gets = (
|
|||||||
"random" => "1c%02x", # ZW_GET_RANDOM
|
"random" => "1c%02x", # ZW_GET_RANDOM
|
||||||
"raw" => "%s", # hex
|
"raw" => "%s", # hex
|
||||||
"routeFor" => "92%02x", # hex
|
"routeFor" => "92%02x", # hex
|
||||||
|
"statistics" => "3a", # GET_NETWORK_STATS
|
||||||
"sucNodeId" => "56", # ZW_GET_SUC_NODE_ID
|
"sucNodeId" => "56", # ZW_GET_SUC_NODE_ID
|
||||||
# "timeouts" => "06", # Forum #71333
|
# "timeouts" => "06", # Forum #71333
|
||||||
"version" => "15", # ZW_GET_VERSION
|
"version" => "15", # ZW_GET_VERSION
|
||||||
@ -583,7 +585,14 @@ ZWDongle_Get($@)
|
|||||||
$i++
|
$i++
|
||||||
}
|
}
|
||||||
$msg = join(" ", @list);
|
$msg = join(" ", @list);
|
||||||
}
|
|
||||||
|
} elsif($cmd eq "statistics") { ############################
|
||||||
|
$msg = sprintf("Transmitted:%s BackOffs:%s ReceivedNoErrors:%s
|
||||||
|
ChecksumErrors:%s CRC16Errors:%s ForeignHomeId:%s",
|
||||||
|
hex(substr($ret,4,4)), hex(substr($ret,8,4)),
|
||||||
|
hex(substr($ret,12,4)), hex(substr($ret,16,4)),
|
||||||
|
hex(substr($ret,20,4)), hex(substr($ret,24,4)));
|
||||||
|
}
|
||||||
|
|
||||||
$cmd .= "_".join("_", @a) if(@a);
|
$cmd .= "_".join("_", @a) if(@a);
|
||||||
readingsSingleUpdate($hash, $cmd, $msg, 0);
|
readingsSingleUpdate($hash, $cmd, $msg, 0);
|
||||||
@ -1099,6 +1108,10 @@ ZWDongle_Ready($)
|
|||||||
the MEMORY functions.
|
the MEMORY functions.
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>clearStatistics<br>
|
||||||
|
clear network statistics.
|
||||||
|
</li>
|
||||||
|
|
||||||
<li>controllerChange on|stop|stopFailed<br>
|
<li>controllerChange on|stop|stopFailed<br>
|
||||||
Add a controller to the current network and transfer role as primary to it.
|
Add a controller to the current network and transfer role as primary to it.
|
||||||
Invoking controller is converted to secondary.<br>
|
Invoking controller is converted to secondary.<br>
|
||||||
@ -1247,6 +1260,10 @@ ZWDongle_Ready($)
|
|||||||
request priority routing for <device>. <device> is either
|
request priority routing for <device>. <device> is either
|
||||||
device name or decimal nodeId.</li>
|
device name or decimal nodeId.</li>
|
||||||
|
|
||||||
|
<li>statistics<br>
|
||||||
|
return the current network statistics.
|
||||||
|
</li>
|
||||||
|
|
||||||
<li>sucNodeId<br>
|
<li>sucNodeId<br>
|
||||||
return the currently registered decimal SUC nodeId.
|
return the currently registered decimal SUC nodeId.
|
||||||
</li>
|
</li>
|
||||||
@ -1315,6 +1332,9 @@ ZWDongle_Ready($)
|
|||||||
<li>ZW_ADD_NODE_TO_NETWORK [learnReady|nodeFound|slave|controller|
|
<li>ZW_ADD_NODE_TO_NETWORK [learnReady|nodeFound|slave|controller|
|
||||||
done|failed]</li>
|
done|failed]</li>
|
||||||
|
|
||||||
|
<br><b>clearStatistics</b>
|
||||||
|
<li>CLEAR_NETWORK_STATS ok</li>
|
||||||
|
|
||||||
<br><b>controllerChange</b>
|
<br><b>controllerChange</b>
|
||||||
<li>ZW_CONTROLLER_CHANGE [learnReady|nodeFound|controller|done|failed]</li>
|
<li>ZW_CONTROLLER_CHANGE [learnReady|nodeFound|controller|done|failed]</li>
|
||||||
|
|
||||||
|
@ -4592,6 +4592,15 @@ ZWave_Parse($$@)
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($cmd eq "CLEAR_NETWORK_STATS") {
|
||||||
|
my $retval;
|
||||||
|
if($arg eq "01") { $retval = 'ok';
|
||||||
|
} else { $retval = 'unknown_'.$arg; # should never happen
|
||||||
|
}
|
||||||
|
DoTrigger($ioName, "$cmd $retval");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
if($cmd eq "ZW_SET_PRIORITY_ROUTE" && $arg =~ m/(..)(..)/) {
|
if($cmd eq "ZW_SET_PRIORITY_ROUTE" && $arg =~ m/(..)(..)/) {
|
||||||
DoTrigger($ioName, "$cmd node $1 result $2");
|
DoTrigger($ioName, "$cmd node $1 result $2");
|
||||||
return "";
|
return "";
|
||||||
|
@ -37,6 +37,7 @@ use vars qw(%zw_type6);
|
|||||||
'23' => 'MEMORY_GET_BUFFER',
|
'23' => 'MEMORY_GET_BUFFER',
|
||||||
'24' => 'MEMORY_PUT_BUFFER',
|
'24' => 'MEMORY_PUT_BUFFER',
|
||||||
'27' => 'FLASH_AUTO_PROG_SET',
|
'27' => 'FLASH_AUTO_PROG_SET',
|
||||||
|
'28' => 'ZW_NVR_GET_VALUE',
|
||||||
'29' => 'NVM_GET_ID',
|
'29' => 'NVM_GET_ID',
|
||||||
'2a' => 'NVM_EXT_READ_LONG_BUFFER',
|
'2a' => 'NVM_EXT_READ_LONG_BUFFER',
|
||||||
'2b' => 'NVM_EXT_WRITE_LONG_BUFFER',
|
'2b' => 'NVM_EXT_WRITE_LONG_BUFFER',
|
||||||
@ -49,6 +50,8 @@ use vars qw(%zw_type6);
|
|||||||
'34' => 'RTC_TIMER_READ',
|
'34' => 'RTC_TIMER_READ',
|
||||||
'35' => 'RTC_TIMER_DELETE',
|
'35' => 'RTC_TIMER_DELETE',
|
||||||
'36' => 'RTC_TIMER_CALL',
|
'36' => 'RTC_TIMER_CALL',
|
||||||
|
'37' => 'ZW_CLEAR_TX_TIMERS',
|
||||||
|
'38' => 'ZW_GET_TX_TIMERS',
|
||||||
'39' => 'CLEAR_NETWORK_STATS',
|
'39' => 'CLEAR_NETWORK_STATS',
|
||||||
'3a' => 'GET_NETWORK_STATS',
|
'3a' => 'GET_NETWORK_STATS',
|
||||||
'3b' => 'GET_BACKGROUND_RSSI',
|
'3b' => 'GET_BACKGROUND_RSSI',
|
||||||
@ -67,6 +70,7 @@ use vars qw(%zw_type6);
|
|||||||
'4b' => 'ZW_REMOVE_NODE_FROM_NETWORK',
|
'4b' => 'ZW_REMOVE_NODE_FROM_NETWORK',
|
||||||
'4c' => 'ZW_CREATE_NEW_PRIMARY',
|
'4c' => 'ZW_CREATE_NEW_PRIMARY',
|
||||||
'4d' => 'ZW_CONTROLLER_CHANGE',
|
'4d' => 'ZW_CONTROLLER_CHANGE',
|
||||||
|
'4f' => 'ZW_ASSIGN_PRIORITY_RETURN_ROUTE',
|
||||||
'50' => 'ZW_SET_LEARN_MODE',
|
'50' => 'ZW_SET_LEARN_MODE',
|
||||||
'51' => 'ZW_ASSIGN_SUC_RETURN_ROUTE',
|
'51' => 'ZW_ASSIGN_SUC_RETURN_ROUTE',
|
||||||
'52' => 'ZW_ENABLE_SUC',
|
'52' => 'ZW_ENABLE_SUC',
|
||||||
@ -75,11 +79,13 @@ use vars qw(%zw_type6);
|
|||||||
'55' => 'ZW_DELETE_SUC_RETURN_ROUTE',
|
'55' => 'ZW_DELETE_SUC_RETURN_ROUTE',
|
||||||
'56' => 'ZW_GET_SUC_NODE_ID',
|
'56' => 'ZW_GET_SUC_NODE_ID',
|
||||||
'57' => 'ZW_SEND_SUC_ID',
|
'57' => 'ZW_SEND_SUC_ID',
|
||||||
|
'58' => 'ZW_ASSIGN_PRIORITY_SUC_RETURN_ROUTE',
|
||||||
'59' => 'ZW_REDISCOVERY_NEEDED',
|
'59' => 'ZW_REDISCOVERY_NEEDED',
|
||||||
'5b' => 'ZW_SUPPORT_9600_ONLY', # Appl. Guide
|
'5b' => 'ZW_SUPPORT_9600_ONLY', # Appl. Guide
|
||||||
'5c' => 'ZW_REQUEST_NEW_ROUTE_DESTINATIONS', # Appl. Guide
|
'5c' => 'ZW_REQUEST_NEW_ROUTE_DESTINATIONS', # Appl. Guide
|
||||||
'5d' => 'ZW_IS_NODE_WIHTIN_DIRECT_RANGE', # Appl. Guide
|
'5d' => 'ZW_IS_NODE_WIHTIN_DIRECT_RANGE', # Appl. Guide
|
||||||
'5e' => 'ZW_EXPLORE_REQUEST_INCLUSION',
|
'5e' => 'ZW_EXPLORE_REQUEST_INCLUSION',
|
||||||
|
'5f' => 'ZW_EXPLORE_REQUEST_EXCLUSION',
|
||||||
'60' => 'ZW_REQUEST_NODE_INFO',
|
'60' => 'ZW_REQUEST_NODE_INFO',
|
||||||
'61' => 'ZW_REMOVE_FAILED_NODE_ID',
|
'61' => 'ZW_REMOVE_FAILED_NODE_ID',
|
||||||
'62' => 'ZW_IS_FAILED_NODE',
|
'62' => 'ZW_IS_FAILED_NODE',
|
||||||
@ -88,6 +94,7 @@ use vars qw(%zw_type6);
|
|||||||
'71' => 'TIMER_RESTART',
|
'71' => 'TIMER_RESTART',
|
||||||
'72' => 'TIMER_CANCEL',
|
'72' => 'TIMER_CANCEL',
|
||||||
'73' => 'TIMER_CALL',
|
'73' => 'TIMER_CALL',
|
||||||
|
'78' => 'ZW_FIRMWARE_UPDATE_NVM',
|
||||||
'80' => 'GET_ROUTING_TABLE_LINE',
|
'80' => 'GET_ROUTING_TABLE_LINE',
|
||||||
'81' => 'GET_T_X_COUNTER',
|
'81' => 'GET_T_X_COUNTER',
|
||||||
'82' => 'RESET_T_X_COUNTER',
|
'82' => 'RESET_T_X_COUNTER',
|
||||||
@ -124,6 +131,7 @@ use vars qw(%zw_type6);
|
|||||||
'd1' => 'PROMISCUOUS_COMMAND_HANDLER',
|
'd1' => 'PROMISCUOUS_COMMAND_HANDLER',
|
||||||
'd2' => 'WATCHDOG_START',
|
'd2' => 'WATCHDOG_START',
|
||||||
'd3' => 'WATCHDOG_STOP',
|
'd3' => 'WATCHDOG_STOP',
|
||||||
|
'd4' => 'ZW_SET_ROUTING_MAX',
|
||||||
'f2' => 'ZME_FREQ_CHANGE',
|
'f2' => 'ZME_FREQ_CHANGE',
|
||||||
'f4' => 'ZME_BOOTLOADER_FLASH',
|
'f4' => 'ZME_BOOTLOADER_FLASH',
|
||||||
'f5' => 'ZME_CAPABILITIES',
|
'f5' => 'ZME_CAPABILITIES',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user