This page last changed on Dec 09, 2013 by devesh24.

HI all,
I am new to this IoT and the OpenRemote. I am about to start a communication between OR and an UDP client which is running on my Linux machine, and my goal is to whatever is been send by client, received by OR and either save or display at OR.
How to i get started.
Thank you ...

You need a build with patched UDP listener. The best if you start with reading this thread http://www.openremote.org/display/forums/UDP+Listener+Questions
The binary which you need is here https://dl.dropboxusercontent.com/u/2892838/OpenRemote-Controller-2.1.0_SNAPSHOT-2013-06-17.zip

Posted by aktur at Dec 09, 2013 13:51

Hello Michal
Thanks for the help, but unfortunately i am not getting it. i am showing a complete procedure how i am trying to do this
1-I have created a device called UDPLISTNER, with some random vendor name and model name.
2-Then i created command called Status_UDP, with UDPListener protocol, on the port 47839 and regular expression Hallo.
3-Since i am not using any sensor right now thats why i didn't created it,
4-Rules look like

package org.openremote.controller.protocol;
import org.openremote.controller.utils.Logger;
import org.openremote.controller.Constants;

function void log(String msg)
{
  Logger.getLogger(Constants.CONTROLLER_ROOT_LOG_CATEGORY + ".RuleLog").info(msg);
}

global org.openremote.controller.statuscache.CommandFacade execute;

rule "UDPListener"
when
  $evt : Event(source=="Statussensor", $v:value)
then
   System.out.println("UDP");
   log("rule: UDPListener - Aktion: Nichts unternehmen"+$v.toString());
end

5- Starting OR snapshot wht u suggested , and run a udp client on linux , sending message Hallo.

Posted by devesh24 at Dec 10, 2013 05:58

You need a custom sensor linked to your command "Status_UDP". Also the regex needs to look for a group.
Check the threads Michal mentioned above.

Posted by mredeker at Dec 10, 2013 08:28

You need to have a sensor called "Statussensor" of type custom because you are using it in the when statement.
Your regular expression to catch everything should be (.*)

Posted by aktur at Dec 10, 2013 09:12

@Devesh
For better readability you could enclose your code within {code}..{code} tags (see markup instructions). Do not place a / inside the end tag.

Posted by pz1 at Dec 10, 2013 09:52

@Pieter
Thanks for tips, surely i'll do

Posted by devesh24 at Dec 10, 2013 10:36

Hi all.
I followed every step which is been mentioned in the thread you people suggested but still not get anything.
I am not getting anything in drools.log file, and i am not getting the any .drl file in my controller.
Where i can get the complete source code of controller.

Thanks to all for the great help

Posted by devesh24 at Dec 10, 2013 10:42

Hallo Guys.
I am not able to locate any modeler_rules.drl in my controller , is there anything else i need to install.
Thank You

Posted by devesh24 at Dec 11, 2013 05:56

Hello Devesh,

The modeler_rules.drl will appear under OR/webapps/controller/rules directory after you've synced the controller with your designer account from http://localhost:8080/controller – assuming of course that you've correctly saved the rule first in the designer.

Posted by juha at Dec 11, 2013 07:48

Hello Juha Lindfors,
Thanks for the help, now i am getting this file but its found empty after i sync the controller with online designer .I think something is seriously wrong..
Thank You.

Posted by devesh24 at Dec 11, 2013 07:55
Document generated by Confluence on Jun 05, 2016 09:39