Ankündigung

Einklappen
Keine Ankündigung bisher.

Probleme mit dem SerialBinding

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Probleme mit dem SerialBinding

    Hallo zusammen,

    ich habe mittlerweile openhab auf einem Igel laufen und möchte mehrere Hardware-Buttons (Klingel, potentialfreie Ports an unserem Passivhaus-Kompaktgerät usw.) mittels SerialBinding einbinden.

    Da mir zwei Ports nicht reichen, habe ich den Igel mit einer Stallion EasyIO-4 (4 ports) aufgerüstet.

    Serial HOWTO

    Die Serial-Devices wurden auch korrekt erkannt und angelegt:

    root@igel:/srv/openhab/logs# ls /dev/ttyE* -al
    crw-rw---- 1 root dialout 24, 0 20. Mär 22:58 /dev/ttyE0
    crw-rw---- 1 root dialout 24, 1 24. Nov 11:17 /dev/ttyE1
    crw-rw---- 1 root dialout 24, 2 24. Nov 11:17 /dev/ttyE2
    crw-rw---- 1 root dialout 24, 3 24. Nov 11:17 /dev/ttyE3

    Mittels minicom kann ich mich auch auf das Device /dev/ttyE0 verbinden
    und sehe Signale meines Klingelknopfes.

    Entsprechende Bindings habe ich testweise in meine Itelm-Datei eingefügt:

    Switch Klingel0 "Bell0" (Haustechnik) { serial="/dev/ttyE0" }
    Switch Klingel1 "Bell1" (Haustechnik) { serial="/dev/ttyE1" }
    Switch Klingel2 "Bell2" (Haustechnik) { serial="/dev/ttyE2" }
    Switch Klingel3 "Bell3" (Haustechnik) { serial="/dev/ttyE3" }

    Das ganze leider mit folgendem Ergebnis:

    root@igel:/srv/openhab/logs# grep ttyE openhab.log -A3
    org.openhab.model.item.binding.BindingConfigParseE xception: Could not open serial port /dev/ttyE0: Serial port '/dev/ttyE0' could not be found. Available ports are:
    /dev/ttyUSB0
    /dev/ttyS1
    /dev/ttyS0
    --
    org.openhab.model.item.binding.BindingConfigParseE xception: Could not open serial port /dev/ttyE1: Serial port '/dev/ttyE1' could not be found. Available ports are:
    /dev/ttyUSB0
    /dev/ttyS1
    /dev/ttyS0
    --
    org.openhab.model.item.binding.BindingConfigParseE xception: Could not open serial port /dev/ttyE2: Serial port '/dev/ttyE2' could not be found. Available ports are:
    /dev/ttyUSB0
    /dev/ttyS1
    /dev/ttyS0
    --
    org.openhab.model.item.binding.BindingConfigParseE xception: Could not open serial port /dev/ttyE3: Serial port '/dev/ttyE3' could not be found. Available ports are:
    /dev/ttyUSB0
    /dev/ttyS1
    /dev/ttyS0


    Hat jemand eine Idee, warum openhab die Devices ttyE* nicht erkennt? Mache ich etwas falsch?

    Über eine Lösung würde ich mich sehr freuen.

    Herzliche Grüße!
    -Boris

    #2
    Hallo Boris,

    kannst Du mal versuchen, ob der Parameter "gnu.io.rxtx.SerialPorts" weiterhilft? Siehe https://groups.google.com/d/msg/open...I/l1THrMG-LjQJ

    Viele Grüße,
    Kai

    Kommentar


      #3
      Hallo Kai,

      vielen Dank! Das hat geholfen!

      Die "start.sh" sieht jetzt wie folgt aus:

      <schnipp>
      java -Dosgi.clean=true -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dgnu.io.rxtx.SerialPorts=/dev/ttyE0:/dev/ttyE1:/dev/ttyE2:/dev/ttyE3 -Djetty.port=$HTTP_PORT -Dj
      etty.port.ssl=$HTTPS_PORT -Djetty.home=. -Dlogback.configurationFile=configurations/logback.xml -Dfelix.fileinstall.dir=addons -Djava.library.path=lib -Djava.security.a
      uth.login.config=./etc/login.conf -Dorg.quartz.properties=./etc/quartz.properties -Dequinox.ds.block_timeout=240000 -Dequinox.scr.waitTimeOnBlock=60000 -Djava.awt.headl
      ess=true -jar $cp $* -console
      </schnapp>

      Mit folgendem Ergebnis:

      root@igel:/srv/openhab/logs# grep Klingel0 events.log
      2013-03-21 08:46:03 - Klingel0 state updated to ON
      2013-03-21 08:46:03 - Klingel0 state updated to OFF
      2013-03-21 08:46:06 - Klingel0 state updated to ON
      2013-03-21 08:46:06 - Klingel0 state updated to OFF

      :-)

      Einzig sind mir beim starten der Binary für jedes ttyE* zwei "Lockfile-Exists" Fehler aufgefallen. Offensichtlich aber ohne negativen Effekt.

      Viele Grüße!
      -Boris

      Kommentar

      Lädt...
      X