diff --git a/fhem/CHANGED b/fhem/CHANGED index 8b290b3f6..6683ecbd5 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -390,12 +390,17 @@ - feature: pgm2 installation changes, multiple instances, external css - feature: 87_ws2000.pm (thomas 10.05.08) - contrib: ws2000_reader.pl Standalone decoder and server (thomas 10.05.08) - - doc : update fhem.html and commandline.html reflecting ws2000 and windows installation(thomas 10.05.08) - - feature: add ReadyFn to fhem.pl in main loop to have an alternative for select, which is not working on windows (thomas 11.05) + - doc: update fhem.html and commandline.html reflecting ws2000 and + windows installation(thomas 10.05.08) + - feature: add ReadyFn to fhem.pl in main loop to have an alternative for + select, which is not working on windows (thomas 11.05) - feature: set timeout to 0.2s, if HandleTimeout returns undef=forever - - bugfix : WS2000:fixed serial port access on windows by replacing FD with ReadyFn + - bugfix : WS2000:fixed serial port access on windows by replacing FD with + ReadyFn - bugfix : FileLog: dont use FH->sync on windows (not implemented there) - - feature: EM, WS300, FHZ:Add Switch for Device::SerialPort and Win32::SerialPort to get it running in Windows (sorry, untestet) - - bugfix: FileLog undefined $data in FileLog_Get - - feature: fhem.pl check modules for compiletime errors and do not initialize them - -feature: M232 add windows support (thomas 12.05.08) + - feature: EM, WS300, FHZ:Add Switch for Device::SerialPort and + Win32::SerialPort to get it running in Windows (sorry, untested) + - bugfix: FileLog undefined $data in FileLog_Get + - feature: fhem.pl check modules for compiletime errors and do not initialize + them + - feature: M232 add windows support (thomas 12.05.08) diff --git a/fhem/FHEM/00_FHZ.pm b/fhem/FHEM/00_FHZ.pm index 98e151c74..99a68a57e 100755 --- a/fhem/FHEM/00_FHZ.pm +++ b/fhem/FHEM/00_FHZ.pm @@ -237,7 +237,7 @@ FHZ_Define($$) if ($^O=~/Win/) { require Win32::SerialPort; $po = new Win32::SerialPort ($dev); - }else{ + } else { require Device::SerialPort; $po = new Device::SerialPort ($dev); } @@ -376,9 +376,9 @@ FHZ_ReadAnswer($$) my ($mfhzdata, $rin) = ("", ''); my $nfound; for(;;) { - if ($^O eq 'MSWin32') { + if($^O eq 'MSWin32') { $nfound=FHZ_Ready($hash,$def); - }else{ + } else { vec($rin, $hash->{FD}, 1) = 1; $nfound = select($rin, undef, undef, 3); # 3 seconds timeout if($nfound < 0) { diff --git a/fhem/FHEM/60_EM.pm b/fhem/FHEM/60_EM.pm index 02efdc899..fe30e3c66 100755 --- a/fhem/FHEM/60_EM.pm +++ b/fhem/FHEM/60_EM.pm @@ -314,19 +314,22 @@ EmGetData($$) my $started = 0; my $complete = 0; for(;;) { - #select will not work on windows, replaced with status - # - #my ($rout, $rin) = ('', ''); - #vec($rin, $serport->FILENO, 1) = 1; - #my $nfound = select($rout=$rin, undef, undef, 1.0); - # - #if($nfound < 0) { - # $rm = "EM Select error $nfound / $!"; - # goto DONE; - #} - #last if($nfound == 0); - my ($BlockingFlags, $InBytes, $OutBytes, $ErrorFlags)=$serport->status; - last if ($InBytes<1); + + if($^O !~ /Win/) { + my ($rout, $rin) = ('', ''); + vec($rin, $serport->FILENO, 1) = 1; + my $nfound = select($rout=$rin, undef, undef, 1.0); + + if($nfound < 0) { + $rm = "EM Select error $nfound / $!"; + goto DONE; + } + last if($nfound == 0); + } else { + #select will not work on windows, replaced with status + my ($BlockingFlags, $InBytes, $OutBytes, $ErrorFlags)=$serport->status; + last if ($InBytes<1); + } my $buf = $serport->input(); if(!defined($buf) || length($buf) == 0) { diff --git a/fhem/HISTORY b/fhem/HISTORY index 6951a3883..9d40e64a9 100644 --- a/fhem/HISTORY +++ b/fhem/HISTORY @@ -224,11 +224,13 @@ - Rudi Fri May 9 20:00:00 MEST 2008 - feature: FHEM modules may live on a filesystem with "ignorant" casing (FAT) If you install FHEM on a USB-Stick (e.g. for the FritzBox) it may happen - that the filename casing is different from the function names inside the file. + that the filename casing is different from the function names inside the + file. -> Fhem won't find the _Initialize function. Fixed by searching all function-names for a match with "ignore-case" - - feature: FileLog function "set reopen" impemented. In case you want to delete some - wrong entries from a current logfile, you must tell fhem to reopen the file again + - feature: FileLog function "set reopen" impemented. In case you want to + delete some wrong entries from a current logfile, you must tell fhem to + reopen the file again - feature: multiline commands are supported through the command line Up till now multiline commands were supported only by "include". Now they are supprted from the (tcp/ip) connection too, so they can be used by the @@ -241,25 +243,38 @@ module directory - multiline support for notify and at scripts. - feature: FileLog "set reopen" for manual tweaking of logfiles. - - feature: multiline commands are supported through the command line - - feature: pgm2 installation changes, multiple instances, external css + - feature: multiline commands are supported through the command line + - feature: pgm2 installation changes, multiple instances, external css -tdressler Sa May 10 23:00:00 MEST 2008 - -feature:add WS2000 Support new modul 87_ws2000.pm and standalone reader/server ws2000_reader.pl - -doc: modified fhem.html/commandref.html reflectiing ws2000 device and added windows support - (tagged:before tdressler_20080510_1, after tdressler_20080510_2) + - feature:add WS2000 Support new modul 87_ws2000.pm and standalone + reader/server ws2000_reader.pl + - doc: modified fhem.html/commandref.html reflectiing ws2000 device and + added windows support (tagged:before tdressler_20080510_1, after + tdressler_20080510_2) + -tdressler So May 11 19:30:00 MEST 2008 - - feature: add ReadyFn to fhem.pl in main loop to have an alternative for select, which is not working on windows (thomas 11.05) - - feature: set timeout to 0.2s, if HandleTimeout returns undef=forever (tagged tdressler_20080511_1/2) - - bugfix : WS2000:fixed serial port access on windows by replacing FD with ReadyFn + - feature: add ReadyFn to fhem.pl in main loop to have an alternative for + select, which is not working on windows (thomas 11.05) + - feature: set timeout to 0.2s, if HandleTimeout returns undef=forever + (tagged tdressler_20080511_1/2) + - bugfix : WS2000:fixed serial port access on windows by replacing FD with + ReadyFn - bugfix : FileLog: dont use FH->sync on windows (not implemented there) - - feature: EM, WS300, FHZ:Add Switch for Device::SerialPort and Win32::SerialPort to get it running in Windows (sorry, untestet) + - feature: EM, WS300, FHZ:Add Switch for Device::SerialPort and + Win32::SerialPort to get it running in Windows (sorry, untestet) + -tdressler So May 11 23:30:00 MEST 2008 - - bugfix: FileLog undefined $data in FileLog_Get - - feature: fhem.pl check modules for compiletime errors and do not initialize them if any - -bugfix: EM, WS300, FHZ scope of portobj variable + - bugfix: FileLog undefined $data in FileLog_Get + - feature: fhem.pl check modules for compiletime errors and do not initialize + them if any + - bugfix: EM, WS300, FHZ scope of portobj variable + -tdressler Mo May 12 14:00:00 MEST 2008 - bugfix: FHZ with windows, use there ReadyFn if windows; small cosmetic changes - doc : add hint to virtual com port driver, modification for FHZ to use default FTDI driver + - bugfix: FHZ with windows, use there ReadyFn if windows; small cosmetic + changes + - doc: add hint to virtual com port driver, modification for FHZ to use + default FTDI driver + -tdressler Mo May 12 19:00:00 MEST 2008 - feature : add windows support to M232 + - feature : add windows support to M232 diff --git a/fhem/README.CVS b/fhem/README.CVS index c5f9b1af9..dfc1e5b88 100644 --- a/fhem/README.CVS +++ b/fhem/README.CVS @@ -18,7 +18,7 @@ If you wish to contribute to the project, then - describe your changes in the file HISTORY, and dont forget to mention your name and the date of change - it makes sense to do a "cvs diff" before checking in the stuff with - cvs commit + cvs commit - if you do complex/nontrivial changes affecting more than one file, then please tag the whole software before and after the change with: - before: % cvs tag __0 diff --git a/fhem/docs/commandref.html b/fhem/docs/commandref.html index 7d09a872e..4b60671a6 100644 --- a/fhem/docs/commandref.html +++ b/fhem/docs/commandref.html @@ -898,16 +898,15 @@ make editing of multiline commands transparent.

Define a WS2000 series raw receiver device sold by ELV. Details see here. - Unlike 86_FS10.pm it will handle the comple device communication itself and doesnt require an external program. + Unlike 86_FS10.pm it will handle the complete device communication itself and + doesnt require an external program. For this reason you can now use this also on windows.
- This Device will be usually connect to a serial port, but you can also define a raw network - redirector like lantronix XPORT(TM). + This Device will be usually connect to a serial port, but you can also + define a raw network redirector like lantronix XPORT(TM).
Note: Currently this device does not support a "set" function

- - Attributes:
  • rain: factor for calculating amount of rain in ml/count
  • diff --git a/fhem/docs/fhem.html b/fhem/docs/fhem.html index 057e961e7..64d74f393 100644 --- a/fhem/docs/fhem.html +++ b/fhem/docs/fhem.html @@ -179,8 +179,8 @@ description and faq.html for the F.A.Q.

    Server installation on Windows

    ( if you are using cygwin for your perl installation you can follow the guidelines for Unix)
      -
    • be sure you have perl.exe in your path (%PATH%)
    • -
    • unpack distribution in a directory of your choise
    • +
    • be sure you have perl.exe in your path (%PATH%)
    • +
    • unpack distribution in a directory of your choice
    • Copy additional modules from the contrib directory (like 99_SUNRISE_EL.pm)
    • Make sure that you can access the serial USB