UDP transport in plugin not working

Python and python framework

Moderator: leecollings

Post Reply
frustreerMeneer
Posts: 39
Joined: Tuesday 21 March 2017 11:56
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

UDP transport in plugin not working

Post by frustreerMeneer »

I'm trying to get UDP working for a plugin, but i've unsuccessful so far.

Following the UDP Discovery example i added the following to onStart:

Code: Select all

UDPStatusConn = Domoticz.Connection(Name="UDPStatus", Transport="UDP/IP", Address="0.0.0.0", Port="9999")
UDPStatusConn.Listen()
I'm getting the following in my log:

Code: Select all

2019-12-05 13:51:45.734 (MyPlugin) Connection '0.0.0.0:9999' released by Python, reference count is 1.
2019-12-05 13:51:45.769 (MyPlugin) Disconnect directive received for '0.0.0.0:9999'.
2019-12-05 13:51:45.769 (MyPlugin) Handling UDP disconnect, socket (0.0.0.0:9999) is connected
2019-12-05 13:51:45.770 (MyPlugin) Queued asynchronous UDP read aborted (0.0.0.0:9999).
2019-12-05 13:51:45.821 (MyPlugin) Disconnect event received for '0.0.0.0:9999'.
2019-12-05 13:51:45.821 (MyPlugin) Deallocating connection object 'UDPStatus' (0.0.0.0:9999).
I tried many variations of Address and Port but i keep getting this error or no error at all (and no messages in onMessage).

I am receiving UDP packets when using a simple Python UDP example script.

Am i missing something or can't this work at all?

Currently using Domoticz V4.11474

Thanks for co-thinking ;-)
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest