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