<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to receive data on openhab using UDP ?  (solved)]]></title><description><![CDATA[<p dir="auto">Hello !</p>
<p dir="auto">Here is the problem I am facing :</p>
<p dir="auto">I have an arduino node communicating using UDP. It sends on port 600 receives on port 500.<br />
I would like to be able to send and receive data to this node from the openhab.</p>
<p dir="auto">Sending data has been straight forward.  It works nicely.  On the other hand I did not manage to get<br />
any data from this node.  I tried various changes in the config file and in the way to do the incoming<br />
binding but I still got warnings.   Here are some information on my setup :</p>
<p dir="auto">items setup  :</p>
<pre><code>String fromUDPnode "fromUDPnode" {udp="&lt;[192.168.0.9:500:'REGEX((.*))']"}
String toUDPnode "toUDPnode" {udp="&gt;[192.168.0.9:500:'REGEX((.*))']"}

</code></pre>
<p dir="auto">config  :</p>
<pre><code>udp:itemsharedconnections=true
udp:bindingsharedconnections=true
udp:directionssharedconnections=false
udp:addressmask=true
udp:postamble=
udp:blocking=false
udp:refreshinterval=250
udp:port=600
</code></pre>
<p dir="auto">and here are the warnings I get :</p>
<pre><code> [WARN ] [AbstractDatagramChannelBinding] - Received data 10;59;1;0;23;0
         from an undefined remote end /192.168.0.9:500. We will not process it
 [WARN ] [AbstractDatagramChannelBinding] - No channel is active or defined for the data we received from /192.168.0.9:500. It will be discarded.
</code></pre>
<p dir="auto">seems openhab receives the data but discard them ...</p>
<p dir="auto">any clue on how to solve this issue ?</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.mysensors.org/topic/1238/how-to-receive-data-on-openhab-using-udp-solved</link><generator>RSS for Node</generator><lastBuildDate>Thu, 11 Jun 2026 14:08:07 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/1238.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 12 Apr 2015 08:57:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to receive data on openhab using UDP ?  (solved) on Fri, 26 Jun 2015 06:18:51 GMT]]></title><description><![CDATA[<p dir="auto">I had the same issue and found this post quite fast but although it says "(solved)" I found no solution. I am leaving my reply here for future reference.</p>
<p dir="auto">What I did to fix the "It will be discarded" message:</p>
<h4>[openhab.cfg]</h4>
<p dir="auto">This sets up the receiving end of the binding i.e. the server that binds the 5005 port.</p>
<pre><code>udp:port=5005
</code></pre>
<h4>[default.items]</h4>
<p dir="auto">This sets up the openhab binding to the string. Notice the asterisk after the IP address; because the client will connect to the server it will get assigned a random free port. The asterisk will catch all ports a client will get solving the "No channel is active or defined issue".</p>
<pre><code>String 	String_FF_Bath_Test 	"Test String[%s]" 	 {udp="&lt;[127.0.0.1:\*:'REGEX((.\*))']"}
</code></pre>
<h4>[python]</h4>
<p dir="auto">Just some test code to easily send a UDP message to openhab.</p>
<pre><code>import socket
UDP_IP = "127.0.0.1"
UDP_PORT = 5005
MESSAGE = "Hello world!"

print "UDP target IP:", UDP_IP
print "UDP target port:", UDP_PORT
print "message:", MESSAGE

sock = socket.socket(socket.AF_INET, # Internet
                 socket.SOCK_DGRAM) # UDP
sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
</code></pre>
]]></description><link>https://forum.mysensors.org/post/16045</link><guid isPermaLink="true">https://forum.mysensors.org/post/16045</guid><dc:creator><![CDATA[Jasper van Zuijlen]]></dc:creator><pubDate>Fri, 26 Jun 2015 06:18:51 GMT</pubDate></item></channel></rss>