HomeGenie Forum

Automation Program Plugins and Wizard Scripting => Help => Topic started by: KaZe on June 24, 2015, 03:29:09 PM

Title: Receive UDP message
Post by: KaZe on June 24, 2015, 03:29:09 PM
I'd like to use UDP connection. I can send a message to my relay board, but I can't receive the message from it.
So far, I have used a TCP connection. When I sent a message to a relay board, I get an answer that I accept the OnMessageReceived command.
But unfortunately I do not get a message over UDP.

It was a TCP connection:
Code: [Select]
TcpClient
  .OnStringReceived( HandleStringReceived )
  .OnMessageReceived( HandleMessageReceived )
  .OnStatusChanged( HandleStatusChanged )
  .Service( 10.1.1.131 )
  .Connect( 6000 );

This is the UDP:
Code: [Select]
UdpClient
  .OnStringReceived( HandleStringReceived )
  .OnMessageReceived( HandleMessageReceived )
  .OnStatusChanged( HandleStatusChanged )
  .Sender( 10.1.1.131,6000 )
  .Receiver( 6000 );

How can I receive a message from a relay board over UDP?
Title: Re: Receive UDP message
Post by: nobody on April 27, 2016, 08:56:58 PM
Hi!

I've tried to receive with the UDP helper, but I can't get any usable message, just 00-00-00 ... according to the number of the characters.
But, running HG on Windows, works fine. Is it possible that this is a mono bug?

Also, a big problem with the helper is, that after sending, it does not wait for receive the response from server...
Title: Re: Receive UDP message
Post by: Deggle on July 02, 2016, 12:24:56 PM
Hello,

I'd like to bump this up, as I'm also finding the UDP helper doesn't work as expected.

I'm trying to receive a single 3 byte UDP packet that's being broadcast on the network (255.255.255.255) however no luck. I've also tried simulating packets locally that are non broadcast but still nothing being fired at all.

Can anyone (or Gene) help?

Many thanks,

Tim