mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 07:24:21 +00:00
changes for TRX modules
git-svn-id: https://svn.fhem.de/fhem/trunk@1284 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b10dc6ae9a
commit
1f4dfafcb0
@ -47,8 +47,15 @@ my %flogpar = (
|
|||||||
=> { GPLOT => "rain4:RainRate", FILTER => "%NAME" },
|
=> { GPLOT => "rain4:RainRate", FILTER => "%NAME" },
|
||||||
|
|
||||||
# X10 sensors received by RFXCOM
|
# X10 sensors received by RFXCOM
|
||||||
"RFXX10SEC.*"
|
"(RFXX10SEC|TRX_DS10A).*"
|
||||||
=> { GPLOT => "fht80tf:Window,", FILTER => "%NAME" },
|
=> { GPLOT => "fht80tf:Window,", FILTER => "%NAME" },
|
||||||
|
# X10 Window sensors received by RFXTRX
|
||||||
|
"TRX_DS10A.*"
|
||||||
|
=> { GPLOT => "fht80tf:Window,", FILTER => "%NAME" },
|
||||||
|
# TX3 temperature sensors received by RFXTRX
|
||||||
|
"TX3_T.*"
|
||||||
|
=> { GPLOT => "temp4:Temp,", FILTER => "%NAME" },
|
||||||
|
|
||||||
|
|
||||||
# USB-WDE1
|
# USB-WDE1
|
||||||
"USBWX_[0-8]"
|
"USBWX_[0-8]"
|
||||||
@ -311,6 +318,15 @@ my @usbtable = (
|
|||||||
request => pack("H*", "8105044fc90185"), # get fhtbuf
|
request => pack("H*", "8105044fc90185"), # get fhtbuf
|
||||||
response => "^\x81........",
|
response => "^\x81........",
|
||||||
define => "FHZ_PARAM FHZ DEVICE", },
|
define => "FHZ_PARAM FHZ DEVICE", },
|
||||||
|
|
||||||
|
{ NAME => "TRX",
|
||||||
|
matchList => ["cu.usbserial(.*)", "ttyUSB(.*)"],
|
||||||
|
DeviceName=> "DEVICE\@38400",
|
||||||
|
init => pack("H*", "0D00000000000000000000000000"), # Reset
|
||||||
|
request => pack("H*", "0D00000102000000000000000000"), # GetStatus
|
||||||
|
response => "^\x0d\x01\x00...........",
|
||||||
|
define => "TRX_PARAM TRX DEVICE\@38400", },
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -390,6 +406,12 @@ CommandUsb($$)
|
|||||||
goto NEXTDEVICE;
|
goto NEXTDEVICE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Send reset (optional)
|
||||||
|
if(defined($thash->{init})) {
|
||||||
|
DevIo_SimpleWrite($hash, $thash->{init}, 0);
|
||||||
|
DevIo_TimeoutRead($hash, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
# Clear the USB buffer
|
# Clear the USB buffer
|
||||||
DevIo_SimpleWrite($hash, $thash->{flush}, 0) if($thash->{flush});
|
DevIo_SimpleWrite($hash, $thash->{flush}, 0) if($thash->{flush});
|
||||||
DevIo_TimeoutRead($hash, 0.1);
|
DevIo_TimeoutRead($hash, 0.1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user