Ankündigung

Einklappen
Keine Ankündigung bisher.

UDP Problem

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

    UDP Problem

    Hallo,
    ich versuche per UDP Daten von einem externen Gerät an openHAB zu senden, hier die config:
    Code:
    #openHAB.cfg:
    udp:port=25002
    udp:itemsharedconnections=true
    udp:bindingsharedconnections=true
    udp:refreshinterval=250
    
    #items:
    Switch  Licht_Ambiente  { udp="<[192.168.0.198:68:'REGEX((.*))']" }
    Also mein externes Gerät (192.168.0.198) sendet auf lokalem Port 68 an 192.168.0.70:25002
    Im Moment sende ich nur eine "0" (Null)
    Folgende Ausgaben im Log:
    Code:
    18:16:34.161 INFO  o.o.b.t.AbstractDatagramChannelBinding[:781] - The maximum buffer will be set to the default value of 1024
    18:16:34.163 INFO  o.o.b.t.AbstractDatagramChannelBinding[:788] - The interval to retry connection setups will be set to the default value of 5
    18:16:34.165 INFO  o.o.b.t.AbstractDatagramChannelBinding[:795] - The cron job to reset connections will be set to the default value of 0 0 0 * * ?
    18:16:34.177 INFO  o.o.b.t.AbstractDatagramChannelBinding[:823] - The setting to share channels between directions will be set to the default vaulue of true
    18:16:34.178 INFO  o.o.b.t.AbstractDatagramChannelBinding[:830] - The setting to use address masks for incoming connections will be set to the default value of true
    18:16:34.238 INFO  o.o.b.t.AbstractDatagramChannelBinding[:693] - Listening for incoming data on /0:0:0:0:0:0:0:0:25002
    18:16:34.258 INFO  o.o.b.t.p.internal.UDPBinding[:157] - The maximum time out for blocking write operations will be set to the default vaulue of 3000
    18:16:34.259 INFO  o.o.b.t.p.internal.UDPBinding[:164] - The blocking nature of read/write operations will be set to the default vaulue of false
    18:16:34.261 INFO  o.o.c.s.AbstractActiveService[:169] - UDP Refresh Service has been started
    18:16:34.276 INFO  o.o.b.t.AbstractDatagramChannelBinding[:1258] - We will accept data coming from the remote end /192.168.0.198:68
    18:16:34.260 INFO  o.o.b.t.p.internal.UDPBinding[:171] - The preamble for all write operations will be set to the default vaulue of 
    18:16:34.278 INFO  o.o.b.t.p.internal.UDPBinding[:178] - The postamble for all write operations will be set to the default vaulue of 
    
    18:16:34.284 INFO  o.o.b.t.p.internal.UDPBinding[:185] - Updating states with returned values will be set to the default vaulue of true
    18:16:35.400 INFO  o.o.m.c.i.ModelRepositoryImpl[:79] - Loading model 'default.rules'
    18:16:43.532 INFO  org.openhab.model.script.start[:53] - --Start -------------------------------------------------------------------------------------
    18:16:43.849 INFO  o.openhab.io.net.exec.ExecUtil[:66] - executed commandLine '/volume1/script/piep1.sh'
    18:17:06.246 WARN  o.o.b.t.AbstractDatagramChannelBinding[:1480] - Received data 0 from an undefined remote end /192.168.0.198:68. We will not process it
    18:17:06.248 WARN  o.o.b.t.AbstractDatagramChannelBinding[:1511] - No channel is active or defined for the data we received from /192.168.0.198:68. It will be discarded.
    Die letzten beiden Zeilen werden für jedes UDP Datagramm ausgegeben.
    Es wird auch nichts ausgelöst.
    Kann mir jemand sagen was ich falsch mache ?

    Holger

    edit: Version ist ein 1.4 Snapshot von Anfang Dezember

    #2
    Hallo,

    ich hatte das selbe Problem mit meiner 1.4.-Snapshot-Version von Ende September 2013.

    Das Problem verschwand, nachdem ich die Remote-IP Adresse durch einen * ersetzt habe.

    Bei Dir müsste das so aussehen:

    Code:
     Switch  Licht_Ambiente  { udp="<[*:68:'REGEX((.*))']" }
    Der Nachteil ist, daß jetzt jeder Sender im Netz, der von Port 68 ein UDP-Paket absetzt, Dein Licht schalten kann, und nicht nur der Sender mit der IP 192.168.0.198

    MFG Kesthal

    Kommentar


      #3
      Danke für deine Rückmeldung. Probier ich demnächst mal aus. Holger

      Kommentar


        #4
        Ich habe es mittlerweile aufgegeben, UDP zum laufen zu bringen.

        Das Lesen von Daten mit *:Port hat zwar funktioniert, dafür ging ab dem Moment das schreiben von Daten-Paketen nicht mehr, was zuvor funktioniert hat.

        Code:
        12:28:00.435 WARN  o.o.b.t.AbstractDatagramChannelBinding[:1217]- When using address masks we will not verify if we are already listening to similar incoming connections
        12:28:00.444 INFO  o.o.b.t.AbstractDatagramChannelBinding[:1218]- We will accept data coming from the remote end *:8888
        12:28:00.446 INFO  o.o.b.t.AbstractDatagramChannelBinding[:1256]- We will accept data coming from the remote end with mask *:8888
        12:28:00.457 INFO  o.o.b.t.AbstractDatagramChannelBinding[:1341]- 'Connecting' the channel Channel [item=Licht_GR_Schlafzi_Decke, command=OFF, direction=OUT, remote=/192.168.178.50:8888, buffer=, isBlocking=false, isReconnecting=false, channel=, host=192.168.178.50, port=8888] 
        12:28:00.459 INFO  o.o.b.t.AbstractDatagramChannelBinding[:1348]- There is already an active channel sun.nio.ch.DatagramChannelImpl@fd75344 for the remote end /192.168.178.50:8888
        Selbst ein Umstieg auf die neueste 1.5-Snapshot-Version von Openhab hat nichts gebracht.

        Entweder ist das ganze UDP-Binding noch recht buggy, oder es fehlt eine kleine Dokumentation, an der man ablesen kann, wie die Parameter in der Konfiguration anzugeben sind.

        Ich habe meine Steuerung jetzt mit dem http-Binding gelöst, da funktioniert alles wunderbar.

        Kommentar


          #5
          Ich habe auch alles auf HTTP, wollte es aber auch mal mit UDP testen. Holger

          Kommentar

          Lädt...
          X