14_Hideki.pm 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. ##############################################
  2. # $Id: 14_Hideki.pm 16935 2018-07-02 20:22:34Z Sidey $
  3. # The file is taken from the SIGNALduino project
  4. # see http://www.fhemwiki.de/wiki/SIGNALduino
  5. # and was modified by a few additions
  6. # to support Hideki Sensors
  7. # S. Butzek, HJGode, Ralf9 2015-2017
  8. #
  9. # changed the way crc and decrypt is used hjgode 20171129
  10. package main;
  11. use strict;
  12. use warnings;
  13. use POSIX;
  14. #use Data::Dumper;
  15. #####################################
  16. sub
  17. Hideki_Initialize($)
  18. {
  19. my ($hash) = @_;
  20. $hash->{Match} = "^P12#75[A-F0-9]{17,30}"; # Laenge (Anhahl nibbles nach 0x75 )noch genauer spezifizieren
  21. $hash->{DefFn} = "Hideki_Define";
  22. $hash->{UndefFn} = "Hideki_Undef";
  23. $hash->{AttrFn} = "Hideki_Attr";
  24. $hash->{ParseFn} = "Hideki_Parse";
  25. $hash->{AttrList} = "IODev do_not_notify:0,1 showtime:0,1"
  26. ." ignore:0,1"
  27. ." windDirCorr windSpeedCorr"
  28. ." $readingFnAttributes";
  29. $hash->{AutoCreate}=
  30. { "Hideki.*" => { ATTR => "event-min-interval:.*:300 event-on-change-reading:.*", FILTER => "%NAME", GPLOT => "temp4hum4:Temp/Hum,", autocreateThreshold => "2:180"} };
  31. }
  32. #####################################
  33. sub
  34. Hideki_Define($$)
  35. {
  36. my ($hash, $def) = @_;
  37. my @a = split("[ \t][ \t]*", $def);
  38. return "wrong syntax: define <name> Hideki <code>".int(@a)
  39. if(int(@a) < 3);
  40. $hash->{CODE} = $a[2];
  41. $hash->{lastMSG} = "";
  42. my $name= $hash->{NAME};
  43. $modules{Hideki}{defptr}{$a[2]} = $hash;
  44. #$hash->{STATE} = "Defined";
  45. #AssignIoPort($hash);
  46. return undef;
  47. }
  48. #####################################
  49. sub
  50. Hideki_Undef($$)
  51. {
  52. my ($hash, $name) = @_;
  53. delete($modules{Hideki}{defptr}{$hash->{CODE}}) if($hash && $hash->{CODE});
  54. return undef;
  55. }
  56. #####################################
  57. sub
  58. Hideki_Parse($$)
  59. {
  60. my ($iohash,$msg) = @_;
  61. my (undef ,$rawData) = split("#",$msg);
  62. my $name = $iohash->{NAME};
  63. my @a = split("", $msg);
  64. Log3 $iohash, 4, "$name Hideki_Parse: incomming $msg";
  65. my @decodedData;
  66. my $crc1crc2OK = 0;
  67. ($crc1crc2OK, @decodedData) = decryptAndCheck($iohash, $rawData); # use unencrypted rawdata
  68. if ($crc1crc2OK == 0) {
  69. return ''; #crc1 or crc2 failed
  70. }
  71. # decrypt and decodedBytes are now done with decryptAndCheck
  72. my $decodedString = join '', unpack('H*', pack('C*',@decodedData)); # get hex string
  73. Log3 $iohash, 4, "$name Hideki_Parse: raw=$rawData, decoded=$decodedString";
  74. if (!@decodedData) {
  75. Log3 $iohash, 4, "$name Hideki_Parse: decrypt failed";
  76. return '';
  77. }
  78. Log3 $iohash, 5, "$name Hideki_Parse: getSensorType for ".$decodedData[3];
  79. my $sensorTyp=($decodedData[3] & 0x1F);
  80. Log3 $iohash, 4, "$name Hideki_Parse: SensorTyp = $sensorTyp decodedString = $decodedString";
  81. my $id=substr($decodedString,2,2); # get the random id from the data
  82. my $channel=0;
  83. my $temp="";
  84. my $hum=0;
  85. my $rain=0;
  86. my $unknown=0;
  87. my $windchill=0;
  88. my $windspeed=0;
  89. my $windgust=0;
  90. my $winddir=0;
  91. my $winddirdeg=0;
  92. my $winddirtext;
  93. my $rc;
  94. my $val;
  95. my $bat;
  96. my $deviceCode;
  97. my $model= "Hideki_$sensorTyp";
  98. my $count=0;
  99. my $comfort=0;
  100. ## 1. Detect what type of sensor we have, then call specific function to decode
  101. if ($sensorTyp==30){
  102. ($channel, $temp) = decodeThermo(\@decodedData); # decodeThermoHygro($decodedString);
  103. $hum = 10 * ($decodedData[6] >> 4) + ($decodedData[6] & 0x0f);
  104. $bat = ($decodedData[2] >> 6 == 3) ? 'ok' : 'low'; # decode battery
  105. $count = $decodedData[3] >> 6; # verifiziert, MSG_Counter
  106. $comfort = ($decodedData[7] >> 2 & 0x03); # comfort level
  107. if ($comfort == 0) { $comfort = 'Hum. OK. Temp. uncomfortable (>24.9 or <20)' }
  108. elsif ($comfort == 1) { $comfort = 'Wet. More than 69% RH' }
  109. elsif ($comfort == 2) { $comfort = 'Dry. Less than 40% RH' }
  110. elsif ($comfort == 3) { $comfort = 'Temp. and Hum. comfortable' }
  111. $val = "T: $temp H: $hum";
  112. Log3 $iohash, 4, "$name decoded Hideki protocol model=$model, sensor id=$id, channel=$channel, cnt=$count, bat=$bat, temp=$temp, humidity=$hum, comfort=$comfort";
  113. }elsif($sensorTyp==31){
  114. ($channel, $temp) = decodeThermo(\@decodedData);
  115. $bat = ($decodedData[2] >> 6 == 3) ? 'ok' : 'low'; # decode battery
  116. $count = $decodedData[3] >> 6; # verifiziert, MSG_Counter
  117. $val = "T: $temp";
  118. Log3 $iohash, 4, "$name decoded Hideki protocol model=$model, sensor id=$id, channel=$channel, cnt=$count, bat=$bat, temp=$temp";
  119. }elsif($sensorTyp==14){
  120. ($channel, $rain) = decodeRain(\@decodedData); # decodeThermoHygro($decodedString);
  121. $bat = ($decodedData[2] >> 6 == 3) ? 'ok' : 'low'; # decode battery
  122. $count = $decodedData[3] >> 6; # UNVERIFIZIERT, MSG_Counter
  123. $val = "R: $rain";
  124. Log3 $iohash, 4, "$name decoded Hideki protocol model=$model, sensor id=$id, channel=$channel, cnt=$count, bat=$bat, rain=$rain, unknown=$unknown";
  125. }elsif($sensorTyp==12){
  126. ($channel, $temp) = decodeThermo(\@decodedData); # decodeThermoHygro($decodedString);
  127. ($windchill,$windspeed,$windgust,$winddir,$winddirdeg,$winddirtext) = wind(\@decodedData);
  128. $bat = ($decodedData[2] >> 6 == 3) ? 'ok' : 'low'; # decode battery
  129. $count = $decodedData[3] >> 6; # UNVERIFIZIERT, MSG_Counter
  130. $val = "T: $temp Ws: $windspeed Wg: $windgust Wd: $winddirtext";
  131. Log3 $iohash, 4, "$name decoded Hideki protocol model=$model, sensor id=$id, channel=$channel, cnt=$count, bat=$bat, temp=$temp, Wc=$windchill, Ws=$windspeed, Wg=$windgust, Wd=$winddir, WdDeg=$winddirdeg, Wdtxt=$winddirtext";
  132. }elsif($sensorTyp==13){
  133. ($channel, $temp) = decodeThermo(\@decodedData); # decodeThermoHygro($decodedString);
  134. $bat = ($decodedData[2] >> 6 == 3) ? 'ok' : 'low'; # decode battery
  135. $count = $decodedData[3] >> 6; # UNVERIFIZIERT, MSG_Counter
  136. $val = "T: $temp";
  137. Log3 $iohash, 4, "$name decoded Hideki protocol model=$model, sensor id=$id, channel=$channel, cnt=$count, bat=$bat, temp=$temp";
  138. Log3 $iohash, 4, "$name Sensor Typ $sensorTyp currently not full supported, please report sensor information!";
  139. }
  140. else{
  141. Log3 $iohash, 4, "$name Sensor Typ $sensorTyp not supported, please report sensor information!";
  142. return "";
  143. }
  144. my $longids = AttrVal($iohash->{NAME},'longids',0);
  145. if ( ($longids ne "0") && ($longids eq "1" || $longids eq "ALL" || (",$longids," =~ m/,$model,/)))
  146. {
  147. $deviceCode=$model . "_" . $id . "." . $channel;
  148. Log3 $iohash,4, "$name Hideki_Parse: using longid: $longids model: $model";
  149. } else {
  150. $deviceCode = $model . "_" . $channel;
  151. }
  152. Log3 $iohash, 5, "$name Hideki_Parse deviceCode: $deviceCode";
  153. my $def = $modules{Hideki}{defptr}{$iohash->{NAME} . "." . $deviceCode};
  154. $def = $modules{Hideki}{defptr}{$deviceCode} if(!$def);
  155. if(!$def) {
  156. Log3 $iohash, 1, "$name Hideki: UNDEFINED sensor $deviceCode detected, code $msg";
  157. return "UNDEFINED $deviceCode Hideki $deviceCode";
  158. }
  159. my $hash = $def;
  160. $name = $hash->{NAME};
  161. return "" if(IsIgnored($name));
  162. #Log3 $name, 4, "Hideki: $name ($msg)";
  163. my $WindSpeedCorr = AttrVal($name,"windSpeedCorr",0);
  164. if ($WindSpeedCorr > 0 && $sensorTyp == 12) {
  165. $windspeed = sprintf("%.2f", $windspeed * $WindSpeedCorr);
  166. $windgust = sprintf("%.2f", $windgust * $WindSpeedCorr);
  167. Log3 $name, 4, "$name Hideki_Parse: WindSpeedCorr=$WindSpeedCorr, WindSpeed=$windspeed, WindGust=$windgust";
  168. }
  169. if (!defined(AttrVal($hash->{NAME},"event-min-interval",undef)))
  170. {
  171. my $minsecs = AttrVal($iohash->{NAME},'minsecs',0);
  172. if($hash->{lastReceive} && (time() - $hash->{lastReceive} < $minsecs)) {
  173. Log3 $iohash, 4, "$name Hideki_Parse: $deviceCode Dropped ($decodedString) due to short time. minsecs=$minsecs";
  174. return "";
  175. }
  176. }
  177. $hash->{lastReceive} = time();
  178. $def->{lastMSG} = $decodedString;
  179. #Log3 $name, 4, "Hideki update $name:". $name;
  180. readingsBeginUpdate($hash);
  181. readingsBulkUpdate($hash, "state", $val);
  182. readingsBulkUpdate($hash, "battery", $bat) if ($bat ne "");
  183. readingsBulkUpdate($hash, "batteryState", $bat) if ($bat ne "");
  184. readingsBulkUpdate($hash, "channel", $channel) if ($channel ne "");
  185. readingsBulkUpdate($hash, "temperature", $temp) if ($temp ne "");
  186. readingsBulkUpdate($hash, "package_number", $count) if ($count ne "");
  187. if ($sensorTyp == 30) { # temperature, humidity
  188. readingsBulkUpdate($hash, "humidity", $hum) if ($hum ne "");
  189. readingsBulkUpdate($hash, "comfort_level", $comfort) if ($comfort ne "");
  190. }
  191. elsif ($sensorTyp == 14) { # rain
  192. readingsBulkUpdate($hash, "rain", $rain);
  193. }
  194. elsif ($sensorTyp == 12) { # wind
  195. readingsBulkUpdate($hash, "windChill", $windchill);
  196. readingsBulkUpdate($hash, "windGust", $windgust);
  197. readingsBulkUpdate($hash, "windSpeed", $windspeed);
  198. readingsBulkUpdate($hash, "windDirection", $winddir);
  199. readingsBulkUpdate($hash, "windDirectionDegree", $winddirdeg);
  200. readingsBulkUpdate($hash, "windDirectionText", $winddirtext);
  201. }
  202. readingsEndUpdate($hash, 1); # Notify is done by Dispatch
  203. return $name;
  204. }
  205. # decryptAndCheck
  206. # input is raw data (array of bytes)
  207. # output is true if check1 and check2 OK
  208. # data will then hold the decrypted data
  209. sub decryptAndCheck {
  210. my $iohash = shift;
  211. my $rawData = shift;
  212. my $name = $iohash->{NAME};
  213. my $cs1=0; #will be zero for xor over all (bytes[2]>>1)&0x1F except first byte (always 0x75)
  214. my $cs2=0;
  215. my $i;
  216. my @data;
  217. @data=map { hex($_) } ($rawData =~ /(..)/g); #byte array from raw hex data string
  218. #/* Decrypt raw received data byte */ BYTE DecryptByte(BYTE b) { return b ^ (b << 1); }
  219. my $count=( ($data[2] ^ ($data[2]<<1)) >>1 ) & 0x1f;
  220. my $L = scalar @data;
  221. if ($L <= $count+2) {
  222. Log3 $iohash, 4, "$name Hideki_crc: rawdata=$rawData to short, count=$count data length=$L";
  223. return (0,@data);
  224. }
  225. if($data[0] != 0x75) {
  226. Log3 $iohash, 4, "$name Hideki_Parse: rawData=$rawData is no Hideki";
  227. return (0,@data);
  228. }
  229. #iterate over data only, first byte is 0x75 always
  230. # read bytes 1 to n-2 , just before checksum
  231. for ($i=1; $i<($count+2); $i++) {
  232. $cs1 ^= $data[$i]; # calc first chksum
  233. $cs2 = Hideki_SecondCheck($data[$i] ^ $cs2);
  234. $data[$i] ^= (($data[$i] << 1) & 0xFF); # decrypt byte at $i without overflow
  235. }
  236. $count += 2;
  237. if ($cs1 != 0 || $cs2 != $data[$count]) {
  238. Log3 $iohash, 4, "$name Hideki crcCheck FAILED: cs1 / cs2/checksum2 $cs1 / $cs2/$data[$count], rawData=$rawData, count+2=$count, length=$L";
  239. return (0, @data);
  240. } else {
  241. Log3 $iohash, 4, "$name Hideki crcCheck ok: cs1/cs2 $cs1/$cs2, rawData=$rawData, count+2=$count, length=$L";
  242. }
  243. return (1, @data);
  244. }
  245. # /* The second checksum. Input is OldChecksum^NewByte */
  246. sub Hideki_SecondCheck{
  247. my $b = shift;
  248. my $c = 0;
  249. if (($b & 0x80) == 0x80){
  250. $b^=0x95;
  251. }
  252. $c = $b^($b>>1);
  253. if (($b & 1) == 1){
  254. $c^=0x5f;
  255. }
  256. if (($c & 1) == 1){
  257. $b^=0x5f;
  258. }
  259. return ($b^($c>>1));
  260. }
  261. # return decoded sensor type
  262. # in: one byte
  263. # out: one byte
  264. # Der Typ eines Sensors steckt in Byte 3:
  265. # Byte3 & 0x1F Device
  266. # 0x0C Anemometer
  267. # 0x0D UV sensor
  268. # 0x0E Rain level meter
  269. # 0x1E Thermo/hygro-sensor
  270. # 0x1F Thermo sensor
  271. sub getSensorType{
  272. return ($_[0] & 0x1F);
  273. }
  274. # decode byte array and return channel, temperature
  275. # input: decrypted byte array starting with 0x75, passed by reference as in mysub(\@array);
  276. # output <return code>, <channel>, <temperature>
  277. # was unable to get this working with an array ref as input, so switched to hex string input
  278. sub decodeThermo {
  279. my @Hidekibytes = @{$_[0]};
  280. #my $Hidekihex = shift;
  281. #my @Hidekibytes=();
  282. #for (my $i=0; $i<(length($Hidekihex))/2; $i++){
  283. # my $hex=hex(substr($Hidekihex, $i*2, 2)); ## Mit split und map geht es auch ... $str =~ /(..?)/g;
  284. # push (@Hidekibytes, $hex);
  285. #}
  286. my $channel=0;
  287. my $temp=0;
  288. $channel = $Hidekibytes[1] >> 5;
  289. # //Internally channel 4 is used for the other sensor types (rain, uv, anemo).
  290. # //Therefore, if channel is decoded 5 or 6, the real value set on the device itself is 4 resp 5.
  291. if ($channel >= 5) {
  292. $channel--;
  293. }
  294. my $sensorId = $Hidekibytes[1] & 0x1f; # Extract random id from sensor
  295. #my $devicetype = $Hidekibytes[3]&0x1f;
  296. $temp = 100 * ($Hidekibytes[5] & 0x0f) + 10 * ($Hidekibytes[4] >> 4) + ($Hidekibytes[4] & 0x0f);
  297. ## // temp is negative?
  298. if (!($Hidekibytes[5] & 0x80)) {
  299. $temp = -$temp;
  300. }
  301. $temp = $temp / 10;
  302. return ($channel, $temp);
  303. }
  304. # decode byte array and return channel and total rain in mm
  305. # input: decrypted byte array starting with 0x75, passed by reference as in mysub(\@array);
  306. # output <return code>, <channel>, <totalrain>
  307. # was unable to get this working with an array ref as input, so switched to hex string input
  308. sub decodeRain {
  309. my @Hidekibytes = @{$_[0]};
  310. #my $Hidekihex = shift;
  311. #my @Hidekibytes=();
  312. #for (my $i=0; $i<(length($Hidekihex))/2; $i++){
  313. # my $hex=hex(substr($Hidekihex, $i*2, 2)); ## Mit split und map geht es auch ... $str =~ /(..?)/g;
  314. # push (@Hidekibytes, $hex);
  315. #}
  316. my $channel=0;
  317. my $rain=0;
  318. my $unknown;
  319. #my $tests=0;
  320. #additional checks?
  321. #if($Hidekibytes[2]==0xCC){
  322. # $tests+=1;
  323. #}
  324. #if($Hidekibytes[6]==0x66){
  325. # $tests+=1;
  326. #}
  327. # possibly test if $tests==2 for sanity check
  328. #printf("SANITY CHECK tests=%i\n", $tests);
  329. $unknown = $Hidekibytes[6];
  330. $channel = $Hidekibytes[1] >> 5;
  331. # //Internally channel 4 is used for the other sensor types (rain, uv, anemo).
  332. # //Therefore, if channel is decoded 5 or 6, the real value set on the device itself is 4 resp 5.
  333. if ($channel >= 5) {
  334. $channel--;
  335. }
  336. my $sensorId = $Hidekibytes[1] & 0x1f; # Extract random id from sensor
  337. $rain = ($Hidekibytes[4] + $Hidekibytes[5]*0xff)*0.7;
  338. return ($channel, $rain, $unknown);
  339. }
  340. # P12#758BB244074007400F00001C6E7A01
  341. sub wind {
  342. my @Hidekibytes = @{$_[0]};
  343. my @winddir_name=("N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW");
  344. my $windspeed;
  345. my $windchill;
  346. my $windgust;
  347. my $winddir;
  348. my $winddirdeg;
  349. my $winddirtext;
  350. $windchill = 100 * ($Hidekibytes[7] & 0x0f) + 10 * ($Hidekibytes[6] >> 4) + ($Hidekibytes[6] & 0x0f);
  351. ## windchill is negative?
  352. if (!($Hidekibytes[7] & 0x80)) {
  353. $windchill = -$windchill;
  354. }
  355. $windchill = $windchill / 10;
  356. $windspeed = ($Hidekibytes[9] & 0x0f ) * 100 + ($Hidekibytes[8] >> 4) * 10 + ($Hidekibytes[8] & 0x0f);
  357. $windgust = ($Hidekibytes[10] >> 4) * 100 + ($Hidekibytes[10] & 0x0f) * 10 + ($Hidekibytes[9] >> 4);
  358. $winddir = ($Hidekibytes[11] >> 4);
  359. $winddirtext = $winddir_name[$winddir];
  360. $winddirdeg = $winddir * 22.5;
  361. return ($windchill,$windspeed,$windgust,$winddir,$winddirdeg,$winddirtext);
  362. }
  363. sub
  364. Hideki_Attr(@)
  365. {
  366. my @a = @_;
  367. # Make possible to use the same code for different logical devices when they
  368. # are received through different physical devices.
  369. return if($a[0] ne "set" || $a[2] ne "IODev");
  370. my $hash = $defs{$a[1]};
  371. my $iohash = $defs{$a[3]};
  372. my $cde = $hash->{CODE};
  373. delete($modules{Hideki}{defptr}{$cde});
  374. $modules{Hideki}{defptr}{$iohash->{NAME} . "." . $cde} = $hash;
  375. return undef;
  376. }
  377. 1;
  378. =pod
  379. =item summary Supports various rf sensors with hideki protocol
  380. =item summary_DE Unterst&uumltzt verschiedenen Funksensoren mit hideki Protokol
  381. =begin html
  382. <a name="Hideki"></a>
  383. <h3>Hideki</h3>
  384. <ul>
  385. The Hideki module is a module for decoding weather sensors, which use the hideki protocol. Known brands are Bresser, Cresta, TFA and Hama.
  386. <br><br>
  387. <a name="Hideki_define"></a>
  388. <b>Supported Brands</b>
  389. <ul>
  390. <li>Hama</li>
  391. <li>Bresser</li>
  392. <li>TFA Dostman</li>
  393. <li>Arduinos with remote Sensor lib from Randy Simons</li>
  394. <li>Cresta</li>
  395. <li>Hideki (Anemometer | UV sensor | Rain level meter | Thermo/hygro-sensor)</li>
  396. <li>all other devices, which use the Hideki protocol</li>
  397. </ul>
  398. Please note, currently temp/hum devices are implemented. Please report data for other sensortypes.
  399. <a name="Hideki_define"></a>
  400. <b>Define</b>
  401. <ul>
  402. <code>define &lt;name&gt; Hideki &lt;code&gt; </code> <br>
  403. <br>
  404. &lt;code&gt; is the address of the sensor device and
  405. is build by the sensor type and the channelnumber (1 to 5) or if the attribute longid is specfied an autogenerated address build when inserting
  406. the battery (this adress will change every time changing the battery).<br>
  407. If autocreate is enabled, the device will be defined via autocreate. This is also the preferred mode of defining such a device.
  408. </ul>
  409. <a name="Hideki_readings"></a>
  410. <b>Generated readings</b>
  411. <ul>
  412. <li>state (T:x H:y B:z)</li>
  413. <li>temperature (&deg;C)</li>
  414. <li>humidity (0-100)</li>
  415. <li>battery (ok or low)</li>
  416. <li>channel (The Channelnumber (number if)</li>
  417. <br><i>- Hideki only -</i>
  418. <li>comfort_level (Status: Humidity OK... , Wet. More than 69% RH, Dry. Less than 40% RH, Temperature and humidity comfortable)</li>
  419. <li>package_number (reflect the package number in the stream starting at 1)</li><br>
  420. </ul>
  421. <a name="Hideki_unset"></a>
  422. <b>Set</b> <ul>N/A</ul><br>
  423. <a name="Hideki_unget"></a>
  424. <b>Get</b> <ul>N/A</ul><br>
  425. <a name="Hideki_attr"></a>
  426. <b>Attributes</b>
  427. <ul>
  428. <li><a href="#do_not_notify">do_not_notify</a></li>
  429. <li><a href="#eventMap">eventMap</a></li>
  430. <li><a href="#ignore">ignore</a></li>
  431. <li><a href="#showtime">showtime</a></li>
  432. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  433. </ul>
  434. <br>
  435. </ul>
  436. =end html
  437. =begin html_DE
  438. <a name="Hideki"></a>
  439. <h3>Hideki</h3>
  440. <ul>
  441. Das Hideki module dekodiert empfangene Nachrichten von Wettersensoren, welche das Hideki Protokoll verwenden.
  442. <br><br>
  443. <a name="Hideki_define"></a>
  444. <b>Unterstuetzte Hersteller</b>
  445. <ul>
  446. <li>Hama</li>
  447. <li>Bresser</li>
  448. <li>TFA Dostman</li>
  449. <li>Arduinos with remote Sensor lib from Randy Simons</li>
  450. <li>Cresta</li>
  451. <li>Hideki (Anemometer | UV sensor | Rain level meter | Thermo/hygro-sensor)</li>
  452. <li>Alle anderen, welche das Hideki Protokoll verwenden</li>
  453. </ul>
  454. Hinweis, Aktuell sind nur temp/feuchte Sensoren implementiert. Bitte sendet uns Daten zu anderen Sensoren.
  455. <a name="Hideki_define"></a>
  456. <b>Define</b>
  457. <ul>
  458. <li><code>define &lt;name&gt; Hideki &lt;code&gt; </code></li>
  459. <li>
  460. <br>
  461. &lt;code&gt; besteht aus dem Sensortyp und der Kanalnummer (1..5) oder wenn das Attribut longid im IO Device gesetzt ist aus einer Zufallsadresse, die durch den Sensor beim einlegen der
  462. Batterie generiert wird (Die Adresse aendert sich bei jedem Batteriewechsel).<br>
  463. </li>
  464. <li>Wenn autocreate aktiv ist, dann wird der Sensor automatisch in FHEM angelegt. Das ist der empfohlene Weg, neue Sensoren hinzuzuf&uuml;gen.</li>
  465. </ul>
  466. <br>
  467. <a name="Hideki_readings"></a>
  468. <b>Generated Readings</b>
  469. <ul>
  470. <li>state (T:x H:y B:z)</li>
  471. <li>temperature (&deg;C)</li>
  472. <li>humidity (0-100)</li>
  473. <li>battery (ok oder low)</li>
  474. <li>channel (Der Sensor Kanal)</li>
  475. <br><i>- Hideki spezifisch -</i>
  476. <li>comfort_level (Status: Humidity OK... , Wet gr&ouml;&szlig;er 69% RH, Dry weiniger als 40% RH, Temperature and humidity comfortable)</li>
  477. <li>package_number (Paketnummer in der letzten Signalfolge, startet bei 1)</li><br>
  478. </ul>
  479. <a name="Hideki_unset"></a>
  480. <b>Set</b> <ul>N/A</ul><br>
  481. <a name="Hideki_unget"></a>
  482. <b>Get</b> <ul>N/A</ul><br>
  483. <a name="Hideki_attr"></a>
  484. <b>Attribute</b>
  485. <ul>
  486. <li><a href="#do_not_notify">do_not_notify</a></li>
  487. <li><a href="#eventMap">eventMap</a></li>
  488. <li><a href="#ignore">ignore</a></li>
  489. <li><a href="#showtime">showtime</a></li>
  490. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  491. </ul>
  492. <br>
  493. </ul>
  494. =end html_DE
  495. =cut