mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 06:48:43 +00:00
MYSENSORS_DEVICE: add reading parentId
git-svn-id: https://svn.fhem.de/fhem/trunk@9851 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ce15b72566
commit
182f8bdf3c
@ -51,6 +51,7 @@ sub MYSENSORS_DEVICE_Initialize($) {
|
||||
"mapReading_.+ ".
|
||||
"requestAck:1 ".
|
||||
"IODev ".
|
||||
"showtime:0,1 ".
|
||||
$main::readingFnAttributes;
|
||||
|
||||
main::LoadModule("MYSENSORS");
|
||||
@ -469,7 +470,7 @@ sub onInternalMessage($$) {
|
||||
};
|
||||
$type == I_TIME and do {
|
||||
if ($msg->{ack}) {
|
||||
Log3 ($name,4,"MYSENSORS_DEVICE $name: respons to time-request acknowledged");
|
||||
Log3 ($name,4,"MYSENSORS_DEVICE $name: response to time-request acknowledged");
|
||||
} else {
|
||||
sendClientMessage($hash,cmd => C_INTERNAL, childId => 255, subType => I_TIME, payload => time);
|
||||
Log3 ($name,4,"MYSENSORS_DEVICE $name: update of time requested");
|
||||
@ -494,10 +495,11 @@ sub onInternalMessage($$) {
|
||||
};
|
||||
$type == I_CONFIG and do {
|
||||
if ($msg->{ack}) {
|
||||
Log3 ($name,4,"MYSENSORS_DEVICE $name: respons to config-request acknowledged");
|
||||
Log3 ($name,4,"MYSENSORS_DEVICE $name: response to config-request acknowledged");
|
||||
} else {
|
||||
readingsSingleUpdate($hash,"parentId",$msg->{payload},1);
|
||||
sendClientMessage($hash,cmd => C_INTERNAL, childId => 255, subType => I_CONFIG, payload => AttrVal($name,"config","M"));
|
||||
Log3 ($name,4,"MYSENSORS_DEVICE $name: respond to config-request");
|
||||
Log3 ($name,4,"MYSENSORS_DEVICE $name: respond to config-request, node parentId = " . ($msg->{payload});
|
||||
}
|
||||
last;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user