CUL-Stick V3 unter Windows 10

Begonnen von Andreas_, 30 Dezember 2018, 16:05:52

Vorheriges Thema - Nächstes Thema

Andreas_

Hallo an Alle,

ich habe versucht FHEM auf WIN10 zu installieren, auch wenn Linux besser ist, ich wollte es einfach mal ausprobieren.

Nach folgender Anleitung vorgegangen:

https://wiki.fhem.de/wiki/FHEM_Installation_Windows

Dann auch mal das hier probiert, weil ich nicht in der Lage bin, die CUL.INF als WIN Treiber zu installieren:

https://wiki.fhem.de/wiki/Windows_-_FHEM_installieren

Ich habe auch den Fehler gemacht, ein 64-Bit Paket für Perl zu verwenden. Scheinbar funktioniert dieses Win32::SerialPort nur mit manchen Pearl-Paketen.

Ich bin nun bei folgendem Stand:
FHEM läuft, CUL wird nicht erkannt, es kommt folgender Fehler:
ZitatCan't locate Win32/SerialPort.pm in @INC (you may need to install the Win32::SerialPort module) (@INC contains: . F:/MY-FHEM/perl/site/lib F:/MY-FHEM/perl/vendor/lib F:/MY-FHEM/perl/lib ./FHEM) at ./FHEM/DevIo.pm line 414, <$fh> line 48.


CUL ist wie folgt definiert:
#define initialUsbCheck notify global:INITIALIZED usb create

define CUL CUL com1@9600 1234

#define CUL_0 CUL /dev/ttyACM0@9600 1034
attr CUL_0 rfmode HomeMatic

Der CUL wird beim anstecken an den Laptop als CUL868 eingerichtet. Ich habe ihn auf COM1 gelegt.

Bei Ausführung von
PATH=F:\my-fhem\c\bin;F:\my-fhem\perl\bin;%PATH%
erhalte ich
ZitatPATH=F:\my-fhem\c\bin : Die Benennung "PATH=F:\my-fhem\c\bin" wurde nicht als Name eines Cmdlet, einer Funktion, einer
Skriptdatei oder eines ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad
korrekt ist (sofern enthalten), und wiederholen Sie den Vorgang.
In Zeile:1 Zeichen:1
+ PATH=F:\my-fhem\c\bin;F:\my-fhem\perl\bin;%PATH%
+ ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (PATH=F:\my-fhem\c\bin:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

F:\my-fhem\perl\bin : Die Benennung "F:\my-fhem\perl\bin" wurde nicht als Name eines Cmdlet, einer Funktion, einer
Skriptdatei oder eines ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad
korrekt ist (sofern enthalten), und wiederholen Sie den Vorgang.
In Zeile:1 Zeichen:23
+ PATH=F:\my-fhem\c\bin;F:\my-fhem\perl\bin;%PATH%
+                       ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (F:\my-fhem\perl\bin:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

%PATH% : Die Benennung "%PATH%" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines
ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern
enthalten), und wiederholen Sie den Vorgang.
In Zeile:1 Zeichen:43
+ PATH=F:\my-fhem\c\bin;F:\my-fhem\perl\bin;%PATH%
+                                           ~~~~~~
    + CategoryInfo          : ObjectNotFound: (%PATH%:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


Wenn ich nun perl\bin\cpan -i Win32::SerialPort ausführe kommt folgende umfangreiche Meldung:

ZitatF:\my-fhem> perl\bin\cpan -i Win32::SerialPort
Loading internal null logger. Install Log::Log4perl for logging messages
CPAN: CPAN::SQLite loaded ok (v0.211)
Database was generated on Sun, 30 Dec 2018 14:02:42 GMT

Running install for module 'Win32::SerialPort'
CPAN: Digest::SHA loaded ok (v5.96)
CPAN: Compress::Zlib loaded ok (v2.07)
Checksum for F:\MY-FHEM\cpan\sources\authors\id\B\BB\BBIRTH\Win32-SerialPort-0.22.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.24)
CPAN: YAML::XS loaded ok (v0.63)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20170114_24)
Configuring B/BB/BBIRTH/Win32-SerialPort-0.22.tar.gz with Makefile.PL
found result=0, file=COM1
            Win32::SerialPort and Win32API::CommPort
                        VERSION 0.22

A 'Makefile' created for those with 'make' or CPAN.pm users.
It will test using PORT = COM1. To test using a different PORT,
run again specifying: 'perl Makefile.PL TESTPORT=<PORT>'
The normal 'Mantra' would then apply:
        make
        make test
        make install

For those without 'make' or an equivalent like 'nmake' or 'dmake' there
are perl-only scripts which do the same things:
        Test with:    perl nomake_test
        Install with: perl nomake_install

Test with nothing connected to COM1.
PORT is not verified present and accessible until tests run.
Timeout tests can take up to 30 seconds per test.

Creating new t/DefaultPort.pm
Creating new nomake_test
Creating new nomake_install
Checking if your kit is complete...
Looks good
Generating a dmake-style Makefile
Writing Makefile for Win32::SerialPort
Writing MYMETA.yml and MYMETA.json
  BBIRTH/Win32-SerialPort-0.22.tar.gz
  F:\MY-FHEM\perl\bin\perl.exe Makefile.PL -- OK
Running make for B/BB/BBIRTH/Win32-SerialPort-0.22.tar.gz
cp lib/Win32API/CommPort.pm blib\lib\Win32API\CommPort.pm
cp lib/Win32/SerialPort.pm blib\lib\Win32\SerialPort.pm
  BBIRTH/Win32-SerialPort-0.22.tar.gz
  F:\MY-FHEM\c\bin\dmake.exe -- OK
Running make test
"F:\MY-FHEM\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/test1.t .. 1/309
#   Failed test 'can_ctsrts'
#   at t/test1.t line 149.

#   Failed test 'can_xonxoff'
#   at t/test1.t line 151.

#   Failed test 'can_xon_char'
#   at t/test1.t line 154.

#   Failed test 'is_rs232'
#   at t/test1.t line 155.

#   Failed test 'is_modem'
#   at t/test1.t line 160.

#   Failed test 'set xoff_char'
#   at t/test1.t line 176.

#   Failed test 'set eof_char'
#   at t/test1.t line 183.
#          got: '24'
#     expected: '0'

#   Failed test 'set event_char'
#   at t/test1.t line 190.
#          got: '4'
#     expected: '0'

#   Failed test 'set error_char'
#   at t/test1.t line 197.
#          got: '107'
#     expected: '0'

#   Failed test '2 stopbits in list'
#   at t/test1.t line 246.

#   Failed test 'can set handshake rts'
#   at t/test1.t line 266.

#   Failed test 'xon_limit'
#   at t/test1.t line 340.
#          got: '0'
#     expected: '100'

#   Failed test 'xoff_limit'
#   at t/test1.t line 341.
#          got: '0'
#     expected: '200'
Could not set handshake on TestPort at t/test1.t line 728.

#   Failed test 'handshake rts'
#   at t/test1.t line 728.
#          got: undef
#     expected: 'rts'

#   Failed test 'output_dsr'
#   at t/test1.t line 729.
#          got: '8'
#     expected: '0'

#   Failed test 'output_cts'
#   at t/test1.t line 730.
Could not set handshake on TestPort at t/test1.t line 734.

#   Failed test 'handshake xoff'
#   at t/test1.t line 734.
#          got: undef
#     expected: 'xoff'

#   Failed test 'output_dsr'
#   at t/test1.t line 735.
#          got: '8'
#     expected: '0'

#   Failed test 'input_xoff'
#   at t/test1.t line 737.

#   Failed test 'output_xoff'
#   at t/test1.t line 738.
t/test1.t .. 294/309 Did not pulse BREAK on at t/test1.t line 781.
Did not restore BREAK off at t/test1.t line 781.
t/test1.t .. 305/309 # Looks like you failed 20 tests of 309.
t/test1.t .. Dubious, test returned 20 (wstat 5120, 0x1400)
Failed 20/309 subtests
        (less 61 skipped subtests: 228 okay)
t/test2.t .. 1/146
#   Failed test 'xon_char'
#   at t/test2.t line 70.
#          got: '36'
#     expected: '17'

#   Failed test 'xoff_char'
#   at t/test2.t line 71.
#          got: '169'
#     expected: '19'

#   Failed test 'eof_char'
#   at t/test2.t line 72.
#          got: '204'
#     expected: '0'

#   Failed test 'error_char'
#   at t/test2.t line 74.
#          got: '255'
#     expected: '0'

#   Failed test 'xoff_limit'
#   at t/test2.t line 95.
#          got: '0'
#     expected: '200'

#   Failed test 'xon_limit'
#   at t/test2.t line 96.
#          got: '0'
#     expected: '100'
t/test2.t .. 145/146 # Looks like you failed 6 tests of 146.
t/test2.t .. Dubious, test returned 6 (wstat 1536, 0x600)
Failed 6/146 subtests
        (less 99 skipped subtests: 41 okay)
t/test3.t .. 1/?
#   Failed test 'can_ctsrts'
#   at t/test3.t line 126.

#   Failed test 'can_xonxoff'
#   at t/test3.t line 128.

#   Failed test 'can_xon_char'
#   at t/test3.t line 131.

#   Failed test 'is_rs232'
#   at t/test3.t line 132.

#   Failed test 'is_modem'
#   at t/test3.t line 137.

#   Failed test 'set xoff_char'
#   at t/test3.t line 153.

#   Failed test 'set eof_char'
#   at t/test3.t line 160.
#          got: '32'
#     expected: '0'

#   Failed test 'set event_char'
#   at t/test3.t line 167.
#          got: '4'
#     expected: '0'

#   Failed test 'set error_char'
#   at t/test3.t line 174.
#          got: '73'
#     expected: '0'

#   Failed test 'can set rts handshake'
#   at t/test3.t line 262.
#          got: undef
#     expected: 'rts'

#   Failed test 'xon_limit'
#   at t/test3.t line 337.
#          got: '0'
#     expected: '100'

#   Failed test 'xoff_limit'
#   at t/test3.t line 338.
#          got: '0'
#     expected: '200'

#   Failed test 'xoff active'
#   at t/test3.t line 449.

#   Failed test 'xon_active'
#   at t/test3.t line 463.

#   Failed test 'suspend_tx'
#   at t/test3.t line 504.

#   Failed test 'break_active ON'
#   at t/test3.t line 507.
#          got: '0'
#     expected: '1'

t/test3.t .. 200/? #   Failed test 'resume_tx'
#   at t/test3.t line 512.

#   Failed test 'break_active OFF'
#   at t/test3.t line 515.
#          got: '0'
#     expected: '1'
# Looks like you failed 18 tests of 264.
t/test3.t .. Dubious, test returned 18 (wstat 4608, 0x1200)
Failed 18/264 subtests
        (less 54 skipped subtests: 192 okay)
t/test4.t .. 1/?
#   Failed test 'is_xon_char'
#   at t/test4.t line 75.
#          got: '244'
#     expected: '17'

#   Failed test 'is_xoff_char'
#   at t/test4.t line 76.
#          got: '220'
#     expected: '19'

#   Failed test 'is_eof_char'
#   at t/test4.t line 77.
#          got: '204'
#     expected: '0'

#   Failed test 'is_error_char'
#   at t/test4.t line 79.
#          got: '255'
#     expected: '0'

#   Failed test 'is_xoff_limit'
#   at t/test4.t line 99.
#          got: '0'
#     expected: '200'

#   Failed test 'is_xon_limit'
#   at t/test4.t line 100.
#          got: '0'
#     expected: '100'

#   Failed test 'is_xon_char'
#   at t/test4.t line 170.
#          got: '27'
#     expected: '1'

#   Failed test 'is_xoff_char'
#   at t/test4.t line 171.
#          got: '209'
#     expected: '2'

#   Failed test 'is_error_char'
#   at t/test4.t line 190.
#          got: '255'
#     expected: '0'

#   Failed test 'is_stopbits'
#   at t/test4.t line 197.
#          got: undef
#     expected: '2'

#   Failed test 'is_handshake'
#   at t/test4.t line 198.
#          got: undef
#     expected: 'xoff'

#   Failed test 'is_xoff_limit'
#   at t/test4.t line 210.
#          got: undef
#     expected: '45'
t/test4.t .. 100/?
#   Failed test 'is_xon_limit'
#   at t/test4.t line 221.
#          got: undef
#     expected: '90'

#   Failed test 'is_xon_char'
#   at t/test4.t line 399.
#          got: '244'
#     expected: '1'

#   Failed test 'is_xoff_char'
#   at t/test4.t line 400.
#          got: '216'
#     expected: '2'

#   Failed test 'is_eof_char'
#   at t/test4.t line 409.
#          got: '204'
#     expected: '0'

#   Failed test 'is_error_char'
#   at t/test4.t line 411.
#          got: '255'
#     expected: '0'

#   Failed test 'is_stopbits'
#   at t/test4.t line 425.
#          got: '1'
#     expected: '2'

#   Failed test 'is_handshake'
#   at t/test4.t line 426.
#          got: 'none'
#     expected: 'xoff'

#   Failed test 'is_xoff_limit'
#   at t/test4.t line 447.
#          got: '0'
#     expected: '45'

#   Failed test 'is_xon_limit'
#   at t/test4.t line 448.
#          got: '0'
#     expected: '90'

#   Failed test 'is_xoff_char'
#   at t/test4.t line 501.
#          got: '216'
#     expected: '19'

#   Failed test 'is_eof_char'
#   at t/test4.t line 502.
#          got: '204'
#     expected: '0'

#   Failed test 'is_error_char'
#   at t/test4.t line 504.
#          got: '255'
#     expected: '0'

#   Failed test 'is_xoff_limit'
#   at t/test4.t line 525.
#          got: '0'
#     expected: '200'

#   Failed test 'is_xon_limit'
#   at t/test4.t line 526.
#          got: '0'
#     expected: '100'

#   Failed test 'is_xon_char'
#   at t/test4.t line 578.
#          got: '116'
#     expected: '17'
# Looks like you failed 27 tests of 518.
t/test4.t .. Dubious, test returned 27 (wstat 6912, 0x1b00)
Failed 27/518 subtests
        (less 90 skipped subtests: 401 okay)
t/test5.t .. ok
t/test6.t .. 1/?
#   Failed test 'stty "^Q"'
#   at t/test6.t line 68.
#          got: 't'
#     expected: '^Q'

#   Failed test 'stty "^S"'
#   at t/test6.t line 70.
#          got: '^@'
#     expected: '^S'

#   Failed test 'is_xon_char(0x91)'
#   at t/test6.t line 105.
#          got: '196'
#     expected: '145'

#   Failed test 'is_xoff_char(0x92)'
#   at t/test6.t line 106.
#          got: '56'
#     expected: '146'

#   Failed test 'is_stopbits(2)'
#   at t/test6.t line 111.
#          got: undef
#     expected: '2'

#   Failed test 'is_handshake("xoff")'
#   at t/test6.t line 112.
#          got: undef
#     expected: 'xoff'

#   Failed test '"0x91"'
#   at t/test6.t line 165.
#          got: 't'
#     expected: '0x91'

#   Failed test '"0x92"'
#   at t/test6.t line 167.
#          got: '~'
#     expected: '0x92'

#   Failed test '"cstopb"'
#   at t/test6.t line 186.
#          got: '-cstopb'
#     expected: 'cstopb'

#   Failed test '"ixoff"'
#   at t/test6.t line 190.
#          got: '-ixoff'
#     expected: 'ixoff'

#   Failed test '"ixon"'
#   at t/test6.t line 191.
#          got: '-ixon'
#     expected: 'ixon'
Argument "t" isn't numeric in int at lib/Win32/SerialPort.pm line 1604.

#   Failed test 'stty "^Q"'
#   at t/test6.t line 233.
#          got: 't'
#     expected: '^Q'

#   Failed test 'stty "^S"'
#   at t/test6.t line 235.
#          got: '~'
#     expected: '^S'

#   Failed test 'is_xon_char'
#   at t/test6.t line 286.
#          got: '196'
#     expected: '17'

#   Failed test 'is_xoff_char'
#   at t/test6.t line 287.
#          got: '63'
#     expected: '19'

#   Failed test 'is_xon_char'
#   at t/test6.t line 289.
#          got: '196'
#     expected: '193'

#   Failed test 'is_xoff_char'
#   at t/test6.t line 290.
#          got: '64'
#     expected: '19'

#   Failed test 'is_xon_char'
#   at t/test6.t line 292.
#          got: '196'
#     expected: '193'

#   Failed test 'is_xoff_char'
#   at t/test6.t line 293.
#          got: '54'
#     expected: '195'

#   Failed test 'is_xon_char'
#   at t/test6.t line 295.
#          got: '196'
#     expected: '17'

#   Failed test 'is_xoff_char'
#   at t/test6.t line 296.
#          got: '54'
#     expected: '19'
Could not set databits on TestPort at t/test6.t line 306.
Could not set stopbits on TestPort at t/test6.t line 306.
Could not set handshake on TestPort at t/test6.t line 322.

#   Failed test 'is_handshake'
#   at t/test6.t line 323.
#          got: 'none'
#     expected: 'xoff'
Could not set handshake on TestPort at t/test6.t line 326.

#   Failed test 'is_handshake'
#   at t/test6.t line 327.
#          got: 'none'
#     expected: 'xoff'
Could not set handshake on TestPort at t/test6.t line 330.

#   Failed test 'is_handshake'
#   at t/test6.t line 332.
#          got: 'none'
#     expected: 'rts'
# Looks like you failed 24 tests of 315.
t/test6.t .. Dubious, test returned 24 (wstat 6144, 0x1800)
Failed 24/315 subtests
        (less 5 skipped subtests: 286 okay)
t/test7.t .. ok

Test Summary Report
-------------------
t/test1.t (Wstat: 5120 Tests: 309 Failed: 20)
  Failed tests:  31, 33, 36-37, 41, 49, 53, 57, 61, 81, 92
                118-119, 278-280, 283-284, 286-287
  Non-zero exit status: 20
t/test2.t (Wstat: 1536 Tests: 146 Failed: 6)
  Failed tests:  3-5, 7, 23-24
  Non-zero exit status: 6
t/test3.t (Wstat: 4608 Tests: 264 Failed: 18)
  Failed tests:  18, 20, 23-24, 28, 36, 40, 44, 48, 90, 116-117
                170, 176, 195, 198, 200, 203
  Non-zero exit status: 18
t/test4.t (Wstat: 6912 Tests: 518 Failed: 27)
  Failed tests:  3-5, 7, 23-24, 74-75, 85, 89-90, 99, 101
                230-232, 234, 244-245, 255-256, 293-294
                296, 312-313, 356
  Non-zero exit status: 27
t/test6.t (Wstat: 6144 Tests: 315 Failed: 24)
  Failed tests:  18, 20, 47-48, 52-53, 90, 92, 109, 112-113
                138, 140, 181-182, 184-185, 187-188, 190-191
                211, 215, 219
  Non-zero exit status: 24
Files=7, Tests=1808,  6 wallclock secs ( 0.13 usr +  0.03 sys =  0.16 CPU)
Result: FAIL
Failed 5/7 test programs. 95/1808 subtests failed.
dmake.exe:  Error code 255, while making 'test_dynamic'
  BBIRTH/Win32-SerialPort-0.22.tar.gz
  F:\MY-FHEM\c\bin\dmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports BBIRTH/Win32-SerialPort-0.22.tar.gz
Stopping: 'install' failed for 'Win32::SerialPort'.
PS F:\my-fhem>

Wenn ich diese richtig verstehe, sieht er den CUL nicht, obwohl der auf COM1 betriebsbereit sein sollte.

ABER wie gesagt, ich schaffe es nicht die CUL.INF als Treiber zu installieren. Es kommt immer die Meldung ein aktuellerer Treiber (usbser.inf) sei installiert.

So weit, so schlecht. Nun habe ich folgende Fragen:

CUL V3 - wo finde ich die aktuellste Firmware (mein Stand ist, es gibt seit 2016 nix neues)?

Wie kann ich die geflashte Firmwareversion auslesen (z.b an ner FHEM-Installation auf Raspi)?

Das sind vermutlich dumme Fragen, aber ich fand echt keine Antwort drauf.

Wie kriege ich WIN10 dazu, die CUL.INF als Treiber zu installieren?

Diverse Anleitungen zum Ausschalten der Signaturkontrolle hab ich ausprobiert. Es kommt immer die selbe Meldung, der beste Treiber sei schon installiert.

Ich habe das Ganze schon 3 mal auf verschiedenen Laptops installiert, aber an diesem Treiberkram hängt es immer wieder.

Ich wäre für jeden Hinweis dankbar.

LG Andreas



BananaPi mit Cul-Stick V3
13 x HM-CC-RT-DN firmware 1.4
1 x HM-HM-LC-SW4
9x HM-LC-Bl1-FM
HM-RC-19

Damian

Zitat von: Andreas_ am 30 Dezember 2018, 16:05:52

Diverse Anleitungen zum Ausschalten der Signaturkontrolle hab ich ausprobiert. Es kommt immer die selbe Meldung, der beste Treiber sei schon installiert.

Ich habe das Ganze schon 3 mal auf verschiedenen Laptops installiert, aber an diesem Treiberkram hängt es immer wieder.

Ich wäre für jeden Hinweis dankbar.

LG Andreas

Das Problem habe ich auch schon festgestellt https://forum.fhem.de/index.php/topic,84372.msg806796.html#msg806796

Ich habe nun etwas recherchiert und eine geänderte CommPort.pm (liegt in C:\Perl\site\lib\Win32API) produziert (siehe Anhang), die auch mit Perl 64-Bit klar kommt. Nun läuft mein FHEM unter Perl-x64 5.26 mit Win32::SerialPort :)
Programmierte FHEM-Module: DOIF-FHEM, DOIF-Perl, DOIF-uiTable, THRESHOLD, FHEM-Befehl: IF

Andreas_

Hallo Damian,

Danke für Deine Hilfe,

ich habe nun
Zitatstrawberry-perl-5.26.2.1-64bit-portable.zip

runter geladen und ins Verzeichnis C:\MY-FHEM kopiert.

Das von Dir genannte Verzeichnis /Win32API gab es nicht, da habe ich es erstellt und Deine Datei eingefügt....... dann noch mal
perl\bin\cpan -i Win32::SerialPort
gemacht. Gleiche Fehlermeldung wie bisher.

Dann habe ich nach dem Dateinamen gesucht und deine Datei 2 Mal in Unterverzeichnisse von CPAN/... reinkopiert und FHEM gestartet.... es geht leider nicht :'(

Wie hast Du den CUL Treiber in Windows installiert?
BananaPi mit Cul-Stick V3
13 x HM-CC-RT-DN firmware 1.4
1 x HM-HM-LC-SW4
9x HM-LC-Bl1-FM
HM-RC-19

czcbe

#3
Da haben andere (auch ich) mal Versuche gemacht: https://forum.fhem.de/index.php/topic,79263.0.html


Bin damals gescheitert...

Hey, aber nimm doch gleich die neueste Strawberry Version und irgendwo hab ich in Erinnerung man soll die ZIP-Version nehmen, nicht die portable...
PATH-Umgebungsvariable auch setzen bzw. prüfen.

Nachtrag: habs jetzt kurz mit der neuesten Strawberry-Version versucht.

- Das Modul Win::SerialPort installiert sich jetzt ohne Fehler.
- Ohne spezielle Treiber-Installation, COM18 wird erkannt im Gerätemanager.
- Modifiziertes CommPort.pm nach perl\vendor\lib\Win32API und perl\site\lib\Win32API (zur Sicherheit an beiden Orten).
- Dann, ich war schon fast in Jubelstimmung, als es 1-2 mal schaltete, aber dann FHEM abschmierte und danach nie mehr eine Schaltung erfolgte. Nach etlichen Neustarts Windows+FHEM war auch alles ziemlich instabil und klemmte, sodass ich den CUL jetzt wieder gelöscht habe

define myCUL CUL com18@38400 1234
FHEM 5.9 (alles auf Win) mit TabletUI | Win2012R2 | Lubuntu 18.04 | Load-Balancing/Failover 4xFHEM | cygwin | nanoCUL 433 | Harmony Hub | IT Funksteckdosen | Squeezebox-Server (LMS) | Kodi | Sprachsteuerung | Webcams | Wetteransage | Telegram Bot | Presence | Winconnect-Powershell

Damian

Zitat von: Andreas_ am 30 Dezember 2018, 20:15:52
Hallo Damian,

Danke für Deine Hilfe,

ich habe nun
runter geladen und ins Verzeichnis C:\MY-FHEM kopiert.

Das von Dir genannte Verzeichnis /Win32API gab es nicht, da habe ich es erstellt und Deine Datei eingefügt....... dann noch mal
perl\bin\cpan -i Win32::SerialPort
gemacht. Gleiche Fehlermeldung wie bisher.

Dann habe ich nach dem Dateinamen gesucht und deine Datei 2 Mal in Unterverzeichnisse von CPAN/... reinkopiert und FHEM gestartet.... es geht leider nicht :'(

Wie hast Du den CUL Treiber in Windows installiert?

Ich habe die aktuelle Active Perl Version (5.26.3) von hier https://www.activestate.com/products/activeperl/downloads/ installiert.

Die Installation aus dem Wiki
Zitatperl\bin\cpan -i Win32::SerialPort
scheitert bei mir auch.

Es reicht aber die beiden Dateien aus dem Zip-Ordner (inkl. Verzeichnisse) nach perl\site\lib zu kopieren.


Programmierte FHEM-Module: DOIF-FHEM, DOIF-Perl, DOIF-uiTable, THRESHOLD, FHEM-Befehl: IF

Andreas_

Hallo Damian,

ich habe die von Dir genannte Perl-Version installiert. Das erzeugt ja ein C:\Perl64 Verzeichnis.

Meine FHEM ist ja (provisorisch) auf F:\MY-FHEM wie im Wiki beschrieben, installiert. Dort hin habe ich bisher auch die verschiedenen Strawberry-Perls hinein kopiert, die allesamt nicht funktionierten.

Wie starte ich denn nun "mein" FHEM mit "Deinem" Perl?

LG Andreas




BananaPi mit Cul-Stick V3
13 x HM-CC-RT-DN firmware 1.4
1 x HM-HM-LC-SW4
9x HM-LC-Bl1-FM
HM-RC-19

Damian

Mit perl -v siehst du welche Perlversion angezogen wird. Gegenfalls muss du unter "Erweiterte Systemeinstellungen"  bei Umgebungsvariablen die entsprechenden Pfade (Variable Path) zu Perl anpassen.
Programmierte FHEM-Module: DOIF-FHEM, DOIF-Perl, DOIF-uiTable, THRESHOLD, FHEM-Befehl: IF

Andreas_

Hallo Damian,

.... der Cul scheint erkannt zu werden, ich kann auch die Version auslesen, war ja ne Frage von mir.... ;D
ZitatCUL_0 version => V 1.61 CUL868

Wenn ich FHEM starte kommt folgender log:


2018.12.31 17:54:57 1: starting in console mode
2018.12.31 17:54:57 1: Including fhem.cfg
2018.12.31 17:54:58 3: WEB: port 8083 opened
2018.12.31 17:54:58 3: WEBphone: port 8084 opened
2018.12.31 17:54:58 3: WEBtablet: port 8085 opened
2018.12.31 17:54:58 2: eventTypes: loaded 82 events from ./log/eventTypes.txt
2018.12.31 17:54:58 3: Opening CUL_0 device com1
2018.12.31 17:54:58 3: Setting CUL_0 serial parameters to 9600,8,N,1
2018.12.31 17:54:58 3: CUL_0: Possible commands: BbCFiAZEKGMKUYRTVWXefmltux
2018.12.31 17:54:58 3: CUL_0 device opened
2018.12.31 17:54:59 1: Including ./log/fhem.save
2018.12.31 17:54:59 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/10_CUL_HM.pm line 4114.
2018.12.31 17:54:59 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/10_CUL_HM.pm line 4115.
2018.12.31 17:54:59 3: Device Arbeitszimmer_1 added to ActionDetector with 000:10 time

----und so weiter------

2018.12.31 17:54:59 3: Device WZ3_41 added to ActionDetector with 000:10 time
2018.12.31 17:54:59 0: Featurelevel: 5.9
2018.12.31 17:54:59 0: Server started with 191 defined entities (fhem.pl:18029/2018-12-22 perl:5.026003 os:MSWin32 user:admin pid:11256)
2018.12.31 17:55:25 3: CUL_HM set Licht_links toggle
2018.12.31 17:55:26 3: CUL_HM set Licht_links toggle



Sieht doch eigentlich ganz gut aus.... ABER es tut nichts... mit den letzten beiden Zeilen könnte ich ne Lampe schalten,,,,, :D Es wäre ja zu einfach..

Vielleicht hast Du nächstes Jahr ne Idee? 

Auf jeden Fall erst mal einen guten Rutsch ins neue Jahr und ganz herzlichen Dank für die tolle Hilfe, die auch ich verstehen und umsetzen konnte.

LG
Andreas
BananaPi mit Cul-Stick V3
13 x HM-CC-RT-DN firmware 1.4
1 x HM-HM-LC-SW4
9x HM-LC-Bl1-FM
HM-RC-19

LuckyDay

2018.12.31 17:54:59 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/10_CUL_HM.pm line 4114.
2018.12.31 17:54:59 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/10_CUL_HM.pm line 4115.


da fehlt
define  hm HMinfo
damit verschwinden die zwei PERL WARNING

dann ein
list CUL_0 und hier den Output posten
genauso
list Licht_linksund hier den Output posten

Andreas_

#9
Hallo Hary,

Zitatda fehlt
Code: [Auswählen]

define  hm HMinfo

damit verschwinden die zwei PERL WARNING

Ja, das hat gestimmt. DANKE!

ZitatCode: [Auswählen]

list CUL_0

ergibt dann

Internals:
   CMDS       BbCFiAZEKGMKUYRTVWXefmltux
   Clients    :FS20:FHT.*:KS300:USF1000:BS:HMS:FS20V: :CUL_EM:CUL_WS:CUL_FHTTK:CUL_HOERMANN: :ESA2000:CUL_IR:CUL_TX:Revolt:IT:UNIRoll:SOMFY: :STACKABLE_CC:TSSTACKED:STACKABLE:CUL_RFR::CUL_TCM97001:CUL_REDIRECT:
   DEF        com1@9600 1234
   DeviceName com1@9600
   FHTID      1234
   NAME       CUL_0
   NR         37
   PARTIAL   
   STATE      Initialized
   TYPE       CUL
   VERSION    V 1.61 CUL868
   initString X21
   MatchList:
     0:FS20V    ^81..(04|0c)..0101a001......00[89a-f]...
     1:USF1000  ^81..(04|0c)..0101a001a5ceaa00....
     2:BS       ^81..(04|0c)..0101a001a5cf
     3:FS20     ^81..(04|0c)..0101a001
     4:FHT      ^81..(04|09|0d)..(0909a001|83098301|c409c401)..
     5:KS300    ^810d04..4027a001
     6:CUL_WS   ^K.....
     7:CUL_EM   ^E0.................$
     8:HMS      ^810e04......a001
     9:CUL_FHTTK ^T[A-F0-9]{8}
     A:CUL_RFR  ^[0-9A-F]{4}U.
     B:CUL_HOERMANN ^R..........
     C:ESA2000  ^S................................$
     D:CUL_IR   ^I............
     E:CUL_TX   ^TX[A-F0-9]{10}
     F:Revolt   ^r......................$
     G:IT       ^i......
     H:STACKABLE_CC ^\*
     I:UNIRoll  ^[0-9A-F]{5}(B|D|E)
     J:SOMFY    ^Y[r|t|s]:?[A-F0-9]+
     K:CUL_TCM97001 ^s[A-F0-9]+
     L:CUL_REDIRECT ^o+
     M:TSSTACKED ^\*
     N:STACKABLE ^\*
   READINGS:
     2018-12-31 17:32:46   ccconf          freq:868.300MHz bWidth:325KHz rAmpl:42dB sens:4dB
     2019-01-01 12:27:11   cmds             B b C F i A Z E K G M K U Y R T V W X e f m l t u x
     2019-01-01 12:27:12   state           Initialized
     2018-12-31 17:31:44   uptime          0 00:46:57
     2018-12-31 17:31:29   version         V 1.61 CUL868
   helper:
Attributes:


Und
ZitatCode: [Auswählen]

list Licht_links

ergibt

Internals:
   DEF        69322A02
   NAME       Licht_links
   NOTIFYDEV  global
   NR         373
   NTFY_ORDER 50-Licht_links
   STATE      set_toggle
   TYPE       CUL_HM
   chanNo     02
   device     HM_69322A
   READINGS:
     2019-01-01 12:31:42   state           set_toggle
     2018-12-31 17:28:57   trigLast        fhem:02
   helper:
     dlvl       C8
     dlvlCmd    ++A011F1123469322A0202C80000
     regLst     ,1,3p
     expert:
       def        1
       det        0
       raw        1
       tpl        0
     role:
       chn        1
     tmpl:
Attributes:
   group      Licht_EG
   model      HM-LC-Sw2PBU-FM
   room       Erdgeschoss
   webCmd     statusRequest:toggle:on:off



Das sieht doch nicht schlecht aus.... tut aber nicht  ::)

Anmerkung: Ich habe ja das ganze FHEM-Verzeichnis von meinem Raspi auf den Windows-Rechner kopiert nachdem ich FHEM auf Windows gemäß WIKI zum laufen gebracht habe. Dann habe ich nur diese CUL-Definition geändert und nun noch die fehlende Zeile "define HMInfo...." ergänzt...

Hätte ich vielleicht nicht alles überschreiben dürfen?

LG Andreas
BananaPi mit Cul-Stick V3
13 x HM-CC-RT-DN firmware 1.4
1 x HM-HM-LC-SW4
9x HM-LC-Bl1-FM
HM-RC-19

LuckyDay

beim Cul eben noch
attr rfmode HomeMatic
attr hmId F123456

und bei deinen Schalter im device HM_69322A

das
attr IODev --> sollte CUL_0 drin stehen
und dann könnte das auch tun

Ansonsten hier nochmal ein list HM_69322A hier anfügen

Andreas_

#11
Ich habe jetzt in einem anderen Verzeichnis noch mal FHEM 5.9 neu installiert und upgedated. Dann habe ich den CUL und den Lichtschalter aus meiner FHEM.cfg hineinkopiert. Der Cul wird initialisiert, die Lampe tut dennoch nicht.
Die fhem.cfg-Datei sieht so aus:

attr global userattr cmdIcon devStateIcon:textField-long devStateStyle icon sortby webCmd webCmdLabel:textField-long widgetOverride
attr global autoload_undefined_devices 1
attr global logfile ./log/fhem-%Y-%m.log
attr global modpath .
attr global motd SecurityCheck:\
  WEB is not password protected\
\
Protect this FHEM installation by defining an allowed device with define allowed allowed\
You can disable this message with attr global motd none
attr global nofork 1
attr global statefile ./log/fhem.save
attr global verbose 3

define WEB FHEMWEB 8083 global
attr WEB editConfig 1

# Fake FileLog entry, to access the fhem log from FHEMWEB
define Logfile FileLog ./log/fhem-%Y-%m.log fakelog

define autocreate autocreate
attr autocreate filelog ./log/%NAME-%Y.log

define eventTypes eventTypes ./log/eventTypes.txt

# Disable this to avoid looking for new USB devices on startup
define initialUsbCheck notify global:INITIALIZED usb create


define CUL_0 CUL com1@9600 1234
attr rfmode HomeMatic
attr hmId F123456

define HM_69322A CUL_HM 69322A
attr HM_69322A IODev CUL_0
attr HM_69322A autoReadReg 4_reqStatus
attr HM_69322A expert 2_raw
attr HM_69322A firmware 2.9
attr HM_69322A model HM-LC-Sw2PBU-FM
attr HM_69322A room CUL_HM
attr HM_69322A serialNr PEQ0196122
attr HM_69322A subType switch
attr HM_69322A webCmd getConfig:clear msgEvents

define Licht_links CUL_HM 69322A02

attr Licht_links model HM-LC-Sw2PBU-FM
attr Licht_links room Erdgeschoss
attr Licht_links webCmd statusRequest:toggle:on:off


Ich weiß, das man nicht händisch in der Datei rummurksen soll, aber anders hab ich es nicht hinbekommen.

hier noch die Listings von CUL und Lampe_links und  dem 69322A:

Internals:
   CMDS       BbCFiAZEKGMKUYRTVWXefmltux
   Clients    :FS20:FHT.*:KS300:USF1000:BS:HMS:FS20V: :CUL_EM:CUL_WS:CUL_FHTTK:CUL_HOERMANN: :ESA2000:CUL_IR:CUL_TX:Revolt:IT:UNIRoll:SOMFY: :STACKABLE_CC:TSSTACKED:STACKABLE:CUL_RFR::CUL_TCM97001:CUL_REDIRECT:
   DEF        com1@9600 1234
   DeviceName com1@9600
   FHTID      1234
   NAME       CUL_0
   NR         16
   NR_CMD_LAST_H 4
   PARTIAL   
   STATE      Initialized
   TYPE       CUL
   VERSION    V 1.61 CUL868
   initString X21
   MatchList:
     0:FS20V    ^81..(04|0c)..0101a001......00[89a-f]...
     1:USF1000  ^81..(04|0c)..0101a001a5ceaa00....
     2:BS       ^81..(04|0c)..0101a001a5cf
     3:FS20     ^81..(04|0c)..0101a001
     4:FHT      ^81..(04|09|0d)..(0909a001|83098301|c409c401)..
     5:KS300    ^810d04..4027a001
     6:CUL_WS   ^K.....
     7:CUL_EM   ^E0.................$
     8:HMS      ^810e04......a001
     9:CUL_FHTTK ^T[A-F0-9]{8}
     A:CUL_RFR  ^[0-9A-F]{4}U.
     B:CUL_HOERMANN ^R..........
     C:ESA2000  ^S................................$
     D:CUL_IR   ^I............
     E:CUL_TX   ^TX[A-F0-9]{10}
     F:Revolt   ^r......................$
     G:IT       ^i......
     H:STACKABLE_CC ^\*
     I:UNIRoll  ^[0-9A-F]{5}(B|D|E)
     J:SOMFY    ^Y[r|t|s]:?[A-F0-9]+
     K:CUL_TCM97001 ^s[A-F0-9]+
     L:CUL_REDIRECT ^o+
     M:TSSTACKED ^\*
     N:STACKABLE ^\*
   READINGS:
     2019-01-01 14:12:33   cmds             B b C F i A Z E K G M K U Y R T V W X e f m l t u x
     2019-01-01 14:12:33   state           Initialized
   XMIT_TIME:
     1546348372.6019
     1546348378.08146
     1546348383.89778
     1546348388.89631
   helper:
     69322A:
       QUEUE:
Attributes:



Internals:
   DEF        69322A02
   NAME       Licht_links
   NOTIFYDEV  global
   NR         22
   NTFY_ORDER 50-Licht_links
   STATE      set_on
   TYPE       CUL_HM
   chanNo     02
   device     HM_69322A
   READINGS:
     2019-01-01 13:57:41   state           set_on
     2019-01-01 13:57:38   trigLast        fhem:02
   helper:
     dlvl       C8
     dlvlCmd    ++A011F1123469322A0202C80000
     regLst     ,1,3p
     expert:
       def        1
       det        0
       raw        1
       tpl        0
     role:
       chn        1
Attributes:
   model      HM-LC-Sw2PBU-FM
   room       Erdgeschoss
   webCmd     statusRequest:toggle:on:off


Internals:
   DEF        69322A
   IODev      CUL_0
   NAME       HM_69322A
   NOTIFYDEV  global
   NR         18
   NTFY_ORDER 50-HM_69322A
   STATE      MISSING ACK
   TYPE       CUL_HM
   channel_02 Licht_links
   protCmdDel 1
   protResnd  3 last_at:2019-01-01 14:07:51
   protResndFail 1 last_at:2019-01-01 14:07:57
   protSnd    1 last_at:2019-01-01 14:07:38
   protState  CMDs_done_Errors:1
   READINGS:
     2019-01-01 13:51:09   D-firmware      2.9
     2019-01-01 13:51:09   D-serialNr      PEQ0196122
     2019-01-01 14:07:57   state           MISSING ACK
   helper:
     HM_CMDNR   147
     cSnd       ,11F1123469322A0202C80000
     mId        0101
     regLst     ,0,1,3p
     rxType     1
     expert:
       def        1
       det        0
       raw        1
       tpl        0
     io:
       newChn     +69322A,00,00,00
       prefIO     
       rxt        0
       vccu       
       p:
         69322A
         00
         00
         00
     mRssi:
       mNo       
     prt:
       bErr       0
       sProc      0
     q:
       qReqConf   00
       qReqStat   00
     role:
       chn        1
       dev        1
       prs        1
Attributes:
   IODev      CUL_0
   autoReadReg 4_reqStatus
   expert     2_raw
   firmware   2.9
   model      HM-LC-Sw2PBU-FM
   room       CUL_HM
   serialNr   PEQ0196122
   subType    switch
   webCmd     getConfig:clear msgEventsInternals:
   DEF        69322A
   IODev      CUL_0
   NAME       HM_69322A
   NOTIFYDEV  global
   NR         18
   NTFY_ORDER 50-HM_69322A
   STATE      MISSING ACK
   TYPE       CUL_HM
   channel_02 Licht_links
   protCmdDel 1
   protResnd  3 last_at:2019-01-01 14:07:51
   protResndFail 1 last_at:2019-01-01 14:07:57
   protSnd    1 last_at:2019-01-01 14:07:38
   protState  CMDs_done_Errors:1
   READINGS:
     2019-01-01 13:51:09   D-firmware      2.9
     2019-01-01 13:51:09   D-serialNr      PEQ0196122
     2019-01-01 14:07:57   state           MISSING ACK
   helper:
     HM_CMDNR   147
     cSnd       ,11F1123469322A0202C80000
     mId        0101
     regLst     ,0,1,3p
     rxType     1
     expert:
       def        1
       det        0
       raw        1
       tpl        0
     io:
       newChn     +69322A,00,00,00
       prefIO     
       rxt        0
       vccu       
       p:
         69322A
         00
         00
         00
     mRssi:
       mNo       
     prt:
       bErr       0
       sProc      0
     q:
       qReqConf   00
       qReqStat   00
     role:
       chn        1
       dev        1
       prs        1
Attributes:
   IODev      CUL_0
   autoReadReg 4_reqStatus
   expert     2_raw
   firmware   2.9
   model      HM-LC-Sw2PBU-FM
   room       CUL_HM
   serialNr   PEQ0196122
   subType    switch
   webCmd     getConfig:clear msgEvents


LG
Andreas
BananaPi mit Cul-Stick V3
13 x HM-CC-RT-DN firmware 1.4
1 x HM-HM-LC-SW4
9x HM-LC-Bl1-FM
HM-RC-19

LuckyDay

define CUL_0 CUL com1@9600 1234
attr CUL_0 rfmode HomeMatic
attr CUL_0 hmId F11234

du bist ein config Editierer, dann musst du auch es korrekt eintragen

im Web wäre dir das nicht passiert.

solange dein Cul auf slow rf funkt wird das auch nichts.

die HMID F11234 ist von mir "geraten" ob dir früher so bei dir war? Achtung hatte mich vertippt bei meinem letzten Eintrag.

Andreas_

SOOO... ein kleiner Erfolg stellt sich ein.

Ich habe define CUL_0 CUL com1@9600 1234

auf define CUL_0 CUL com1@9600 1034
geändert.

Die Lampe schaltet, aber zeitlich teilweis einige Sekunden verzögert
BananaPi mit Cul-Stick V3
13 x HM-CC-RT-DN firmware 1.4
1 x HM-HM-LC-SW4
9x HM-LC-Bl1-FM
HM-RC-19

Andreas_

Jetzt haben unsere Antworten sich überschnitten,,,

define CUL_0 CUL com1@9600 1234
attr CUL_0 rfmode HomeMatic
attr CUL_0 hmId F11234


Die ersten beiden Zeilen habe ich ja (fast) so drin (1034 statt 1234)

Das hmId ist in meiner funktionierenden Raspi-FHEM nicht gesetzt....

Muss ich das setzen?
ZitatSet the HomeMatic ID of this device. If this attribute is absent, the ID will be F1<FHTID>. Note 1: After setting or changing this attribute you have to relearn all your HomeMatic devices. Note 2: The value must be a 6 digit hex number, and 000000 is not valid. FHEM won't complain if it is not correct, but the communication won't work.

Das versteh ich nicht,,, müsste ich dann alle Aktoren neu einlernen?

ich habe noch mal
attr CUL_0 rfmode HomeMatic
über das Web-Interface gemacht...

Es schaltet ab und zu. Im log steht nun
2019.01.01 14:44:17 3: CUL_HM set Licht_links on
2019.01.01 14:44:19 3: CUL_0: Unknown code A0F8D86102225E50000000AACEC0D0E00::-69.5:CUL_0, help me!
2019.01.01 14:44:20 3: CUL_0: Unknown code A0FEA86102225D30000000ABD0F0F0500::-74:CUL_0, help me!
2019.01.01 14:44:20 3: CUL_HM set Licht_links off
2019.01.01 14:44:21 3: CUL_0: Unknown code A0F7886102225C00000000AB4F30E1800::-37.5:CUL_0, help me!
2019.01.01 14:44:22 3: CUL_HM set Licht_links on


Aber immerhin,,,, es geht vorwärts....  ;) ;) ;)

BananaPi mit Cul-Stick V3
13 x HM-CC-RT-DN firmware 1.4
1 x HM-HM-LC-SW4
9x HM-LC-Bl1-FM
HM-RC-19