70_WINCONNECT.pm 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055
  1. # $Id: 70_WINCONNECT.pm 15003 2017-09-04 21:22:16Z michael.winkler $
  2. ############################################################################
  3. # 2017-09-04, v0.0.23
  4. #
  5. # v0.0.23
  6. # - BUFIX: [FEHMModul] - Download gitlab GUI
  7. # - CHANGE [FEHMModul] - Download Timeout WinControl.exe = 30
  8. # - FEATURE: [WinWebGUI] - NotifyIcon - Kontextmenü
  9. #
  10. # v0.0.22
  11. # - BUFIX: [FEHMModul] - Überreste Attribut "http-noshutdown" entfernt
  12. # - FEATURE: [FEHMModul] - Attribut "autoupdatewincontrol:0,1" Standard = 1 / 0 = Hier kann das automatische GUI Update deaktiviert werden.
  13. # - CHANGE [WinWebGUI] - Autoupdate über Attribut steuerbar
  14. #
  15. # v0.0.21
  16. # - BUFIX: [WinWebGUI] - FHEM Server Connect / Reconnect
  17. # [WinWebGUI] - shutdown / standby / hibernate
  18. # [WinWebGUI] - accept trusted SSL certificat
  19. # [WinWebGUI] - battery_ChargeStatus 0 ersetzt in Middle
  20. # - CHANGE [WinWebGUI] - Autoupdate immer angeschalten
  21. # [WinWebGUI] - select SSL protocols ssl3, tls, tlsv11, tlsv12
  22. # - FEATURE: [WinWebGUI] - Icon FHEM Connect = blau
  23. # Icon FHEM Disconnect = rot
  24. # Icon FHEM Wrong Device = gelb
  25. # [WinWebGUI] - FQDN oder Netbios Name as FHEM Server
  26. # [WinWebGUI] - Support button / collect support informations
  27. # [WinWebGUI] - WMI Abfragen / WMI Wizard
  28. # [WinWebGUI] - Support Core Temp
  29. #
  30. # v0.0.20
  31. # - BUFIX: [FEHMModul] - $_ ersetzt durch $uResult
  32. # [FEHMModul] - reading "memory_available" und "memory_total" ohne Zusatz MB
  33. # [WinWebGUI] - Exit Messagebox entfernt
  34. # - FEATURE: [WinWebGUI] - Exit Menübutton
  35. #
  36. # v0.0.18
  37. # - BUFIX: [WinWebGUI] - Autoupdate
  38. # [WinWebGUI] - Shutdown Messagebox
  39. #
  40. # v0.0.17
  41. # - BUFIX: [FEHMModul] - Code Optimierungen
  42. # - CHANGE [WinWebGUI] - FHEM Devicename check auf Gültigkeit https://forum.fhem.de/index.php/topic,59251.msg667257.html#msg667257
  43. # - FEATURE: [WinWebGUI] - Fenster verstecken https://forum.fhem.de/index.php/topic,59251.msg665863.html#msg665863
  44. #
  45. # v0.0.16 erste SVN Version
  46. # - BUFIX: Refresh CSRFTOKEN nach einem reconnect
  47. # Readings zurücksetzen wenn Offline
  48. # os_RunTime_days,os_RunTime_hours und os_RunTime_minutes
  49. # printer_aktiv und printer_names
  50. # div. Optimierungen
  51. # - FEATURE Attribut "win_resetreadings:0,1" Standard = 1 / 1 = Readings zurücksetzen wenn Offline
  52. # Attribut "autoupdategitlab:0,1" Standard = 1 / 0 = Hier kann der automatische Download deaktiviert werden.
  53. # - CHANGE Attribut "http-noshutdown" Auf Standwardwert "0" gesetzt
  54. #
  55. # v0.0.15
  56. # - BUFIX: Start optimiert / Log sortiert
  57. #
  58. # v0.0.14
  59. # - FEATURE: Winconnect mit Windows starten
  60. # Ausführen (minimiert/normales Fenster)
  61. # checkprocess (prüft ob ein Prozess gestartet ist inkl. Anzahl)
  62. # wincontrol.exe.config wird nicht mehr benötigt
  63. # Windows Version (os_Version & os_ReleaseID ab Win10)
  64. # Benutzer / Hostname (os_Username, os_Computername & os_Domainname)
  65. # Performance: CPU, Festplatte, Netzwerk, RAM, …
  66. # Hardware Ausrüstung: Prozessor, BIOS & RAM (memory_*, bios_* und cpu_*)
  67. # VolumeDown, VolumeUp (mit attr volumeStep)
  68. # Laufzeiten in Tage/Stunden/Minuten (os_RunTime_minutes, os_RunTime_hours und os_RunTime_days)
  69. # - BUFIX: checkservice (im FHEM Reading wurde immer nur der erste Service eingetragen)
  70. #
  71. # v0.0.13
  72. # - FEATURE: Performance Optimierungen
  73. # set powermode add(standby/hibernate)
  74. # drive informations (Space in MB/change only > 10MB)
  75. # - BUFIX: div.
  76. # Programmabsturtz nach ca. 4-5 Tagen
  77. #
  78. # v0.0.12
  79. # - FEATURE: CSRFToken
  80. # - BUFIX: Detect Audio Sound
  81. #
  82. # v0.0.11
  83. # - FEATURE: ttsmsg play sound
  84. # messagebox play sound
  85. # set camera (on/off)
  86. # make picture (camera)
  87. # motion detect (camera)
  88. # Update Winconnect.exe (inkl. autoupdate)
  89. # microphone sound detection
  90. # Startscreen
  91. # - BUFIX: .NET Fehlermeldung
  92. # set screen on
  93. # set screen off
  94. # - Readings: audio_devicename
  95. # microphone_devicename
  96. #
  97. # v0.0.10
  98. # - FEATURE: send notifymsg (set notifymsg Ballon Tip)
  99. # send messagebox (set messagebox)
  100. # Verzeichnis überwachen
  101. # set powermode (shutdown/restart)
  102. #
  103. # v0.0.9
  104. # - FEATURE: FHEM SSL
  105. #
  106. # v0.0.8
  107. # - FEATURE: FHEM Anmeldung (basicAuth)
  108. # volume mute (on/off)
  109. # - BUGFIX: statusrequest (firststart)
  110. # - Readings: speecherrormessage
  111. # speecherrormessagequality
  112. # speechmessagequality
  113. # mute
  114. #
  115. # v0.0.7 - 20161107
  116. # - BUGFIX: Umlaute beim senden einer ttsmsg
  117. # - FEATURE: set commandhide
  118. # set user_aktividletime
  119. # printer_aktiv
  120. # Spracherkennung
  121. #
  122. # v0.0.6 - 20161025
  123. # - BUFIX: no audiodevice
  124. # - FEATURE: set brightness 0 - 100
  125. #
  126. # v0.0.5 - 20161024
  127. # - BUGFIX
  128. #
  129. # v0.0.4 - 20161024
  130. # - BUGFIX: (Bereinigung wincontrol / FHEM readings)
  131. # - FEATURE: send ttsmsg (TextToSpeech)
  132. # - Readings: os_StartTime = Startzeit Windows
  133. # wincontrol_starttime = Startzeit WinControl
  134. # wincontrol_user = Benutzer der Wintrol gestartet hat
  135. # battery_ChargeStatus
  136. # battery_LifePercent
  137. # battery_LifeRemainingsMin
  138. # battery_PowerLineStatus
  139. #
  140. # v0.0.3 - 20161020
  141. # - FEATURE: set command
  142. # set showfile
  143. # set checkservice
  144. #
  145. # v0.0.0 - 20161018
  146. # - FEATURE: ON/OFF Windows Screen
  147. # set volume
  148. # detect playing audio
  149. #
  150. # Copyright by Michael Winkler
  151. # e-mail: michael.winkler at online.de
  152. #
  153. # This file is part of fhem.
  154. #
  155. # Fhem is free software: you can redistribute it andor modify
  156. # it under the terms of the GNU General Public License as published by
  157. # the Free Software Foundation, either version 2 of the License, or
  158. # (at your option) any later version.
  159. #
  160. # Fhem is distributed in the hope that it will be useful,
  161. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  162. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  163. # GNU General Public License for more details.
  164. #
  165. # You should have received a copy of the GNU General Public License
  166. # along with fhem. If not, see <http://www.gnu.org/licenses/>.
  167. #
  168. ##############################################################################
  169. package main;
  170. use strict;
  171. use warnings;
  172. use HttpUtils;
  173. use Time::Piece;
  174. sub WINCONNECT_Set($@);
  175. sub WINCONNECT_GetStatus($;$);
  176. sub WINCONNECT_Define($$);
  177. sub WINCONNECT_Undefine($$);
  178. # Autoupdateinformationen
  179. my $DownloadURL = "https://gitlab.com/michael.winkler/winconnect/raw/master/WinControl_0.0.23.exe";
  180. my $DownloadVer = "0.0.23";
  181. my $DownloadError = "";
  182. ###################################
  183. sub WINCONNECT_Initialize($) {
  184. my ($hash) = @_;
  185. Log3 $hash, 5, "WINCONNECT_Initialize: Entering";
  186. $hash->{SetFn} = "WINCONNECT_Set";
  187. $hash->{DefFn} = "WINCONNECT_Define";
  188. $hash->{UndefFn} = "WINCONNECT_Undefine";
  189. $hash->{AttrList} = "volumeStep win_resetreadings:0,1 disable:0,1 autoupdategitlab:0,1 autoupdatewincontrol:0,1 " . $readingFnAttributes;
  190. return;
  191. }
  192. #####################################
  193. # Get Status
  194. #####################################
  195. sub WINCONNECT_GetStatus($;$) {
  196. my ($hash, $update ) = @_;
  197. my $name = $hash->{NAME};
  198. my $interval = $hash->{INTERVAL};
  199. my $filemtime = "";
  200. if ($DownloadError eq "") {$DownloadError = ReadingsVal( $name, "wincontrol_error", "Start WinControl....." );}
  201. return if ( AttrVal( $name, "disable", 0 ) == 1 );
  202. InternalTimer( gettimeofday() + $interval, "WINCONNECT_GetStatus", $hash, 0 );
  203. my $filename = '././www/winconnect/WinControl.exe';
  204. my $filedir = '././www/winconnect';
  205. if ((-e $filename)) {$filemtime = (stat $filename)[9];}
  206. Log3 $name, 5, "WINCONNECT $name: called function WINCONNECT_GetStatus()";
  207. Log3 $name, 5, "WINCONNECT $name: filename = " . $filename . " filemtime = " . $filemtime;
  208. #Alte Readings bereinigen
  209. print (fhem( "deletereading $name wincontrol_gitlap" )) if ( ReadingsVal( $name, "wincontrol_gitlap", "0" ) ne "0" ) ;
  210. print (fhem( "deletereading $name wincontrol_gitlap_url" )) if ( ReadingsVal( $name, "wincontrol_gitlap_url", "0" ) ne "0" ) ;
  211. readingsBeginUpdate($hash);
  212. #WinControl Versionsinformationen
  213. readingsBulkUpdateIfChanged( $hash, "wincontrol_gitlab", $DownloadVer );
  214. readingsBulkUpdateIfChanged( $hash, "wincontrol_gitlab_url", $DownloadURL);
  215. #WinControl Update Info eintragen
  216. readingsBulkUpdateIfChanged( $hash, "wincontrol_update", $filemtime );
  217. readingsBulkUpdateIfChanged( $hash, "model", ReadingsVal( $name, "os_Name", "unbekannt" ) );
  218. #WinControl Last Error
  219. readingsBulkUpdateIfChanged( $hash, "wincontrol_error", $DownloadError);
  220. readingsEndUpdate( $hash, 1 );
  221. #Autoupdatefile von Gitlab herunterladen
  222. if ($DownloadURL ne '' && !(-e $filename . "_" .$DownloadVer) && AttrVal( $name, "autoupdategitlab", "1" ) ) {
  223. #Verzeichnis anlegen
  224. mkdir($filedir, 0777) unless(-d $filedir );
  225. if(!open (FILE, ">". $filename . "_" .$DownloadVer)) {
  226. $DownloadError = "WINCONNECT [NEW] Download ERROR Can't write = " .$filename . "_" .$DownloadVer . " Error=" .$!;
  227. Log3 $name, 5, $DownloadError;
  228. }else {
  229. print FILE $name;
  230. close (FILE);
  231. #Delete old version
  232. if ((-e $filename)) {unlink $filename}
  233. HttpUtils_NonblockingGet({url=>$DownloadURL, timeout=>30, hash=>$hash, service=>"autoupdate", callback=>\&WINCONNECT_GetNewVersion});
  234. }
  235. }
  236. if ( !$update ) {
  237. WINCONNECT_SendCommand( $hash, "powerstate" );
  238. }
  239. else {
  240. WINCONNECT_SendCommand( $hash, "statusrequest" );
  241. }
  242. return;
  243. }
  244. sub WINCONNECT_GetNewVersion($$$) {
  245. my ($hash, $err, $data) = @_;
  246. my $filename = '././www/winconnect/WinControl.exe';
  247. my $name = $hash->{NAME};
  248. my $CheckFile = $filename . "_" .$DownloadVer;
  249. # Download neue Datei
  250. if(!open(FH, ">$filename")) {
  251. $DownloadError = "Download ERROR Can't write = " .$filename . " Error=" .$!;
  252. Log3 $name, 5, "WINCONNECT [NEW] " .$DownloadError;
  253. #Delete Version Flag
  254. if ((-e $CheckFile)) {unlink $CheckFile}
  255. }else{
  256. print FH $data;
  257. close(FH);
  258. # Prüfen ob die Dateigröße passt!
  259. if ((stat $filename)[7] < 600000) {
  260. #Download fehlgeschlagen!
  261. if ((-e $CheckFile)) {unlink $CheckFile}
  262. $DownloadError = "Download ERROR file to small. Filesize = " . (stat $filename)[7];
  263. Log3 $name, 5, "WINCONNECT [NEW] " .$DownloadError;
  264. }else{
  265. Log3 $name, 0, "WINCONNECT [NEW] Download new version URL = $DownloadURL";
  266. Log3 $name, 0, "WINCONNECT [NEW] Download new version OK";
  267. $DownloadError = "Download new version = $DownloadVer";
  268. }
  269. }
  270. }
  271. ###################################
  272. sub WINCONNECT_SendCommand($$;$$) {
  273. my ( $hash, $service, $cmd ) = @_;
  274. my $name = $hash->{NAME};
  275. my $address = $hash->{helper}{ADDRESS};
  276. my $serviceurl = "";
  277. my $PWRState = ReadingsVal( $name, "state", "" );
  278. my $Winconnect = ReadingsVal( $name, "wincontrol", "statusrequest" );
  279. my $WinconnectUPD = ReadingsVal( $name, "wincontrol_update", "0" );
  280. my $URL;
  281. Log3 $name, 5, "WINCONNECT $name: called function WINCONNECT_SendCommand()";
  282. # Check Service and change serviceurl
  283. if ($service eq "statusrequest") {
  284. $serviceurl = "statusrequest";
  285. }
  286. elsif ($service eq "volume") {
  287. $serviceurl = "volume";
  288. }
  289. elsif ($service eq "file_dir") {
  290. $serviceurl = "file_dir";
  291. }
  292. elsif ($service eq "picture_dir") {
  293. $serviceurl = "picture_dir";
  294. }
  295. elsif ($service eq "camera") {
  296. $serviceurl = "camera";
  297. }
  298. elsif ($service eq "file_order") {
  299. $serviceurl = "file_order";
  300. }
  301. elsif ($service eq "file_filter") {
  302. $serviceurl = "file_filter";
  303. }
  304. elsif ($service eq "mute") {
  305. $serviceurl = "volumemute";
  306. }
  307. elsif ($service eq "speechcommands") {
  308. $serviceurl = "speechcommands";
  309. }
  310. elsif ($service eq "speechquality") {
  311. $serviceurl = "speechquality";
  312. }
  313. elsif ($service eq "brightness") {
  314. $serviceurl = "brightness";
  315. }
  316. elsif ($service eq "user_aktividletime") {
  317. $serviceurl = "user_aktividletime";
  318. }
  319. elsif ($service eq "powerstate") {
  320. if ( AttrVal( $name, "autoupdatewincontrol", 1 ) == 1 ) {$serviceurl = "powerstate" . "=" . $PWRState . ";" . $Winconnect . ";" . $WinconnectUPD;}
  321. else {$serviceurl = "powerstate" . "=" . $PWRState . ";" . $Winconnect . ";0";}
  322. }
  323. elsif ($service eq "command") {
  324. $serviceurl = "command";
  325. }
  326. elsif ($service eq "commandhide") {
  327. $serviceurl = "commandhide";
  328. }
  329. elsif ($service eq "update") {
  330. $serviceurl = "update";
  331. }
  332. elsif ($service eq "checkservice") {
  333. $serviceurl = "checkservice";
  334. }
  335. elsif ($service eq "checkperformance") {
  336. $serviceurl = "checkperformance";
  337. }
  338. elsif ($service eq "checkperformance_interval") {
  339. $serviceurl = "checkperformance_interval";
  340. }
  341. elsif ($service eq "checkprocess") {
  342. $serviceurl = "checkprocess";
  343. }
  344. elsif ($service eq "showfile") {
  345. $serviceurl = "showfile";
  346. }
  347. elsif ($service eq "ttsmsg") {
  348. $serviceurl = "ttsmsg";
  349. }
  350. elsif ($service eq "powermode") {
  351. $serviceurl = "powermode";
  352. }
  353. elsif ($service eq "messagebox") {
  354. $serviceurl = "messagebox";
  355. }
  356. elsif ($service eq "notifymsg") {
  357. $serviceurl = "notifymsg";
  358. }
  359. elsif ($service eq "screenon") {
  360. $serviceurl = "screen=on";
  361. }
  362. elsif ($service eq "picture_make") {
  363. $serviceurl = "picture_make";
  364. }
  365. elsif ($service eq "screenoff") {
  366. $serviceurl = "screen=off";
  367. }
  368. else{
  369. $serviceurl = $service;
  370. }
  371. # URL zusammenbauen
  372. $cmd = ( defined($cmd) ) ? $cmd : "";
  373. $URL = "http://" . $address . ":8183/fhem/" . $serviceurl . $cmd ;
  374. $URL =~ tr/\r\n/|/;
  375. Log3 $name, 6, "WINCONNECT $name: GET " . urlDecode($URL);
  376. HttpUtils_NonblockingGet(
  377. {
  378. url => $URL,
  379. timeout => 10,
  380. noshutdown => 0,
  381. #data => undef, 2017.07.20 - enfernt
  382. hash => $hash,
  383. service => $service,
  384. cmd => $cmd,
  385. #type => $type, 2017.07.20 - enfernt
  386. callback => \&WINCONNECT_ReceiveCommand
  387. }
  388. );
  389. return;
  390. }
  391. ###################################
  392. sub WINCONNECT_Set($@) {
  393. my ( $hash, @a ) = @_;
  394. my $name = $hash->{NAME};
  395. my $state = ReadingsVal( $name, "state", "absent" );
  396. my $cmd = "";
  397. my $Value = "";
  398. my $Count = 0;
  399. my $SetValue = 0;
  400. Log3 $name, 5, "WINCONNECT $name: called function WINCONNECT_Set()";
  401. my $usage = "choose one of volume:slider,0,1,100 mute:on,off camera:on,off powermode:shutdown,restart,standby,hibernate volumeUp:noArg volumeDown:noArg brightness:slider,0,1,100 picture_make:noArg update:noArg speechquality:slider,0,1,100 statusRequest:noArg screenOn:noArg screenOff:noArg command commandhide showfile picture_dir checkperformance_interval checkperformance:textField-long checkservice checkprocess notifymsg messagebox file_dir file_filter file_order:ascending,descending ttsmsg user_aktividletime speechcommands";
  402. return "No Argument given" if ( !defined( $a[1] ) );
  403. # statusRequest
  404. if ( lc( $a[1] ) eq "statusrequest" ) {
  405. Log3 $name, 3, "WINCONNECT set $name " . $a[1];
  406. WINCONNECT_SendCommand( $hash, "statusrequest" );
  407. }
  408. # on
  409. elsif ( lc( $a[1] ) eq "on" ) {
  410. readingsSingleUpdate( $hash, "state", "on",1 );
  411. }
  412. # powerstate
  413. elsif ( lc( $a[1] ) eq "powerstate" ) {
  414. Log3 $name, 3, "WINCONNECT set $name " . $a[1];
  415. WINCONNECT_SendCommand( $hash, "powerstate" );
  416. }
  417. # update
  418. elsif ( lc( $a[1] ) eq "update" ) {
  419. Log3 $name, 3, "WINCONNECT set $name " . $a[1];
  420. WINCONNECT_SendCommand( $hash, "update" );
  421. }
  422. # off
  423. elsif ( lc( $a[1] ) eq "off" ) {
  424. readingsSingleUpdate( $hash, "state", "off",1 );
  425. }
  426. # screenOn
  427. elsif ( lc( $a[1] ) eq "screenon" ) {
  428. Log3 $name, 3, "WINCONNECT set $name " . $a[1];
  429. if ( $state eq "on" ) {WINCONNECT_SendCommand( $hash, "screenon" );}else {return "Device needs to be ON to adjust screenon.";}
  430. }
  431. #screenOff
  432. elsif ( lc( $a[1] ) eq "screenoff" ) {
  433. Log3 $name, 3, "WINCONNECT set $name " . $a[1];
  434. if ( $state eq "on" ) {WINCONNECT_SendCommand( $hash, "screenoff" );}else {return "Device needs to be ON to adjust screenoff.";}
  435. }
  436. # volume
  437. elsif ( lc( $a[1] ) eq "volume" ) {
  438. return "No argument given" if ( !defined( $a[2] ) );
  439. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $a[2];
  440. if ( $state eq "on" ) {
  441. $SetValue = $a[2];
  442. if ($SetValue >= 0 && $SetValue <= 100 ) {
  443. $cmd = $a[2];
  444. }
  445. else {
  446. return "Argument $SetValue does not seem to be a valid integer between 0 and 100";
  447. }
  448. WINCONNECT_SendCommand( $hash, "volume" , "=" . $cmd );
  449. readingsSingleUpdate( $hash, "volume", $cmd,1 );
  450. }
  451. else {return "Device needs to be ON to adjust volume.";}
  452. }
  453. # volumeUp
  454. elsif ( lc( $a[1] ) eq "volumeup" ) {
  455. my $volumeStep = int(AttrVal($name, "volumeStep", 5));
  456. my $volumenow = ReadingsVal( $name, "volume", 0);
  457. my $volumeNew = $volumenow + $volumeStep;
  458. if ($volumeNew > 100) {$volumeNew = 100;}
  459. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $volumeNew;
  460. if ( $state eq "on" ) {WINCONNECT_SendCommand( $hash, "volume" , "=" . $volumeNew );readingsSingleUpdate( $hash, "volume", $volumeNew,1 );}else {return "Device needs to be ON to adjust volume.";}
  461. }
  462. # volumeDown
  463. elsif ( lc( $a[1] ) eq "volumedown" ) {
  464. my $volumeStep = int(AttrVal($name, "volumeStep", 5));
  465. my $volumenow = ReadingsVal( $name, "volume", 0);
  466. my $volumeNew = $volumenow - $volumeStep;
  467. if ($volumeNew < 0) {$volumeNew = 0;}
  468. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $volumeNew;
  469. if ( $state eq "on" ) {WINCONNECT_SendCommand( $hash, "volume" , "=" . $volumeNew );readingsSingleUpdate( $hash, "volume", $volumeNew,1 );}else {return "Device needs to be ON to adjust volume.";}
  470. }
  471. # mute
  472. elsif ( lc( $a[1] ) eq "mute" ) {
  473. return "No argument given" if ( !defined( $a[2] ) );
  474. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $a[2];
  475. if ( $state eq "on" ) {
  476. WINCONNECT_SendCommand( $hash, "volumemute" , "=" . $a[2] );
  477. readingsSingleUpdate( $hash, "mute", $a[2],0 );
  478. }
  479. else {return "Device needs to be ON to adjust volume mute.";}
  480. }
  481. # powermode
  482. elsif ( lc( $a[1] ) eq "powermode" ) {
  483. return "No argument given" if ( !defined( $a[2] ) );
  484. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $a[2];
  485. if ( $state eq "on" ) {
  486. WINCONNECT_SendCommand( $hash, "powermode" , "=" . $a[2] );
  487. }
  488. else {return "Device needs to be ON to adjust powermode.";}
  489. }
  490. # user_aktividletime
  491. elsif ( lc( $a[1] ) eq "user_aktividletime" ) {
  492. return "No argument given" if ( !defined( $a[2] ) );
  493. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $a[2];
  494. if ( $state eq "on" ) {
  495. $SetValue = $a[2];
  496. if ($SetValue >= 0 && $SetValue <= 10000 ) {
  497. $cmd = $a[2];
  498. }
  499. else {
  500. return "Argument does not seem to be a valid integer between 0 and 10000";
  501. }
  502. WINCONNECT_SendCommand( $hash, "user_aktividletime" , "=" . $cmd );
  503. readingsSingleUpdate( $hash, "user_aktividletime", $cmd,1 );
  504. }
  505. else {return "Device needs to be ON to adjust user_aktividletime.";}
  506. }
  507. # brightness
  508. elsif ( lc( $a[1] ) eq "brightness" ) {
  509. return "No argument given" if ( !defined( $a[2] ) );
  510. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $a[2];
  511. if ( $state eq "on" ) {
  512. $SetValue = $a[2];
  513. if ($SetValue >= 0 && $SetValue <= 100 ) {
  514. $cmd = $a[2];
  515. }
  516. else {
  517. return "Argument does not seem to be a valid integer between 0 and 100";
  518. }
  519. WINCONNECT_SendCommand( $hash, "brightness" , "=" . $cmd );
  520. readingsSingleUpdate( $hash, "brightness", $cmd,1 );
  521. }
  522. else {return "Device needs to be ON to adjust brightness.";}
  523. }
  524. # speechquality
  525. elsif ( lc( $a[1] ) eq "speechquality" ) {
  526. return "No argument given" if ( !defined( $a[2] ) );
  527. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $a[2];
  528. if ( $state eq "on" ) {
  529. $SetValue = $a[2];
  530. if ($SetValue >= 0 && $SetValue <= 100 ) {
  531. $cmd = $a[2];
  532. }
  533. else {
  534. return "Argument does not seem to be a valid integer between 0 and 100";
  535. }
  536. WINCONNECT_SendCommand( $hash, "speechquality" , "=" . $cmd );
  537. readingsSingleUpdate( $hash, "speechquality", $cmd,1 );
  538. }
  539. else {return "Device needs to be ON to adjust speechquality.";}
  540. }
  541. # command
  542. elsif ( lc( $a[1] ) eq "command" ) {
  543. return "No argument given" if ( !defined( $a[2] ) );
  544. if ( $state eq "on" ) {
  545. foreach (@a) {
  546. if ($cmd eq "") {$cmd = $_ ;} else {$cmd = $cmd . "%20" . $_ ;}
  547. }
  548. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $cmd;
  549. WINCONNECT_SendCommand( $hash, "command" , "=" . $cmd );
  550. }
  551. else {return "Device needs to be ON to execute command.";}
  552. }
  553. # commandhide
  554. elsif ( lc( $a[1] ) eq "commandhide" ) {
  555. return "No argument given" if ( !defined( $a[2] ) );
  556. if ( $state eq "on" ) {
  557. foreach (@a) {
  558. if ($cmd eq "") {$cmd = $_ ;} else {$cmd = $cmd . "%20" . $_ ;}
  559. }
  560. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $cmd;
  561. WINCONNECT_SendCommand( $hash, "commandhide" , "=" . $cmd );
  562. }
  563. else {return "Device needs to be ON to execute commandhide.";}
  564. }
  565. # showfile
  566. elsif ( lc( $a[1] ) eq "showfile" ) {
  567. return "No argument given" if ( !defined( $a[2] ) );
  568. if ( $state eq "on" ) {
  569. foreach (@a) {
  570. if ($cmd eq "") {$cmd = $_ ;} else {$cmd = $cmd . "%20" . $_ ;}
  571. }
  572. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $cmd;
  573. WINCONNECT_SendCommand( $hash, "showfile" , "=" . $cmd );
  574. }
  575. else {return "Device needs to be ON to showfile.";}
  576. }
  577. # ttsmsg
  578. elsif ( lc( $a[1] ) eq "ttsmsg" ) {
  579. return "No argument given" if ( !defined( $a[2] ) );
  580. if ( $state eq "on" ) {
  581. foreach (@a) {
  582. if ($cmd eq "") {$cmd = $_ ;} else {$cmd = $cmd . "%20" . $_ ;}
  583. $Count = $Count + 1;
  584. if ($Count >= 3 ) {if ($Value eq "") {$Value = $_ ;} else {$Value = $Value . " " . $_ ;}}
  585. }
  586. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $cmd;
  587. WINCONNECT_SendCommand( $hash, "ttsmsg" , "=" . $cmd );
  588. readingsSingleUpdate( $hash, "ttsmsg", $Value,1 );
  589. }
  590. else {return "Device needs to be ON to send ttsmsg.";}
  591. }
  592. # messagebox
  593. elsif ( lc( $a[1] ) eq "messagebox" ) {
  594. return "No argument given" if ( !defined( $a[2] ) );
  595. if ( $state eq "on" ) {
  596. foreach (@a) {
  597. if ($cmd eq "") {$cmd = $_ ;} else {$cmd = $cmd . "%20" . $_ ;}
  598. $Count = $Count + 1;
  599. if ($Count >= 3 ) {if ($Value eq "") {$Value = $_ ;} else {$Value = $Value . " " . $_ ;}}
  600. }
  601. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $cmd;
  602. WINCONNECT_SendCommand( $hash, "messagebox" , "=" . $cmd );
  603. readingsSingleUpdate( $hash, "messagebox", $Value,1 );
  604. }
  605. else {return "Device needs to be ON to send messagebox.";}
  606. }
  607. # notifymsg
  608. elsif ( lc( $a[1] ) eq "notifymsg" ) {
  609. return "No argument given" if ( !defined( $a[2] ) );
  610. if ( $state eq "on" ) {
  611. foreach (@a) {
  612. if ($cmd eq "") {$cmd = $_ ;} else {$cmd = $cmd . "%20" . $_ ;}
  613. $Count = $Count + 1;
  614. if ($Count >= 3 ) {if ($Value eq "") {$Value = $_ ;} else {$Value = $Value . " " . $_ ;}}
  615. }
  616. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $cmd;
  617. WINCONNECT_SendCommand( $hash, "notifymsg" , "=" . $cmd );
  618. readingsSingleUpdate( $hash, "notifymsg", $Value,1 );
  619. }
  620. else {return "Device needs to be ON to send notifymsg.";}
  621. }
  622. # checkservice
  623. elsif ( lc( $a[1] ) eq "checkservice" ) {
  624. if ( $state eq "on" ) {
  625. foreach (@a) {
  626. if ($cmd eq "") {$cmd = $_ ;} else {$cmd = $cmd . "%20" . $_ ;}
  627. $Count = $Count + 1;
  628. if ($Count >= 3 ) {if ($Value eq "") {$Value = $_ ;} else {$Value = $Value . " " . $_ ;}}
  629. }
  630. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $cmd;
  631. readingsSingleUpdate( $hash, "checkservice", $Value,1 );
  632. WINCONNECT_SendCommand( $hash, "checkservice" , "=" . $cmd );
  633. }
  634. else {return "Device needs to be ON to checkservice.";}
  635. }
  636. # checkperformance
  637. elsif ( lc( $a[1] ) eq "checkperformance" ) {
  638. if ( $state eq "on" ) {
  639. foreach (@a) {
  640. if ($cmd eq "") {$cmd = $_ ;} else {$cmd = $cmd . "%20" . $_ ;}
  641. $Count = $Count + 1;
  642. if ($Count >= 3 ) {if ($Value eq "") {$Value = $_ ;} else {$Value = $Value . " " . $_ ;}}
  643. }
  644. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $cmd;
  645. readingsSingleUpdate( $hash, "checkperformance", $Value,1 );
  646. WINCONNECT_SendCommand( $hash, "checkperformance" , "=" . $cmd );
  647. }
  648. else {return "Device needs to be ON to checkperformance.";}
  649. }
  650. # checkperformance_interval
  651. elsif ( lc( $a[1] ) eq "checkperformance_interval" ) {
  652. return "No argument given" if ( !defined( $a[2] ) );
  653. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $a[2];
  654. if ( $state eq "on" ) {
  655. $SetValue = $a[2];
  656. if ($SetValue >= 10 && $SetValue <= 10000 ) {
  657. $cmd = $a[2];
  658. }
  659. else {
  660. return "Argument does not seem to be a valid integer between 10 and 10000";
  661. }
  662. WINCONNECT_SendCommand( $hash, "checkperformance_interval" , "=" . $cmd );
  663. readingsSingleUpdate( $hash, "checkperformance_interval", $cmd,0 );
  664. }
  665. else {return "Device needs to be ON to adjust checkperformance_interval.";}
  666. }
  667. # checkprocess
  668. elsif ( lc( $a[1] ) eq "checkprocess" ) {
  669. if ( $state eq "on" ) {
  670. foreach (@a) {
  671. if ($cmd eq "") {$cmd = $_ ;} else {$cmd = $cmd . "%20" . $_ ;}
  672. $Count = $Count + 1;
  673. if ($Count >= 3 ) {if ($Value eq "") {$Value = $_ ;} else {$Value = $Value . " " . $_ ;}}
  674. }
  675. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $cmd;
  676. readingsSingleUpdate( $hash, "checkprocess", $Value,1 );
  677. WINCONNECT_SendCommand( $hash, "checkprocess" , "=" . $cmd );
  678. }
  679. else {return "Device needs to be ON to checkprocess.";}
  680. }
  681. # speechcommands
  682. elsif ( lc( $a[1] ) eq "speechcommands" ) {
  683. if ( $state eq "on" ) {
  684. foreach (@a) {
  685. if ($cmd eq "") {$cmd = $_ ;} else {$cmd = $cmd . "%20" . $_ ;}
  686. $Count = $Count + 1;
  687. if ($Count >= 3 ) {if ($Value eq "") {$Value = $_ ;} else {$Value = $Value . " " . $_ ;}}
  688. }
  689. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $cmd;
  690. WINCONNECT_SendCommand( $hash, "speechcommands" , "=" . $cmd );
  691. readingsSingleUpdate( $hash, "speechcommands", $Value,1 );
  692. }
  693. else {return "Device needs to be ON to speechcommands.";}
  694. }
  695. # file_dir
  696. elsif ( lc( $a[1] ) eq "file_dir" ) {
  697. if ( $state eq "on" ) {
  698. foreach (@a) {
  699. if ($cmd eq "") {$cmd = $_ ;} else {$cmd = $cmd . "%20" . $_ ;}
  700. $Count = $Count + 1;
  701. if ($Count >= 3 ) {if ($Value eq "") {$Value = $_ ;} else {$Value = $Value . " " . $_ ;}}
  702. }
  703. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $cmd;
  704. WINCONNECT_SendCommand( $hash, "file_dir" , "=" . $cmd );
  705. readingsSingleUpdate( $hash, "file_dir", $Value,1 );
  706. }
  707. else {return "Device needs to be ON to file_dir.";}
  708. }
  709. # file_filter
  710. elsif ( lc( $a[1] ) eq "file_filter" ) {
  711. if ( $state eq "on" ) {
  712. foreach (@a) {
  713. if ($cmd eq "") {$cmd = $_ ;} else {$cmd = $cmd . "%20" . $_ ;}
  714. $Count = $Count + 1;
  715. if ($Count >= 3 ) {if ($Value eq "") {$Value = $_ ;} else {$Value = $Value . " " . $_ ;}}
  716. }
  717. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $cmd;
  718. WINCONNECT_SendCommand( $hash, "file_filter" , "=" . $cmd );
  719. readingsSingleUpdate( $hash, "file_filter", $Value,0 );
  720. }
  721. else {return "Device needs to be ON to file_filter.";}
  722. }
  723. # file_order
  724. elsif ( lc( $a[1] ) eq "file_order" ) {
  725. return "No argument given" if ( !defined( $a[2] ) );
  726. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $a[2];
  727. if ( $state eq "on" ) {
  728. WINCONNECT_SendCommand( $hash, "file_order" , "=" . $a[2] );
  729. readingsSingleUpdate( $hash, "file_order", $a[2],1 );
  730. }
  731. else {return "Device needs to be ON to adjust file_order.";}
  732. }
  733. # picture_dir
  734. elsif ( lc( $a[1] ) eq "picture_dir" ) {
  735. if ( $state eq "on" ) {
  736. foreach (@a) {
  737. if ($cmd eq "") {$cmd = $_ ;} else {$cmd = $cmd . "%20" . $_ ;}
  738. $Count = $Count + 1;
  739. if ($Count >= 3 ) {if ($Value eq "") {$Value = $_ ;} else {$Value = $Value . " " . $_ ;}}
  740. }
  741. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $cmd;
  742. WINCONNECT_SendCommand( $hash, "picture_dir" , "=" . $cmd );
  743. readingsSingleUpdate( $hash, "picture_dir", $Value,1 );
  744. }
  745. else {return "Device needs to be ON to picture_dir.";}
  746. }
  747. # picture_make
  748. elsif ( lc( $a[1] ) eq "picture_make" ) {
  749. Log3 $name, 3, "WINCONNECT set $name " . $a[1];
  750. if ( $state eq "on" ) {WINCONNECT_SendCommand( $hash, "picture_make" );}else {return "Device needs to be ON to adjust picture_make.";}
  751. }
  752. # camera
  753. elsif ( lc( $a[1] ) eq "camera" ) {
  754. return "No argument given" if ( !defined( $a[2] ) );
  755. Log3 $name, 3, "WINCONNECT set $name " . $a[1] . " " . $a[2];
  756. if ( $state eq "on" ) {
  757. WINCONNECT_SendCommand( $hash, "camera" , "=" . $a[2] );
  758. }
  759. else {return "Device needs to be ON to adjust camera.";}
  760. }
  761. # return usage hint
  762. else {return $usage;}
  763. return;
  764. }
  765. ###################################
  766. sub WINCONNECT_Define($$) {
  767. my ( $hash, $def ) = @_;
  768. my @a = split( "[ \t][ \t]*", $def );
  769. my $name = $hash->{NAME};
  770. Log3 $name, 5, "WINCONNECT $name: called function WINCONNECT_Define()";
  771. if ( int(@a) < 2 ) {
  772. my $msg = "Wrong syntax: define <name> WINCONNECT <ip-or-hostname> [<poll-interval>] ";
  773. Log3 $name, 4, $msg;
  774. return $msg;
  775. }
  776. $hash->{TYPE} = "WINCONNECT";
  777. my $address = $a[2];
  778. $hash->{helper}{ADDRESS} = $address;
  779. # use interval of 45sec if not defined
  780. my $interval = $a[3] || 45;
  781. $hash->{INTERVAL} = $interval;
  782. # set default settings on first define
  783. if ($init_done) {
  784. $attr{$name}{icon} = 'it_server';
  785. }
  786. # start the status update timer
  787. #RemoveInternalTimer($hash);
  788. InternalTimer( gettimeofday() + 2, "WINCONNECT_GetStatus", $hash, 1);
  789. return;
  790. }
  791. sub WINCONNECT_ReceiveCommand($) {
  792. my ($param, $err, $data) = @_;
  793. my $hash = $param->{hash};
  794. my $name = $hash->{NAME};
  795. my $VerWin = substr(ReadingsVal( $name, "wincontrol", "0.0.0.0" ),4);
  796. my $VerGit = substr(ReadingsVal( $name, "wincontrol_gitlab", "0.0.0.0" ),4);
  797. my $service = $param->{service};
  798. readingsBeginUpdate($hash);
  799. # Versionsnachricht
  800. my $Message = $name . "%20NOTIFYMSG%20Neue%20WinConnect%20Version%20verfügbar!%20Downloadlink%20=%20" . $DownloadURL;
  801. if($err ne "") {
  802. Log3 $name, 5, "WINCONNECT $name: error while requesting ".$param->{url}." - $err";
  803. readingsBulkUpdateIfChanged( $hash, "state", "off" );
  804. readingsBulkUpdateIfChanged( $hash, "audio", "off");
  805. if (AttrVal($name, "win_resetreadings", 1) eq '1') {
  806. readingsBulkUpdateIfChanged( $hash, "user_aktiv", "false" );
  807. readingsBulkUpdateIfChanged( $hash, "os_RunTime_days", "0" );
  808. readingsBulkUpdateIfChanged( $hash, "os_RunTime_hours", "0" );
  809. readingsBulkUpdateIfChanged( $hash, "os_RunTime_minutes", "0" );
  810. readingsBulkUpdateIfChanged( $hash, "printer_aktiv", "false" );
  811. readingsBulkUpdateIfChanged( $hash, "printer_names", "no_prining" );
  812. }
  813. }
  814. elsif($data ne "")
  815. {
  816. readingsBulkUpdateIfChanged( $hash, "state", "on" );
  817. Log3 $name, 5, "WINCONNECT $name: url ".$param->{url}." returned: $data";
  818. if(!defined($hash->{helper}{SENDVERSION})) {$hash->{helper}{SENDVERSION}='';}
  819. # 2017.07.26 - Check update
  820. if ( AttrVal( $name, "autoupdatewincontrol", 1 ) == 1 ) {
  821. if ($VerWin < $VerGit && $hash->{helper}{SENDVERSION} eq '2' && $service ne 'notifymsg') {
  822. # Neue Version vorhanden
  823. $hash->{helper}{SENDVERSION} = '1';
  824. WINCONNECT_SendCommand( $hash, "notifymsg" , "=" . $Message);
  825. } else{
  826. delete($hash->{helper}{SENDVERSION})
  827. }
  828. }
  829. }
  830. readingsEndUpdate( $hash, 1 );
  831. }
  832. ############################################################################################################
  833. #
  834. # Begin of helper functions
  835. #
  836. ############################################################################################################
  837. ###################################
  838. sub WINCONNECT_Undefine($$) {
  839. my ( $hash, $arg ) = @_;
  840. my $name = $hash->{NAME};
  841. Log3 $name, 5, "WINCONNECT $name: called function WINCONNECT_Undefine()";
  842. # Stop the internal GetStatus-Loop and exit
  843. RemoveInternalTimer($hash);
  844. return;
  845. }
  846. 1;
  847. =pod
  848. =item device
  849. =item summary control for Windows based systems via network connection
  850. =item summary_DE Steuerung von Windows basierte Systemen &uuml;ber das Netzwerk
  851. =begin html
  852. <a name="WINCONNECT"></a>
  853. <h3>WINCONNECT</h3>
  854. <ul>
  855. This module controls a Windows PC.
  856. <br><br>
  857. <ul>
  858. <a name="WINCONNECTdefine" id="WINCONNECTdefine"></a> <b>Define</b>
  859. <ul>
  860. <code>define &lt;name&gt; WINCONNECT &lt;ip-address-or-hostname&gt; [&lt;poll-interval&gt;]</code><br>
  861. <br>
  862. Defining an WINCONNECT device will schedule an internal task (interval can be set with optional parameter &lt;poll-interval&gt; in seconds, if not set, the value is 45 seconds), which periodically reads the status of the device and triggers notify/filelog commands.<br>
  863. <br>
  864. Example:<br>
  865. <ul>
  866. <code>define Buero.PC WINCONNECT 192.168.0.10<br>
  867. <br>
  868. # With custom interval of 60 seconds<br>
  869. define Buero.PC WINCONNECT 192.168.0.10 60<br></code>
  870. </ul>
  871. </ul>
  872. </ul>
  873. <br><br>
  874. More information on <a target="_blank" href="https://wiki.fhem.de/wiki/WINCONNECT">FHEM Wiki</a>.<br/>
  875. <br>
  876. </ul>
  877. =end html
  878. =begin html_DE
  879. <a name="WINCONNECT"></a>
  880. <h3>WINCONNECT</h3>
  881. <ul>
  882. Dieses Module dient zur Steuerung eines Windows PCs
  883. <br><br>
  884. <ul>
  885. <a name="WINCONNECTdefine" id="WINCONNECTdefine"></a> <b>Define</b>
  886. <ul>
  887. <code>define &lt;name&gt; WINCONNECT &lt;ip-address-or-hostname&gt; [&lt;poll-interval&gt;]</code><br>
  888. <br>
  889. F&uuml;r definierte WINCONNECT Ger&auml;te wird ein interner Task angelegt, welcher periodisch die Readings aktualisiert. Der Standartpollintervall ist 45 Sekunden.<br>
  890. <br>
  891. Example:<br>
  892. <ul>
  893. <code>define Buero.PC WINCONNECT 192.168.0.10<br>
  894. <br>
  895. # Alternativer poll intervall von 60 seconds<br>
  896. define Buero.PC WINCONNECT 192.168.0.10 60<br></code>
  897. </ul>
  898. </ul>
  899. </ul>
  900. <br><br>
  901. Mehr Information im <a target="_blank" href="https://wiki.fhem.de/wiki/WINCONNECT">FHEM Wiki</a>.<br/>
  902. <br>
  903. </ul>
  904. =end html_DE
  905. =cut